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

[Refactor] Centralize Translate Test architecture #45

Merged
merged 6 commits into from
May 31, 2024

Conversation

FlorianDeconinck
Copy link
Collaborator

@FlorianDeconinck FlorianDeconinck commented May 17, 2024

Description
The Translate Test needs a lot of love. The first step is to make sure no code lives outside of ndsl that should be back to the mothership. This pulls pyFV3 and pySHiELD code that should not be there.

⚠️ pyFV3 and pySHiELD will break and need to be adapted. Namely there conftest needs to import ndsl.conftest⚠️

Other change to allow for an easier "from scratch" experience for testing are:

  • --dperiodic is removed, replaced with a --layout option with cube and tile as values to describe which grid the test needs
  • --compute_grid is removed and extended by --grid option with file (default), compute (replaces --compute_grid and default which allows to run a test with no Grid-Info.nc present on a simple npx/npy/npz grid with no metric terms
  • The script to turn serialbox .dat to netcdf is now in ndsl and available on the command line with ndsl-serialbox_to_netcdf

How Has This Been Tested?
This comes around as we are building 101 notebooks. In the series, we are showing how to port Fortran code and are making a translate test from scratch, which prompted and tested those changes.

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

Copy link
Contributor

@fmalatino fmalatino left a comment

Choose a reason for hiding this comment

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

lgtm

@FlorianDeconinck FlorianDeconinck merged commit 495953d into develop May 31, 2024
3 checks passed
@FlorianDeconinck FlorianDeconinck deleted the feature/centralize_translate_test branch May 31, 2024 19:52
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