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

Increase portability and speed of testbank #447

Closed
veenstrajelmer opened this issue Jul 10, 2023 · 0 comments · Fixed by #1110
Closed

Increase portability and speed of testbank #447

veenstrajelmer opened this issue Jul 10, 2023 · 0 comments · Fixed by #1110

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jul 10, 2023

Prevent p-drive links in unit/systemtests of testbank to increase github codecov.

Coverage when running pytest -m "not acceptance" --cov=dfm_tools (includes requireslocaldata) locally:

---------- coverage: platform win32, python 3.12.8-final-0 -----------
Name                                Stmts   Miss  Cover
-------------------------------------------------------
dfm_tools\__init__.py                  19      0   100%
dfm_tools\bathymetry.py                61      6    90%
dfm_tools\coastlines.py                88     13    85%
dfm_tools\data.py                     140     19    86% -14 (due to gshhs download in cachedir)
dfm_tools\deprecated_functions.py      35     16    54%
dfm_tools\download.py                 248     95    84%
dfm_tools\errors.py                     2      0   100%
dfm_tools\get_nc.py                   257     65    75% +47
dfm_tools\get_nc_helpers.py            82      8    90% +62
dfm_tools\hydrolib_helpers.py         357     97    73% +1
dfm_tools\interpolate_grid2bnd.py     300     59    80% +6
dfm_tools\linebuilder.py               51     40    22%
dfm_tools\meshkernel_helpers.py       160     10    94%
dfm_tools\modelbuilder.py             195     47    76%
dfm_tools\modplot.py                  357     49    86%
dfm_tools\observations.py             592     48    92% +8
dfm_tools\xarray_helpers.py           171     65    62%
dfm_tools\xugrid_helpers.py           343     15    96% +28
-------------------------------------------------------
TOTAL                                3458    652    81%

test_get_nc_helpers.py:

  • test_rename_waqvars(): p:\archivedprojects\11203850-coastserv\06-Model\waq_model\simulations\run0_20200319\DFM_OUTPUT_kzn_waq\kzn_waq_0000_map.nc >> mimicked with grevelingen uds and uds.mesh2d_water_quality_output_61 from this dataset
  • test_rename_fouvars_regular(): p:\archivedprojects\11203379-005-mwra-updated-bem\03_model\02_final\A72_ntsu0_kzlb2\DFM_OUTPUT_MB_02_fou\MB_02_0000_fou.nc >> moved to westernscheldt opendap dataset

test_get_nc.py:

  • test_zsigmalayermodel_correct_layers():
    p:\dflowfm\maintenance\JIRA\05000-05999\05477\c103_ws_3d_fourier\DFM_OUTPUT_westerscheldt01_0subst\westerscheldt01_0subst_map.nc >> moved to westernscheldt opendap dataset

test_interpolate_grid2bnd.py:

  • test_interpolate_nc_to_bc(): os.path.join(r'p:\1204257-dcsmzuno\data\CMEMS\nc\DCSM_allAvailableTimes',f'{ncvarname}_2012-12*.nc') >> all the functions are covered by other tests on github, so remove it

test_xugrid_helpers.py:

  • test_open_2Dnetwork_with_1Dtopology(): r'p:\1204257-dcsmzuno\2006-2012\3D-DCSM-FM\A18b_ntsu1\DCSM-FM_0_5nm_grid_20191202_depth_20181213_net.nc' >> used single grevelingen partition and overwritten the topology with 1D
  • test_enrich_rst_with_map(): r'p:\archivedprojects\11206811-002-kpp-veerse-meer\model\runs_2011-2012\VM_WQ_3D_run9_c\DFM_OUTPUT_VM_WQ_3D\VM_WQ_3D_0000_20130101_000000_rst.nc' >> replaced with dfmt.data.fm_westernscheldt_rst(return_filepath=True) after fixing fix enrich_rst_with_map for westernscheldt rstfile #1113
  • test_uds_auto_set_crs_spherical(): r'p:\1204257-dcsmzuno\2006-2012\3D-DCSM-FM\A18b_ntsu1\DCSM-FM_0_5nm_grid_20191202_depth_20181213_net.nc' >> mimicked with curvedbend ds where crs var+attrs are overwritten

Follow-up: #1109

@veenstrajelmer veenstrajelmer changed the title Increase portability of testbank and preprocessing notebook Increase portability of testbank and notebooks Jul 10, 2023
@veenstrajelmer veenstrajelmer changed the title Increase portability of testbank and notebooks Increase portability and speed of testbank Oct 13, 2023
@veenstrajelmer veenstrajelmer linked a pull request Feb 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant