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

Changes to reflect NDSL import format #13

Merged
merged 9 commits into from
Mar 20, 2024

Conversation

fmalatino
Copy link
Contributor

@fmalatino fmalatino commented Mar 14, 2024

Description
Modified import methods for inter and intra-package methods to reflect format adopted for NDSL

How Has This Been Tested?
Tested via lint and currently implemented translate tests
OS: RHEL 8.9 Ootpa
Built conda environment using workflow in github action configurations

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • Targeted model if this changed was triggered by a model need/shortcoming

@fmalatino fmalatino marked this pull request as ready for review March 14, 2024 17:48
@fmalatino fmalatino marked this pull request as draft March 14, 2024 18:38
Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

LGTM.

One note, for discussion

@@ -1,12 +1,11 @@
from gt4py.cartesian.gtscript import PARALLEL, computation, horizontal, interval, region
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of scope of this PR, but some part of me is wondering if we could fold the gt4py.cartesian.gtscript import in a ndsl.gtscript. The main reason would be to keep a single point of entry for users and remove the confusion around the frameworks

Copy link

Choose a reason for hiding this comment

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

Agreed on having ndsl as the single point of entry for pyFV3 and pySHiELD.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Logged in NOAA-GFDL/NDSL#29

@FlorianDeconinck
Copy link
Collaborator

You didn't push the update to ndsl in the CI

@oelbert
Copy link
Collaborator

oelbert commented Mar 18, 2024

Can you update the imports in examples/notebook/test_functionality.ipynb?

Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

Good for RC. Release ndsl in full and this can be moved on the released version and merged

Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

LGTM.

oelbert
oelbert previously approved these changes Mar 19, 2024
Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

Minor question about moving the geos_wrapper from pyfv3/wrappers/init to pyfv3/init, otherwise lgtm

from .stencils import DryConvectiveAdjustment, DynamicalCore
from .stencils.fv_dynamics import DynamicalCore
from .stencils.fv_subgridz import DryConvectiveAdjustment
from .wrappers.geos_wrapper import GeosDycoreWrapper
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the logic behind this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a, confused, attempt to prevent all of the stencils module from being added to the cache, thus preventing any cyclical imports. It has been changed back now.

@@ -1,10 +0,0 @@
from .geos_wrapper import GeosDycoreWrapper, MemorySpace, StencilBackendCompilerOverride
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like geos_wrapper in here, personally, but it's not important until/unless we have other wrappers supported

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They have been brought back into that __init__

Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

👍

@FlorianDeconinck FlorianDeconinck merged commit 163da22 into develop Mar 20, 2024
3 checks passed
@FlorianDeconinck FlorianDeconinck deleted the feature/init_standard branch March 20, 2024 13:56
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.

4 participants