Comments (10)
And maybe open a specific one to improve derivation testing? See shorturl.at/cJKZ3
from esmvalcore.
Regarding testing: please avoid using sys.exit() anywhere in your code, this makes the code untestable. This is because if sys.exit() is called because a single test fails, the test execution python program will exit and no other tests will be performed and no report will be generated. Instead raise an informative exception. I have added code to main.py (pull request #91) which will log any exception that is raised and goes uncaught and after that calls sys.exit(1) to keep the current behaviour.
from esmvalcore.
current testing average for ESMValCore is about 80-85% -> not bad! There's a couple PR's with more testing, I reckon it's safe to close this? 🍺
from esmvalcore.
@jvegasbsc I cannot seem to run the tests with coverage. What is the intended usage of the run_tests.py script? running it from the esmvaltool root runs all the tests but without any coverage, running it inside the test folder gives me coverage but allmost all the tests fail. Am I missing something?
from esmvalcore.
Instead of trying to agree on the best testing framework, we use pytest to run everything, which in turn supports all the major testing frameworks.
Note that we should update the documentation
from esmvalcore.
I've started a branch for implementing tests: https://github.com/ESMValGroup/ESMValTool/tree/REFACTORING_tests
from esmvalcore.
@BenMGeo might be interested in this issue.
from esmvalcore.
We should also add unit tests covering #146 and #148
from esmvalcore.
Related issue that addresses part of this task https://github.com/ESMValGroup/ESMValTool/issues/228.
from esmvalcore.
so bad stuff, apart from derive modules and main (I have a PR that ups the testing cov for main to 86%):
esmvalcore/cmor/_fixes/cmip5/bcc_csm1_1.py 25 19 24%
esmvalcore/cmor/_fixes/cmip5/bcc_csm1_1_m.py 26 19 27%
esmvalcore/cmor/_fixes/cmip5/hadgem2_cc.py 19 12 37%
esmvalcore/cmor/_fixes/cmip5/hadgem2_es.py 19 12 37%
esmvalcore/cmor/_fixes/cmip5/mri_cgcm3.py 11 4 64%
esmvalcore/cmor/_fixes/cmip6/cesm2.py 22 9 59%
esmvalcore/cmor/_fixes/cmip6/gfdl_cm4.py 21 12 43%
esmvalcore/cmor/_fixes/cmip6/mpi_esm1_2_hr.py 21 10 52%
esmvalcore/cmor/_fixes/obs4mips/ssmi.py 10 6 40%
esmvalcore/cmor/_fixes/obs4mips/ssmi_meris.py 7 2 71%
esmvalcore/preprocessor/_download.py 45 37 18%
esmvalcore/preprocessor/_io.py 196 54 72%
esmvalcore/utils/draft_release_notes.py 42 29 31%
everything else is above 75%
from esmvalcore.
Related Issues (20)
- Add `esmvaltool compare` command to run `esmvaltool/utils/testing/regression/compare.py` HOT 4
- GFDL-CM4 SfcWind height Issues HOT 1
- [testing/mamba] No useful output from mamba
- Improve the ESMValCore release documentation
- Automatically select a lazy regridding scheme in `regrid` preprocessor function for 2D lat/2D lon grids when possible HOT 6
- Drop support for Python 3.9 HOT 3
- Update Iris pin to avoid using versions with memory issues HOT 4
- Increase the version number for 2.11.0 release
- Add draft release notes for v2.11.0rc1 HOT 1
- Remove `compilers` from `environment.yml`
- Recipe test results for ESMValCore v2.11.0rc1 HOT 15
- Diagnostic failure for `recipe_martin18grl.yml` on `v2.11.0rc1` HOT 1
- Diagnostic failure for `recipe_pcrglobwb.yml` on `v2.11.0rc1` HOT 1
- Diagnostic failure for `recipe_lauer22jclim_fig3-4_zonal.yml` on `v2.11.0rc1` HOT 1
- Add native6, OBS6 and RAWOBS rootpaths to metoffice config-user.yml template, and remove temporary dir
- Add control over chunks at load time
- Interpolation in `resample_hours`
- Adding ETCCDI custom CMOR tables for HadEX3 CMORizer and IPCC diagnotics HOT 1
- Make extract_point/extract_location/extract_coordinate_points preprocessor functions lazy HOT 1
- Lazy derive preprocessor function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esmvalcore.