-
Notifications
You must be signed in to change notification settings - Fork 30
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
[1 pt] PR: Add CI - GitHub Actions Workflow file #1030
Conversation
Had to add a quick fix to |
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.
Did a number of tests in EC2's.
-
created a new docker container
-
ran pipeline with 12040101 has both alpha domain data and ras2fim calibration data.
-
found an error in both the code and EFS for the ras2fim rating curve and fixed it. Note; S3 edition of the ras2fim rating curve was ras2fim rel_100 which is good enough for now.
-
ran a quick synth test and eval test.
- python3 ./foss_fim/tools/synthesize_test_cases.py -c DEV -l -v robh_cli_1 -jh 1 -jb 6 -m /outputs/robh_cli_1/robh_cli_1_metrics.csv -o -pcsv /data/previous_fim/fim_4_4_0_0/fim_4_4_0_0_metrics.csv
- python3 foss_fim/tools/eval_plots.py -m /outputs/robh_cli_1/robh_cli_1_metrics.csv -w /outputs/robh_cli_1/eval/ -v fim_4_3_11_0 fim_4_3_12_0 fim_4_4_0_0
-
ran a unit test check == pytest /foss_fim/unit_tests. All but three passed.
-
within the container ran isort, black and flake8 (flake8 is the new command to be run now) and it all worked well.
-
Could not run pre-commit inside the container as the container does not have git.
-
did a git add, commit, push from outside the container without issue.
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.
Looks great and ran well.
Had a bit of trouble initially with unit tests but easily got passed it and all unit tests ran well.
Bumps [pyarrow](https://github.com/apache/arrow) from 11.0.0 to 14.0.1. - [Commits](apache/arrow@go/v11.0.0...apache-arrow-14.0.1) --- updated-dependencies: - dependency-name: pyarrow dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
This PR introduces the
.github/workflows/lint_and_format.yaml
file which serves as the first step in developing a Continuous Integration pipeline for this repository. Theflake8-pyproject
dependency is now used, as it works out of the box with thepre-commit
GitHub Action in the GitHub Hosted Runner environment. In switching to this package, there were a couple ofE721
which appeared. Modifications were made to the appropriate files to resolve theflake8
E721
errors. Also, updates to theunit_tests
were necessary since Branch IDs have changed with the latest code.Accomplishes the first step of incorporating CI from #1022
Closes #1034 : Upgrade to
pyarrow
versionThe only difference in functionality is that instead of running
pflake8
as a wrapper forflake8
, one can callflake8
directly when specifying theflake8-pyproject
as anadditional_dependencies
in.pre-commit-config.yaml
to pick up thepyproject.toml
configuration file.Changes
.pre-commit-config.yaml
: useflake8-pyproject
package instead ofpyproject-flake8
.Pipfile
andPipfile.lock
: updated to useflake8-pyproject
package instead ofpyproject-flake8
, upgradepyarrow
version.data
/wbd/generate_pre_clip_fim_huc8.py
: Add space between (-) operator line 134.write_parquet_from_calib_pts.py
: Add space between (-) operator line 234.src
check_huc_inputs.py
: Change== string
tois str
, removeimport string
tools
eval_plots.py
: Add space after comma in lines 207 & 208generate_categorical_fim_mapping.py
:hash_compare.py
: Add space after comma line 153.inundate_mosaic_wrapper.py
: Useis
instead of==
line 73.inundation_wrapper_nwm_flows.py
: Useis not
instead of!=
line 76.mosaic_inundation.py
: Useis
instead of==
line 181.unit_tests
clip_vectors_to_wbd_test.py
: File moved to data/wbd directory, update import statementfilter_catchments_and_add_attributes_params.json
: Update Branch IDoutputs_cleanup_params.json
: Update Branch IDsplit_flows_params.json
: Update Branch IDusgs_gage_crosswalk_params.json
: Update Branch ID & update argument to gage_crosswalk.run_crosswalkunit_tests/usgs_gage_crosswalk_test.py
: Update params to gage_crosswalk.run_crosswalkAdditions
.github/workflows/
lint_and_format.yaml
: Add GitHub Actions Workflow file for Continuous Integration environment.Testing
fim_pipeline.sh
was run successfully in generating the new unit test data.hash_compare.py
script was successful when comparing the unit test data generated with the dev branch, and with this branch. (After the unit tests were run, for consistency)Issuer Checklist (For developer use)
You may update this checklist before and/or after creating the PR. If you're unsure about any of them, please ask, we're here to help! These items are what we are going to look for before merging your code.
[_pt] PR: <description>
dev
branch (the default branch), you have a descriptive Feature Branch name using the format:dev-<description-of-change>
(e.g.dev-revise-levee-masking
)dev
branchpre-commit
hooks were run locally/foss_fim/
, run:pytest unit_tests/
)4.x.x.x
Merge Checklist (For Technical Lead use only)