Releases: climate-resource/input4mips_validation
v0.20.1
Announcements
- Fixed inference of daily time steps (previously this would fail if data was lazy loaded as subtraction of
cftimewithxarraydoesn't work properly if the data is a dask array)
Changelog
🐛 Bug Fixes
- Fixed inference of daily time steps (previously this would fail if data was lazy loaded as subtraction of
cftimewithxarraydoesn't work properly if the data is a dask array) (#121)
🔧 Trivial/Internal Changes
Changes
v0.20.0
Announcements
- the
validate-treeCLI will now work even if there are climatology files in the tree - we suppport the author field in source ID information
Changelog
🆕 Features
- Added [
input4mips_validation.cvs.author.Author][], [input4mips_validation.validation.email][] and [input4mips_validation.validation.orcid][] to support the inclusion of parsable author information in the source ID CVs. (#116)
🎉 Improvements
- Added the
authorattribute to [input4mips_validation.cvs.source_id.SourceIDValues][] to support the inclusion of parsable author information in the source ID CVs. (#116)
🐛 Bug Fixes
- Fixed the
validate-treeCLI (and associated functionality) so that it handles climatology files correctly (#119)
🔧 Trivial/Internal Changes
Changes
v0.19.1
Announcements
- Improved the ability to handle data sets with region information, full details below ⬇️
Changelog
🎉 Improvements
- Added the ability to handle data sets with string variables, like region.
The key logic improvement is in [XRVariableProcessorLike.get_ds_variables][input4mips_validation.xarray_helpers.variables.XRVariableProcessorLike.get_ds_variables], which now excludes any non-number variables from the dataset's variables. (#113)
Changes
v0.19.0
Announcements
- Just cleaning up an unintended part of the API
Changelog
⚠️ Breaking Changes
- Removed
input4mips_validation.database.creation.create_db_file_entry_with_logging, this function was never meant to be released. (#111)
Changes
v0.18.0
Announcements
- We have improved our multiprocessing support and the level of control given to the user. This means that multiprocessing should now work on all systems, including logging on non-windows systems. On windows we don't think the logging will come through properly yet (follow #108 for progress).
Changelog
⚠️ Breaking Changes
- Changed the interface to [
input4mips_validation.database.creation.create_db_file_entry_with_logging][input4mips_validation.database.creation.create_db_file_entry_with_logging] and [input4mips_validation.validation.database.database_file_entry_is_valid][input4mips_validation.validation.database.database_file_entry_is_valid].
Both of these functions were intended for internal use, hence this should hopefully cause minor issues for users. (#106) - Removed (the mostly internal interfaces)
input4mips_validation.logging_config.serialise_logging_configandinput4mips_validation.logging_config.deserialise_logging_config.
We don't think these are in general need, although it is still being figured out (see #108). (#107)
🆕 Features
- Added the
--mp-context-idoption to the command-line interfaces that support multiprocessing to give the user more control of how the multiprocessing is done.
This is then passed down the stack to [input4mips_validation.parallelisation.run_parallel][input4mips_validation.parallelisation.run_parallel]. (#107)
🎉 Improvements
- Added [
input4mips_validation.parallelisation][input4mips_validation.parallelisation] to assist with simplifying parallelisation, mainly for internal use. (#106) - Added
xr_load_kwargsto [input4mips_validation.xarray_helpers.iris.ds_from_iris_cubes][input4mips_validation.xarray_helpers.iris.ds_from_iris_cubes].
By default, this sets things up so the user doesn't get a thousand warnings about using cftime rather than numpy time objects
(but the user can pass the argument to change this however they wish). (#107)
Changes
- 5cd4d36 bump: version 0.17.2a1 -> 0.18.0
- 5ebc210 Fix up docs
- 02c9403 CHANGELOG and clean up
- a434376 Expand testing
- afe548b Fix up CHANGELOG
- 7a0c7a8 Apply forking throughout
- 60b2e21 Work out that forking is what you need
- d0865dc Set up sensible defaults for multiprocessing contexts
- a838f9c No logging in db create
- a0c52ca Avoid cftime warnings
- 8360886 CHANGELOG
- 8d90a0e Finish moving things around
- 3efd6fd Add docstring
- d631b86 mypy
- ae8ec46 Change implementation
- bfa28cd enqueue logging by default
- 29e8e20 Turn tests back on in CI
- fbe8dd4 Update pixi lock file
- 1cf7599 bump(pre-release): version 0.17.1 > 0.17.2a1
v0.17.1
Announcements
- A bug fix release, see below
Changelog
🐛 Bug Fixes
- Fixed up addition of bounds when using climatology data (time bounds are no longer added). (#104)
Changes
v0.17.0
Announcements
- We now support monthly climatology datasets
- There are minor breaking changes, see below
Changelog
⚠️ Breaking Changes
-
input4mips_validation.inference.from_data.infer_time_start_time_endrenamed to [input4mips_validation.inference.from_data.infer_time_start_time_end_for_filename][input4mips_validation.inference.from_data.infer_time_start_time_end_for_filename].input4mips_validation.inference.from_data.create_time_rangerenamed to [input4mips_validation.inference.from_data.create_time_range_for_filename][input4mips_validation.inference.from_data.create_time_range_for_filename].
(#103)
🆕 Features
- Added [
input4mips_validation.validation.external_variables.validate_external_variables][input4mips_validation.validation.external_variables.validate_external_variables]. (#98) - Added [
input4mips_validation.validation.frequency.validate_frequency][input4mips_validation.validation.frequency.validate_frequency]. (#100) - Added support for data that represents a monthly climatology. (#103)
🎉 Improvements
- Split [
input4mips_validation.validation.allowed_characters][input4mips_validation.validation.allowed_characters] into its own module. (#98) - Added [
input4mips_validation.inference.from_data.BoundsInfo][input4mips_validation.inference.from_data.BoundsInfo] and propagated it throughout the stack, to make it easier to specify how the bounds variables should be handled. (#100)
🐛 Bug Fixes
- Fixed the behaviour of [
input4mips_validation.cvs.loading_raw.get_raw_cvs_loader][input4mips_validation.cvs.loading_raw.get_raw_cvs_loader]
(and therefore [input4mips_validation.cvs.loading.load_cvs][input4mips_validation.cvs.loading.load_cvs])
when theINPUT4MIPS_VALIDATION_CV_SOURCE_FORCE_DOWNLOADenvironment variable was set. (#101)
🔧 Trivial/Internal Changes
Changes
- 4e2e8ab bump: version 0.16.1a1 -> 0.17.0
- 8426d21 mypy
- 2207160 Disable test in CI
- 1e8fa5a Turn off CLI tests
- 8d0e12a Add timeout
- e5ff146 Try fixing up logging config serialisation
- e4769e2 Identify issue
- 94415f7 Test parallel processing more explicitly
- c41cdb8 Clean up
- 0c4c429 Revert to serial processing
- 44ff895 Fix up
- 7229607 Try again
- d64d619 Switch to serial processing
- 2b24384 Remove redundant comment
- 5bde847 Try fixing up parallel passing
- fa292d4 Undo changes to tests
- 597167b Revert CI changes
- e49d06b Try disabling parallel processing
- 67248b0 Next check
- e5e06ae Try working out where the failure is
- 1df2a26 Try disabling cache entirely
- bcea5cc Next attempt
- c84c3a8 Try again
- f0020a0 Try again
- 17616cc Try with ignored tests
- babe1a5 Rename changelog
- aa0b292 Update loguru requirement
- 43174f3 Update cache-key logic
- 6545354 Fix up type hints and mypy
- 1cc7818 Try updating lock file
- 5e619dc Add rest of src changes
- 11a72b0 Update validation
- 5969ac4 Revert changes to inference
- 1c94423 Update inference
- 2ba2961 Update xarray helpers
- e146f90 Add minimum src changes to run tests
- 6d3f2e1 Revert src changes
- 8e3248e Update stubs
- f47fe33 Update src
- 92a9af1 Add tests
- 9cdc3d5 CHANGELOG
- 0dd190e CHANGELOG
- ffb60f4 Finish fixing up passing from CI
- 80acc28 Fix up passing for next path
- 58df2a0 Pass tests
- 5c3ed24 WIP: making bounds info handling smarter
- be2c884 Add comment
- 61df629 Update tests
- 19229be CHANGELOG
- 5dd48ce Fix up API passing
- 0795f8c Propagate API tweak throughout stack
- 51ce3ae Pass tests
- 1ad5d58 Pass unit tests
- 670e5e9 CHANGELOG
- aca8846 Pass tests
- ce11ee2 Add failing tests
- cd363b0 Hotfix env
- 9ffb1e0 bump(pre-release): version 0.16.0 > 0.16.1a1
v0.16.0
Announcements
This release significantly improves the API and the coverage of the checks provided. It also includes a number of breaking changes, albeit mainly to parts of the API that are not used very much. See the breaking changes for details.
The CLI is also much thiner, with a Python equivalent for each part of the API, should it be needed.
Changelog
⚠️ Breaking Changes
-
Renamed
bnds_coord_indicatortobnds_coord_indicatorsthroughout.
This breaks the API, albeit it is a rarely used part of the API
and the defaults are sensible.
Whereverbnds_coord_indicatorwas used, it now needs to be replaced with a set of strings, e.g.{"bnds"}.
If using the command-line option, then--bnds-coord-indicator 'bnds'
would be replaced with--bnds-coord-indicators 'bnds'
and there is now also the possibility to provide multiple values
with e.g.--bnds-coord-indicators 'bnds;bounds'. (#87) -
- Removed
validate_database_file_entry,validate_ds_to_write_to_disk,validate_fileandvalidate_treefollowing scheduled deprecation. (#88)
- Removed
-
Simplified the API in many places.
This was an attempt to group things which are passed through
and to make the injectable behaviour clearer throughout.
Specific changes:- Interfaces that now take a [
FrequencyMetadataKeys][input4mips_validation.inference.from_data.FrequencyMetadataKeys] rather thanfrequency_metadata_keyandno_time_axis_frequency:- [
DataReferenceSyntax.validate_file_written_according_to_drs][input4mips_validation.cvs.drs.DataReferenceSyntax.validate_file_written_according_to_drs] - [
Input4MIPsDatabaseEntryFile.from_file][input4mips_validation.database.database.Input4MIPsDatabaseEntryFile.from_file] - [
create_db_file_entries][input4mips_validation.database.creation.create_db_file_entries] - [
get_validate_database_file_entry_result][input4mips_validation.validation.database.get_validate_database_file_entry_result]
- [
- Interfaces that now take a [
XRVariableProcessorLike][input4mips_validation.xarray_helpers.variables.XRVariableProcessorLike] rather thanbnds_coord_indicators:- [
Input4MIPsDataset.write][input4mips_validation.dataset.dataset.Input4MIPsDataset.write] - [
ds_from_iris_cubes][input4mips_validation.xarray_helpers.iris.ds_from_iris_cubes] - [
get_ds_to_write_to_disk_validation_result][input4mips_validation.validation.datasets_to_write_to_disk.get_ds_to_write_to_disk_validation_result] - [
get_validate_file_result][input4mips_validation.validation.file.get_validate_file_result]
- [
- Interfaces that now take both a [
FrequencyMetadataKeys][input4mips_validation.inference.from_data.FrequencyMetadataKeys] rather thanfrequency_metadata_keyandno_time_axis_frequencyand a [XRVariableProcessorLike][input4mips_validation.xarray_helpers.variables.XRVariableProcessorLike] rather thanbnds_coord_indicators:- [
get_validate_tree_result][input4mips_validation.validation.tree.get_validate_tree_result] - [
validate_database_entries][input4mips_validation.validation.database.validate_database_entries]
- [
(#89)
- Interfaces that now take a [
🆕 Features
-
Added v6.6.0 of the input4MIPs CVs as a known CV source. (#84)
-
Added [
input4mips_validation.testing.get_valid_out_path_and_disk_ready_ds][input4mips_validation.testing.get_valid_out_path_and_disk_ready_ds]. (#85) -
Added the [
xarray_helpers.variables][input4mips_validation.xarray_helpers.variables] module
to help with extracting the variables from an xarray object. (#87) -
- Added [
FrequencyMetadataKeys][input4mips_validation.inference.from_data.FrequencyMetadataKeys] - Added [
XRVariableHelper][input4mips_validation.xarray_helpers.variables.XRVariableHelper]
(#89)
- Added [
-
Added Python-equivalent APIs for our CLI commands, see
[validate_file][input4mips_validation.cli.validate_file],
[validate_tree][input4mips_validation.cli.validate_tree],
[db_create][input4mips_validation.cli.db.db_create],
[db_add_tree][input4mips_validation.cli.db.db_add_tree]
and [db_validate][input4mips_validation.cli.db.db_validate]. (#90) -
Added validation of the "Conventions" attribute via [
input4mips_validation.validation.Conventions][input4mips_validation.validation.Conventions] (#91) -
Added [
input4mips_validation.cvs.Input4MIPsCVs.validate_activity_id][input4mips_validation.cvs.Input4MIPsCVs.validate_activity_id] and [input4mips_validation.cvs.exceptions][input4mips_validation.cvs.exceptions]. (#92) -
Added [
input4mips_validation.cvs.Input4MIPsCVs.validate_source_version][input4mips_validation.cvs.Input4MIPsCVs.validate_source_version] and [input4mips_validation.cvs.exceptions.ValueInconsistentWithCVsError][input4mips_validation.cvs.exceptions.ValueInconsistentWithCVsError]. (#93) -
Added [
input4mips_validation.cvs.Input4MIPsCVs.validate_contact][input4mips_validation.cvs.Input4MIPsCVs.validate_contact]. (#94) -
Added [
input4mips_validation.validation.comment.validate_comment][input4mips_validation.validation.comment.validate_comment]. (#95)
🎉 Improvements
- Added headers to the default pooch downloader to workaround readthedocs/readthedocs.org#11763.
The downloader is injectable, so this behaviour can be overridden if desired. (#84) - If a required attribute is missing during validation, we now raise the more explicit [
MissingAttributeError][input4mips_validation.validation.exceptions.MissingAttributeError], rather than aKeyError. (#86)
📚 Improved Documentation
- Updated the docs to use v6.6.0 of the CVs rather than a specific SHA. (#84)
🔧 Trivial/Internal Changes
Changes
- 56751d8 bump: version 0.15.1a1 -> 0.16.0
- 5f6d2b0 CHANGELOG
- f414248 Pass tests
- 06b4aee Pass tests
- 37fada4 Add failing tests
- f716f23 Fix up docs
- 7fb400e Fix up test
- 22a1249 Update regression tests again
- 65010bd Update regression tests
- b3ae2d8 CHANGELOG
- a861caa Pass tests
- 925c263 Add failing tests
- 8a93852 Update regression tests
- cb1bc65 CHANGELOG
- 2461393 Pass tests
- f398a56 Add failing tests
- 13728f2 Update regression tests again
- b4d1f28 Update regression tests
- 08e7e45 Update CHANGELOG
- c2670c8 CHANGELOG
- b08febc Pass tests
- 77de30f Add failing tests
- 184f8dd Shuffle more clearly
- b3b3770 Start making notes
- 1b9b055 mypy
- 83498ec CHANGELOG
- b7e9f69 Pass tests
- 9c77b67 Pass unit tests
- b7ff683 Add failing tests
- 4545ca8 CHANGELOG
- b392204 Add Python API for rest of CLI commands
- aaa36c5 Add Python API for rest of db CLI commands
- 9983fb6 Add Python API for db_create_command
- b39b65b CHANGELOG
- 23399a4 Fix up frequency metadata keys handling
- f503a81 Fix up bnds_coord_indicator usage
- 93f3ec5 Clean up
- 1235d10 Fix up imports
- d2c0978 CHANGELOG
- baf73d9 Deprecate functions
- 0e363d7 Fix up CHANGELOG
- a1974f2 Add more tests
- 9b37cea mypy
- b8fff8d Sort out tests after renaming
- 8fc0733 Pass unit tests
- 86c7a62 Add failing tests
- 2576843 Fix CHANGELOG
- 0fff911 CHANGELOG
- acc091f Add tracking ID tests
- be9ace4 Add creation_date tests
- f33ae52 Docs and CHANGELOG
- 13807a2 Add basic integration test for validation
- fa13af8 CHANGELOG
- 6431a69 Fix tests
- ea94680 Try updating RtD workflow
- b8840f4 Rename changelog category
- 18105c4 Finish off fix ups
- f375d09 CHANGELOG
- ea27ea9 Add headers to download queries to workaround readthedocs/readthedocs.org#11763
- 2023b84 CHANGELOG
- 305e071 Try updating docs
- f8704b8 UPdate lock file
- 0a046a2 bump(pre-release): version 0.15.0 > 0.15.1a1
v0.15.0
Announcements
- We have updated the package to be more in line with the DRS description. This is a breaking change. For full details, please see below.
Changelog
⚠️ Breaking Changes
- Updated to better be in line with the DRS description.
The DRS makes no comment on the values in the directory names,
hence we now make no assumptions and put no requirements on characters used in directory names.
The restriction to only a-z, A-Z, 0-9 and the hyphen plus special use of the underscore
is now only applied to file names.
As a result, files with variables that have underscores in their names
are now written with underscores in their directories, but not in their file name.
For example,
.../mon/mole-fraction-of-methane-in-air/gn/.../mole-fraction-of-methane-in-air_input4MIPs_GHGConcentrations_CMIP_CR-CMIP-0-2-0_gn_200001-201012.nc
is now written as
.../mon/mole_fraction_of_methane_in_air/gn/.../mole-fraction-of-methane-in-air_input4MIPs_GHGConcentrations_CMIP_CR-CMIP-0-2-0_gn_200001-201012.nc. (#83)
🐛 Bug Fixes
- Fixed a bug in
[validate_file_written_according_to_drs][input4mips_validation.cvs.drs.DataReferenceSyntax.validate_file_written_according_to_drs]
which caused it to break if the file contained metadata which was not a string. (#83)
🔧 Trivial/Internal Changes
Changes
- 19a32ad bump: version 0.14.1a1 -> 0.15.0
- 1c2db42 CHANGELOG pt 3
- b35b062 Test handling of files that have non-string attributes
- 659bee1 Clarify note in drs
- 9cc9df6 CHANGELOG pt 2
- 081d8f1 CHANGELOG pt 1
- ae764d3 Update iris stubs
- c864890 Final comment
- 5ffe306 Workaround for non-string values in global metadata
- 7fb4b13 Fix up tests
- 18da4b8 Pass unit tests
- 3b5e735 Add test of hyphen underscore variable handling
- 6891412 Pass tests
- 4a127fd Add failing test
- cb51f96 Fix up typos in CHANGELOG
- 74ef598 CHANGELOG
- 0d330eb Bump mkdocs jupyter version
- 9b8f7ea bump(pre-release): version 0.14.0 > 0.14.1a1
v0.14.0
Announcements
- We have improved the API, particularly for writing data to disk. This gives you much more control over writing and the ability to make changes at multiple steps along the way (which can be necessary, given the complexity of the netCDF conversion). However, this also introduced quite a number of breaking changes. For details, see below.
Changelog
⚠️ Breaking Changes
-
- The function signatures for [
input4mips_validation.dataset.Input4MIPsDataset.from_data_producer_minimum_information][]
and [input4mips_validation.dataset.Input4MIPsDataset.from_data_producer_minimum_information_multiple_variable][]
have now been simplified to use an injectable [prepare_func][input4mips_validation.dataset.dataset.PrepareFuncLike][],
the default value of which is [input4mips_validation.dataset.dataset.prepare_ds_and_get_frequency][].
This makes the API simpler and gives the user more control.
However, it is a breaking change. - We removed fine-grained control of writing to disk when using [
Dataset.write][input4mips_validation.dataset.Input4MIPsDataset.write]
and [input4mips_validation.io.write_ds_to_disk][].
Instead, use [Dataset.get_out_path_and_disk_ready_dataset][input4mips_validation.dataset.Input4MIPsDataset.get_out_path_and_disk_ready_dataset]
or [input4mips_validation.io.prepare_out_path_and_cubes][] then write using you own writing function
(typically [iris.save][] instead). - Renamed
bounds_dimtobounds_indicatorin [input4mips_validation.dataset.dataset.handle_ds_standard_long_names][].
(#80)
- The function signatures for [
🆕 Features
-
- Added [
Dataset.get_out_path_and_disk_ready_dataset][input4mips_validation.dataset.Input4MIPsDataset.get_out_path_and_disk_ready_dataset]
and [input4mips_validation.io.prepare_out_path_and_cubes][]
to permit finer-grained control of file preparation and writing. - Added [
input4mips_validation.dataset.dataset.add_bounds][].
(#80)
- Added [
🐛 Bug Fixes
- Fixed up passing of input arguments to underlying functions in
input4mips-validation validate-tree(#75) - [
input4mips_validation.cvs.load_cvs][] now supports variables of typePathfor thecv_sourceargument.
As part of this fix, [input4mips_validation.cvs.loading_raw.get_raw_cvs_loader][] now also supports variables of typePathfor thecv_sourceargument. (#80)
🔧 Trivial/Internal Changes
Changes
- e3a445e bump: version 0.13.3a1 -> 0.14.0
- f68736e Remove script
- 9f3462c Fix up some more tests
- 95c9841 Fix changelog entries
- 946a910 Fix changelog entries
- e8980de Fix docs
- 953a673 Update CHANGELOG
- 198e2a9 Add changelog placeholders
- 6ee990e Add test of path handling for cv_source
- a516c1f Fix up general handling
- 0b5e0f0 CHANGELOG
- 59cfbd9 First fix ups
- 48df3cd Allow loading CVs from a Path
- d7c9d14 Fix up pinning for conda
- db6fb0d CHANGELOG
- 2522862 Fix up argument passing
- 64ff0ae bump(pre-release): version 0.13.2 > 0.13.3a1