This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Add CI and ability to control simulation dates #35
Merged
dafyddstephenson
merged 27 commits into
CWorthy-ocean:main
from
dafyddstephenson:control_simulation_dates
Aug 8, 2024
Merged
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
cf16a0a
first commit on automated_testing branch: sets up c-star and runs the…
98e7fcd
add coverage to environment.yml
1fd2019
add coverage.toml file
35803f8
move coverage.toml to top level dir
c7a2889
add printenv to tests.yaml
fb8b226
modify environment.py so env is configured on github runner
56a53f3
fix path to blueprint in test
ba58325
fix path to blueprint in test ii
a205a78
add case for linux_x86_64 for exec_pfx in component.py
32a1d2b
Update README.md
dafyddstephenson d808c57
Update README.md
dafyddstephenson c18b93e
add comments to environment.py with hints for future development
560184b
Several changes involving simulation dates:
db744e7
add dateutil to CI environment
0237188
Further changes related to simulation dates:
73d12b2
changes after pre-commit checks
821052e
adjust run legth in test script to 30 mins from 1 day
326509c
tidying after reviewing during PR
67f8550
update docstring for ROMSComponent
0268749
update __str__ functions to reflect new attributes in InputDataset an…
27eae81
update codecov badge url in README
a191c93
add utility function for cloning/checking out git repos, use this fun…
ff1be54
update _clone_and_checkout to print subprocess stderr on failure
975db23
add print statement to end of test routine and TODO in base_model
d5bafeb
convert generated cstar_local_config.py to define a function set_loca…
5f7e5fd
convert generated cstar_local_config.py to define a function set_loca…
f2c402e
update roms_marbl_blueprint commit hash to reflect ucla-roms PR30
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
test: | ||
name: ${{ matrix.python-version }}-build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12",] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create conda environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
cache-downloads: true | ||
cache-environment: true | ||
micromamba-version: 'latest' | ||
environment-file: ci/environment.yml | ||
create-args: | | ||
python=${{ matrix.python-version }} | ||
|
||
- name: Environment info | ||
shell: bash | ||
run: | | ||
conda info | ||
printenv | ||
|
||
- name: Install C-Star | ||
shell: micromamba-shell {0} | ||
run: | | ||
python - V | ||
python -m pip install -e cstar_ocean --no-deps --force-reinstall | ||
|
||
- name: Running Tests | ||
shell: bash -l {0} | ||
run: | | ||
python -V | ||
coverage run --rcfile=coverage.toml cstar_ocean/tests/test_roms_marbl_example.py | ||
|
||
- name: Get coverage report | ||
shell: bash -l {0} | ||
run: | | ||
coverage report -m ; coverage xml | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml |
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 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,15 @@ | ||
name: cstar_env | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python>=3.10 | ||
- pooch | ||
- pyyaml | ||
- python-dateutil | ||
- coverage | ||
- numpy | ||
- compilers | ||
- netcdf-fortran | ||
- mpich | ||
- nco | ||
- ncview |
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,7 @@ | ||
[tool.coverage.run] | ||
source = ["cstar_ocean"] | ||
omit = [ | ||
"tests/*", | ||
"**/__init__.py", | ||
"setup.py", | ||
] |
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
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.
Should we change the path so it reflects the coverage of the CWorthy-ocean/C-Star main branch?
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.
good catch! I think it's done now but will have to check it's worked after the merge