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

Fix need/checks for inputdata path in subset_data and Python testing #2985

Open
samsrabin opened this issue Mar 5, 2025 · 0 comments
Open
Labels
bfb bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging testing additions or changes to tests

Comments

@samsrabin
Copy link
Collaborator

The following Python unit tests fail on non-NCAR machines with inputdata directory does not exist:

  • test_check_args_outsurfdat_provided
  • test_inputdata_setup_files_basic

That error is being thrown in setup_files() here:

if args.inputdatadir == "defaults.cfg":
clmforcingindir = defaults.get("main", "clmforcingindir")
else:
clmforcingindir = args.inputdatadir
if not os.path.isdir(clmforcingindir):
logger.info("clmforcingindir does not exist: %s", clmforcingindir)
abort("inputdata directory does not exist")

However, those tests don't really need that directory at all.

  • test_check_args_outsurfdat_provided doesn't need the inputdata dir at all. setup_files() should be rewritten so that check is optional.
  • test_inputdata_setup_files_basic checks that the inputdata dir is /glade/campaign/cesm/cesmdata/cseg/inputdata, which is just hard-coding things so that this test will fail outside Derecho and Casper. Why? I also don't really get the point of the other two assertions there.
@samsrabin samsrabin added bfb bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging testing additions or changes to tests labels Mar 5, 2025
@samsrabin samsrabin added this to the ctsm6.0.0 (code freeze) milestone Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bfb bit-for-bit test: python Pass clm_pymods test suite plus Python sys/unit tests before merging testing additions or changes to tests
Projects
Development

No branches or pull requests

1 participant