-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cleanup duplicate CDR logic from pm_icecon
#10
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ff3b879
Remove unnecessary/noop tests
trey-stafford 692fa5a
Remove comment
trey-stafford 83a6cf9
Remove another test related to `sample_pmicecon_dataset`
trey-stafford 8420024
Remove `__main__` logic in `initial_daily_ecdr`
trey-stafford eb96591
Add note about what `idecdr` means
trey-stafford c7b3d27
Cleanup duplicate CDR code
trey-stafford 5342d20
Remove commented-out code
trey-stafford 1219c8b
Cleanup test module docstring
trey-stafford 003f9d0
Remove added pycache files
trey-stafford f694ea8
update `sciprts/cli.sh` for `seaice_ecdr`
trey-stafford 065a474
Remove code to generate sample ide file
trey-stafford cb665c0
Remove OBE info and add TODO to `README_dev.txt`
trey-stafford 78a136e
Integration tests: write nc files to tmp path
trey-stafford 45a23d7
Move `run_ecdr_pytest.sh` to `scripts/`
trey-stafford fd4f0da
Update README_dev.txt
trey-stafford 8dabb02
Cleanup READMEs and move dev specific readme info to `doc/`
trey-stafford 4bedc4f
Add TODO to docstring of idecdr CLI
trey-stafford File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
While developing at NSIDC, the workflow is: | ||
|
||
### For developers at NSIDC | ||
|
||
For developers at NSIDC, the [seaice_ecdr_vm | ||
repository](https://bitbucket.org/nsidc/seaice_ecdr_vm/src/main/) provides the | ||
NSIDC VM configuration for this project. | ||
|
||
`pm_icecon`, `seaice_ecdr`, and `pm_tb_data` will be checked out to | ||
`/home/vagrant/{project_name}`. | ||
|
||
### Adding dependencies | ||
|
||
To add new dependencies to this project, update the `environment.yml` file with | ||
the new dependency. Then update your conda environment: | ||
|
||
``` | ||
$ mamba env update | ||
``` | ||
|
||
Once the conda environment has been updated, lock the environment using `conda-lock`: | ||
|
||
``` | ||
$ conda-lock | ||
``` | ||
|
||
Commit the changes for the `environment.yml` and the `conda-lock.yml` files. | ||
|
||
|
||
### Running tests/CI | ||
|
||
#### Linting / formatting | ||
This project uses [pre-commit](https://pre-commit.com/) to run pre-commit hooks | ||
that check and format this project's code for stylistic consistency (using | ||
`ruff` and `black`) . | ||
|
||
The pre-commit configuration for this project can be found in | ||
`.pre-commit-config.yaml`. Configuration for specific tools (e.g., `mypy`) is | ||
given in the included `pyproject.toml`. | ||
|
||
For more information about using `pre-commit`, please sese the [Scientific | ||
Python Library Development Guide's section on | ||
pre-commit](https://learn.scientific-python.org/development/guides/gha-basic/#pre-commit). | ||
|
||
To install pre-commit to run checks for each commit you make: | ||
|
||
``` | ||
$ pre-commit install | ||
``` | ||
|
||
To manually run the pre-commit hooks without a commit: | ||
|
||
``` | ||
$ pre-commit run --all-files | ||
``` | ||
|
||
#### Running unit tests | ||
|
||
Use `pytest` to run unit tests: | ||
|
||
``` | ||
$ python -m pytest | ||
``` | ||
|
||
Alternatively, use `scripts/run_ecdr_pytest.sh`. | ||
|
||
#### Type-checking | ||
|
||
Use `mypy` to run static typechecking | ||
|
||
``` | ||
$ mypy | ||
``` | ||
|
||
## Running tests / generating sample data | ||
|
||
Can run unit and integration tests -- or manual subsets of -- with: | ||
|
||
./scripts/run_ecdr_pytest.sh | ||
|
||
Create an Initial Daily ECDR file with e.g.,: | ||
|
||
./scripts/cli.sh idecdr --date 2021-04-05 --hemisphere north --resolution 12 --output-dir /tmp/ | ||
trey-stafford marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
Pulling this information into a sub-document is a great idea!