Skip to content

Commit

Permalink
docstrings for AST based decorator wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
DropD committed Apr 19, 2024
1 parent 556e8c5 commit fba07f1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/gt4py/next/ffront/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ def __call__(self, *args, offset_provider: dict[str, Dimension], **kwargs: Any)

@dataclasses.dataclass(frozen=True)
class ProgramFromPast(Program):
"""
This version of program has no DSL definition associated with it.
PAST nodes can be built programmatically from field operators or from scratch.
This wrapper provides the appropriate toolchain entry points.
"""

past_stage: ffront_stages.PastProgramDefinition

def __call__(self, *args, offset_provider: dict[str, Dimension], **kwargs):
Expand Down Expand Up @@ -509,9 +516,9 @@ class FieldOperatorFromFoast(FieldOperator):
"""
This version of the field operator does not have a DSL definition.
Instead, it is defined from a FieldOperator AST directly.
Current main use case is for tests that programmatically build FOAST
trees with specific features to be tested.
FieldOperator AST nodes can be programmatically built, which may be
particularly useful in testing and debugging.
This class provides the appropriate toolchain entry points.
"""

foast_stage: ffront_stages.FoastOperatorDefinition
Expand Down

0 comments on commit fba07f1

Please sign in to comment.