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

Initial pFUnit Integration #326

Open
wants to merge 30 commits into
base: development
Choose a base branch
from

Conversation

mwaxmonsky
Copy link
Collaborator

Tag name (required for release branches):
Originator(s): @mwaxmonsky

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

Describe any changes made to build system: None

Describe any changes made to the namelist: None

List any changes to the defaults for the input datasets (e.g. boundary datasets): None

List all files eliminated and why: None

List all files added and what they do:
A .github/workflows/fortran_unit_tests.yml

  • Initial workflow file to support unit testing in CI

A src/core_utils/CMakeLists.txt
A test/unit-fortran/CMakeLists.txt
A test/unit-fortran/src/core_utils/CMakeLists.txt

  • Initial unit test build infrastructure.

A src/core_utils/string_core_utils.F90
A test/unit-fortran/src/core_utils/test_string_core_utils.pf

  • Refactored string utils and unit tests without dependencies

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status development...<your_branch_name>)
M src/utils/string_utils.F90

  • Removed core util code so this layer calls dependency code and then core util code.

If there are new failures (compared to the test/existing-test-failures.txt file),
have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima:

derecho/gnu/aux_sima:

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than latest:

@mwaxmonsky mwaxmonsky requested a review from nusbaume December 2, 2024 15:16
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks for getting this implemented @mwaxmonsky! I did have a few change requests, but hopefully nothing that is too difficult.

.github/workflows/fortran_unit_tests.yml Show resolved Hide resolved
.github/workflows/fortran_unit_tests.yml Outdated Show resolved Hide resolved
src/core_utils/CMakeLists.txt Show resolved Hide resolved
src/core_utils/string_core_utils.F90 Outdated Show resolved Hide resolved
src/utils/string_utils.F90 Show resolved Hide resolved
src/utils/string_utils.F90 Show resolved Hide resolved
test/unit-fortran/CMakeLists.txt Outdated Show resolved Hide resolved
@mwaxmonsky mwaxmonsky requested a review from nusbaume December 5, 2024 06:56
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks for the directory restructure! We are almost there, Just had two last requests.

src/core_utils/CMakeLists.txt Show resolved Hide resolved
test/run_unit_tests.sh Show resolved Hide resolved
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Everything looks great to me now! I'll figure out a second reviewer for the PR once you are ready to bring it out of draft. Thanks!

@mwaxmonsky mwaxmonsky marked this pull request as ready for review December 16, 2024 21:01
@nusbaume nusbaume requested a review from jimmielin December 16, 2024 21:12
Copy link
Member

@jimmielin jimmielin left a comment

Choose a reason for hiding this comment

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

Thanks @mwaxmonsky! This looks great. I have a couple of minor comments that don't have to hold up the PR.

  1. Could the directory restructure be noted in the main text of the PR (list of modified files?) to document the purpose of the changes to the python unit test files?
  2. I understand this is just an initial pfUnit integration. It would be nice to have a test in the future for stringify which is what's slowly replacing to_str in CAM-SIMA, but it doesn't necessarily have to be in this PR.
  3. I saw some functions were removed from string_utils.F90 so I would just make sure all regression tests build & run as expected with the removal of these unused functions.

mattldawson added a commit that referenced this pull request Dec 31, 2024
Tag name (required for release branches):
Originator(s): Matt Dawson

Description (include the issue title, and the keyword ['closes',
'fixes', 'resolves'] followed by the issue number):

Adds the calculation of solar zenith angle and Earth–Sun distance and
makes them available as CCPP standard named variables.

@nusbaume - I wasn't sure if I put the call to recalculate the orbital
properties is correct. If it isn't let me know, and I can move it.

closes #328 
Additionally:
- adds some stubbed-out dependencies needed for MUSICA, until the actual
values are available from other physics schemes or the host model
- adds some testing infrastructure needed for unit tests of this code.
Once #326 is merged in, I can update this PR to use the new unit testing
infrastructure

In draft until ESCOMP/atmospheric_physics#171 is
merged in

Describe any changes made to build system:
none

Describe any changes made to the namelist:
none

List any changes to the defaults for the input datasets (e.g. boundary
datasets):
none

List all files eliminated and why:
none

List all files added and what they do:

List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)

If there are new failures (compared to the
`test/existing-test-failures.txt` file),
have them OK'd by the gatekeeper, note them here, and add them to the
file.
If there are baseline differences, include the test and the reason for
the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima:

derecho/gnu/aux_sima:

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than
latest:

---------

Co-authored-by: Courtney Peverley <[email protected]>
Co-authored-by: Kuan-Chih Wang <[email protected]>
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.

3 participants