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

re-enabled era5 tests on github #1091

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest-py313.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ jobs:
COPERNICUSMARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUSMARINE_SERVICE_USERNAME }}
COPERNICUSMARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUSMARINE_SERVICE_PASSWORD }}
run: |
pytest -m "not requireslocaldata and not era5slow" --cov=dfm_tools --cov-report xml --cov-report term
pytest -m "not requireslocaldata" --cov=dfm_tools --cov-report xml --cov-report term
2 changes: 1 addition & 1 deletion .github/workflows/pytest-py39-mindeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
COPERNICUSMARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUSMARINE_SERVICE_USERNAME }}
COPERNICUSMARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUSMARINE_SERVICE_PASSWORD }}
run: |
pytest -m "not requireslocaldata and not era5slow" --cov=dfm_tools --cov-report xml --cov-report term
pytest -m "not requireslocaldata" --cov=dfm_tools --cov-report xml --cov-report term
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
COPERNICUSMARINE_SERVICE_USERNAME: ${{ secrets.COPERNICUSMARINE_SERVICE_USERNAME }}
COPERNICUSMARINE_SERVICE_PASSWORD: ${{ secrets.COPERNICUSMARINE_SERVICE_PASSWORD }}
run: |
pytest -m "not requireslocaldata and not era5slow" --cov=dfm_tools --cov-report xml --cov-report term
pytest -m "not requireslocaldata" --cov=dfm_tools --cov-report xml --cov-report term
- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
- create and checkout branch for release
- bump the versionnumber with `bumpversion minor`
- update `docs/whats-new.md` and add a date to the current release heading
- run local testbank with `pytest -m "not era5slow and not requireslocaldata"`
- run local testbank with `pytest -m "not requireslocaldata"`
- local check with: `python -m build` and `twine check dist/*` ([does not work on WCF](https://github.com/pypa/setuptools/issues/4133))
- commit+push to branch and merge PR
- copy the dfm_tools version from [pyproject.toml](https://github.com/Deltares/dfm_tools/blob/main/pyproject.toml) (e.g. `0.11.0`)
Expand Down
19 changes: 16 additions & 3 deletions docs/notebooks/modelbuilder_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1018,10 +1018,22 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 1,
"id": "0f01a183",
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "NameError",
"evalue": "name 'os' is not defined",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[1], line 4\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;66;03m# initialize mdu file and update settings\u001b[39;00m\n\u001b[0;32m 2\u001b[0m \u001b[38;5;66;03m# all keywords are documented in the Delft3D FM user manual\u001b[39;00m\n\u001b[0;32m 3\u001b[0m \u001b[38;5;66;03m# additional 2D/3D settings discussed in https://github.com/Deltares/dfm_tools/issues/951\u001b[39;00m\n\u001b[1;32m----> 4\u001b[0m mdu_file \u001b[38;5;241m=\u001b[39m \u001b[43mos\u001b[49m\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mjoin(dir_output, \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodel_name\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m.mdu\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[0;32m 5\u001b[0m mdu \u001b[38;5;241m=\u001b[39m hcdfm\u001b[38;5;241m.\u001b[39mFMModel()\n\u001b[0;32m 7\u001b[0m \u001b[38;5;66;03m# add the grid (_net.nc, network file)\u001b[39;00m\n",
"\u001b[1;31mNameError\u001b[0m: name 'os' is not defined"
]
}
],
"source": [
"# initialize mdu file and update settings\n",
"# all keywords are documented in the Delft3D FM user manual\n",
Expand All @@ -1038,7 +1050,8 @@
"# create and add drypointsfile if there are any cells generated that will result in high orthogonality\n",
"if len(illegalcells_gdf) > 0:\n",
" illegalcells_polyfile = dfmt.geodataframe_to_PolyFile(illegalcells_gdf)\n",
" illegalcells_polyfile.save(os.path.join(dir_output,\"illegalcells.pol\"))\n",
" illegalcells_file = os.path.join(dir_output, \"illegalcells.pol\")\n",
" illegalcells_polyfile.save(illegalcells_file)\n",
" mdu.geometry.drypointsfile = [illegalcells_polyfile]\n",
"\n",
"# update numerics settings\n",
Expand Down