Optional and non-optional dependencies#154
Conversation
3ec64a3 to
4d16ef2
Compare
381e314 to
5b877f7
Compare
5b877f7 to
816d28b
Compare
FlorianDeconinck
left a comment
There was a problem hiding this comment.
Couple of extra import clean up since we are there
9f06d39 to
3d50671
Compare
romanc
left a comment
There was a problem hiding this comment.
Some inline comments on the latest changes. New changes are only in the last commit. The rest just has new commit hashes because I rebased.
| import shutil | ||
|
|
||
| import pytest | ||
| from gt4py.cartesian import config as gt_config |
There was a problem hiding this comment.
Both tests (and there are only two) were requiring the same imports, so I moved them up here
| @function | ||
| def dim(a, b): | ||
| """ | ||
| Performs a check on the difference | ||
| between the values in arguments | ||
| a and b. The variable diff is set | ||
| to the difference between a and b | ||
| when the difference is positive, | ||
| otherwise it is set to zero. The | ||
| function returns the diff variable. | ||
| Calculates a - b, camped to 0, i.e. max(a - b, 0). | ||
| """ | ||
| diff = a - b if a - b > 0 else 0 | ||
| return diff | ||
| return max(a - b, 0) |
There was a problem hiding this comment.
@oelbert I did sneak in some cleanups here. FYI. Also, given the simplicity of the expression, I wonder if we should rename the function or if we need it at all...
FlorianDeconinck
left a comment
There was a problem hiding this comment.
Remove iskip and we should be good to go
ff38735 to
acfad0a
Compare
|
Removed |
Description
It looks like in earlier versions, a couple packages were optional. In particular this includes the following packages
dace,gt4py,mpi4py, andxarraywhich are now all installed by default given the current
setup.py. We can thus simplify their imports (in case they were still imported conditionally). In addition, a couple code paths didn't importcupyfromndsl.optional_imports. This has been corrected too.Doing all this, I discovered a bug in
ndsl/checkpointer/snapshots.py, where a snapshot's dataset would only ever contain the firstsavepoint. This was unearthed by tests intests/checkpointer/test_snapshot.py, which suddenly started failing after cleaning up the imports.As a follow-up, PR #156 will look into re-enabling tests with
zarrinstalled. Looks like these tests will need some love/work before we can re-enable them.How Has This Been Tested?
Covered by existing test cases.
Checklist: