Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ast to deal with python files when translating to json-importer #41

Open
Ramimashkouk opened this issue Jun 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Ramimashkouk
Copy link
Member

Use ast for dealing with python files (conditions.py, responses.py, …) when translating to json-importer as suggested here and here.

@Ramimashkouk
Copy link
Member Author

DFF is gonna tranform some objects like labels (forward, to_fallback, …) to classes as shown below. So using ast might be unnecessary.

# DFF
class Repeat(Label):
  priority: Optional[float] = None
  def __call__()...

# dflowd backend
schemas = {
  cls.__name__: cls.model_json_schema() for cls in labels_classes
}

@Ramimashkouk Ramimashkouk self-assigned this Jun 4, 2024
@Ramimashkouk Ramimashkouk added the enhancement New feature or request label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant