-
Notifications
You must be signed in to change notification settings - Fork 1
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
DAS-2252 Initial Repository Import #1
DAS-2252 Initial Repository Import #1
Conversation
DAS-2265: checkpoint DAS-2265: basic grid work complete DAS-2265: Cleanup
There is a situation that happens when the input seconds are read, they are converted to nanoseconds, but then written out properly.
I might put logging in later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the code to the best of my understanding. Most of my feedback are questions for my own benefit, with the real requested changes being typos and a potential mistake in grid.get_metadata_children()
.
Also, would we like to add a check for unused variables? I think we could just add --unused-variable
to the ruff args list in .pre-commit-config.yaml
.
Other than that, I appreciate how clean this code is and I hope to get to know it better in the future!
I ran the pytests, set up the local development environment to run the SMAP L2 Gridder locally, and ran notebook attached to the ticket using two different granules, SMAP_L2_SM_P_E_52352_D_20241119T043136_R19240_001.h5 and SMAP_L2_SM_P_E_52397_D_20241122T062227_R19240_001.h5. All tests passed. Hurray! |
@owenlittlejohns I'm merging this and will address anything in follow on PRs if you find problems. |
Description
This is the first import of the software to be used in the SMAP-L2-Gridding-Service.
This PR contains the software and tests to allow a user to create gridded NetCDF4-CF output data from SMAP Enhanced L2 Radiometer Half-Orbit 9 km EASE-Grid Soil Moisture data (SPL2SMP_E).
The Acceptance Criteria for this ticket are:
To satisfy those critera:
pre-commit
has been enabled locally with the standard DAS.pre-commit-config.yaml
file to enable black formatting and sort imports.pre-commit.ci
has been enabled on this GitHub repository (see the checks run on this PR).run_tests_on_pull_requests.yml
action.smap_l2_gridder
What is not complete:
Jira Issue ID
DAS-2252
Local Test Steps
Complete a full review of the codebase.
Download a SPL2SMP_E granule (two ways):
processed_granule.nc
fileCreate an isolated python 3.12 environment installing packages from the
pip_requirements.txt
andpip_dev_requirements.txt
file.run the tests:
❯ PYTHONPATH=. pytest .
not sure why I needed to set my PYTHONPATH...
You can check the test coverage:
❯ PYTHONPATH=. pytest --cov=smap_l2_gridder --cov-report=term-missing --cov-report=html
you have to install
pytest-coverage
and__main__.py
is not tested.regrid your granule. From the root directory run:
python -m smap_l2_gridder --input [path/to/input-file.h5] --output [path/to/output_granule.nc]
Validate your output against the
processed_granule.nc
from EDS. (Look on the DAS-2252 ticket for notebook that you can use.)processed_granule.nc
and youroutput_granule.nc
files with panoply.PR Acceptance Checklist
CHANGELOG.md
updated to include high level summary of PR changes.docker/service_version.txt
updated if publishing a release.