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

Add supplementary_imports and test #96

Merged
merged 5 commits into from
Dec 18, 2020

Conversation

schymans
Copy link
Collaborator

When using EquationWriter and VariableWriter to create .py files, re-import of those files fails if variables or equations use functions that are not in the standard imports. Therefore, I created a new input option for both functions, supplementary_imports, which takes a dictionary with additional imports to be embedded in the .py files. I updated the docstrings to provide examples and also a new test in test_equations.py.

Features
~~~~~~~~

- **utils:** Enable supplementary_imports in VariableWriter and EquationWriter
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **utils:** Enable supplementary_imports in VariableWriter and EquationWriter
- **utils:** Enable `supplementary_imports` in `VariableWriter` and `EquationWriter`

@schymans schymans merged commit 25d70d2 into environmentalscience:master Dec 18, 2020
@schymans schymans deleted the writer branch December 18, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants