Changelog#
Versions follow Semantic Versioning (<major>.<minor>.<patch>).
Backward incompatible (breaking) changes will only be introduced in major versions with advance notice in the Deprecations section of releases.
Input4MIPs validation v0.20.1 (2025-10-01)#
🐛 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#
Input4MIPs validation v0.20.0 (2025-09-04)#
🆕 Features#
- Added
input4mips_validation.cvs.author.Author,input4mips_validation.validation.emailandinput4mips_validation.validation.orcidto support the inclusion of parsable author information in the source ID CVs. (#116)
🎉 Improvements#
- Added the
authorattribute toinput4mips_validation.cvs.source_id.SourceIDValuesto 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#
Input4MIPs validation v0.19.1 (2025-02-08)#
🎉 Improvements#
- Added the ability to handle data sets with string variables, like region.
The key logic improvement is in
XRVariableProcessorLike.get_ds_variables, which now excludes any non-number variables from the dataset's variables. (#113)
Input4MIPs validation v0.19.0 (2024-12-26)#
⚠️ Breaking Changes#
- Removed
input4mips_validation.database.creation.create_db_file_entry_with_logging, this function was never meant to be released. (#111)
Input4MIPs validation v0.18.0 (2024-12-23)#
⚠️ Breaking Changes#
- Changed the interface to
input4mips_validation.database.creation.create_db_file_entry_with_logging. 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 toinput4mips_validation.parallelisation.run_parallel. (#107)
🎉 Improvements#
- Added
input4mips_validation.parallelisationto assist with simplifying parallelisation, mainly for internal use. (#106) - Added
xr_load_kwargstoinput4mips_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)
Input4MIPs validation v0.17.1 (2024-12-22)#
🐛 Bug Fixes#
- Fixed up addition of bounds when using climatology data (time bounds are no longer added). (#104)
Input4MIPs validation v0.17.0 (2024-12-22)#
⚠️ Breaking Changes#
-
input4mips_validation.inference.from_data.infer_time_start_time_endrenamed toinput4mips_validation.inference.from_data.infer_time_start_time_end_for_filename.
input4mips_validation.inference.from_data.create_time_rangerenamed toinput4mips_validation.inference.from_data.create_time_range_for_filename.
(#103)
🆕 Features#
- Added
input4mips_validation.validation.external_variables.validate_external_variables. (#98) - Added
input4mips_validation.validation.frequency.validate_frequency. (#100) - Added support for data that represents a monthly climatology. (#103)
🎉 Improvements#
- Split
input4mips_validation.validation.allowed_charactersinto its own module. (#98) - Added
input4mips_validation.inference.from_data.BoundsInfoand 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(and thereforeinput4mips_validation.cvs.loading.load_cvs) when theINPUT4MIPS_VALIDATION_CV_SOURCE_FORCE_DOWNLOADenvironment variable was set. (#101)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.16.0 (2024-12-16)#
⚠️ 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
FrequencyMetadataKeysrather thanfrequency_metadata_keyandno_time_axis_frequency: - Interfaces that now take a
XRVariableProcessorLikerather thanbnds_coord_indicators: - Interfaces that now take both a
FrequencyMetadataKeysrather thanfrequency_metadata_keyandno_time_axis_frequencyand aXRVariableProcessorLikerather thanbnds_coord_indicators:
(#89)
🆕 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. (#85) - Added the
xarray_helpers.variablesmodule to help with extracting the variables from an xarray object. (#87) -
- Added
FrequencyMetadataKeys
- Added
- Added
XRVariableHelper
(#89)
- 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 (#91)
- Added input4mips_validation.cvs.Input4MIPsCVs.validate_activity_id and input4mips_validation.cvs.exceptions. (#92)
- Added input4mips_validation.cvs.Input4MIPsCVs.validate_source_version and input4mips_validation.cvs.exceptions.ValueInconsistentWithCVsError. (#93)
- Added input4mips_validation.cvs.Input4MIPsCVs.validate_contact. (#94)
- Added input4mips_validation.validation.comment.validate_comment. (#95)
🎉 Improvements#
- Added headers to the default pooch downloader to workaround https://github.com/readthedocs/readthedocs.org/issues/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, 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#
Input4MIPs validation v0.15.0 (2024-11-11)#
⚠️ 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.ncis 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_drswhich caused it to break if the file contained metadata which was not a string. (#83)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.14.0 (2024-11-05)#
⚠️ Breaking Changes#
-
- The function signatures for
input4mips_validation.dataset.Input4MIPsDataset.from_data_producer_minimum_informationandinput4mips_validation.dataset.Input4MIPsDataset.from_data_producer_minimum_information_multiple_variablehave now been simplified to use an injectable [prepare_func][input4mips_validation.dataset.dataset.PrepareFuncLike][], the default value of which isinput4mips_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.
- The function signatures for
- We removed fine-grained control of writing to disk when using
Input4MIPsDataset.writeandinput4mips_validation.io.write_ds_to_disk. Instead, useInput4MIPsDataset.get_out_path_and_disk_ready_datasetorinput4mips_validation.io.prepare_out_path_and_cubesthen write using you own writing function (typicallyiris.saveinstead). - Renamed
bounds_dimtobounds_indicatorininput4mips_validation.dataset.dataset.handle_ds_standard_long_names.
(#80)
🆕 Features#
-
- Added
Input4MIPsDataset.get_out_path_and_disk_ready_datasetandinput4mips_validation.io.prepare_out_path_and_cubesto permit finer-grained control of file preparation and writing.
- Added
- Added
input4mips_validation.dataset.dataset.add_bounds.
(#80)
🐛 Bug Fixes#
- Fixed up passing of input arguments to underlying functions in
input4mips-validation validate-tree(#75) input4mips_validation.cvs.load_cvsnow supports variables of typePathfor thecv_sourceargument. As part of this fix,input4mips_validation.cvs.loading_raw.get_raw_cvs_loadernow also supports variables of typePathfor thecv_sourceargument. (#80)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.13.2 (2024-10-16)#
🎉 Improvements#
- Improved the error message if regexp parsing of paths fails for a given DRS. (#74)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.13.0 (2024-09-30)#
🆕 Features#
- Add
--continue-on-errorflag toinput4mips-validation upload-ftp(#69) - Added validation of the tracking_id attribute, see
input4mips_validation.validation.tracking_id.validate_tracking_id. (#70)
🐛 Bug Fixes#
- Fixed total failure of validation if an expected attribute wasn't in the file being validated. (#70)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.12.0 (2024-08-29)#
🗑️ Deprecations#
- Deprecated [
validate_database_file_entry], [validate_ds_to_write_to_disk], [validate_file] and [validate_tree]. See the docs for each function and deprecation warnings for recommended alternatives. (#66)
🆕 Features#
- Added the
--output-htmlflag toinput4mips-validation validate-tree. This allows you to output the results of the validation as HTML, which provides easier exploration of the failures. (#66)
📚 Improved Documentation#
- Improved documentation of our command-line interface, particularly how to configure logging. (#65)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.11.4 (2024-08-23)#
🆕 Features#
- Add "doi" to the list of fields tracked by our database entries. (#64)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.11.3 (2024-08-06)#
🎉 Improvements#
- Made it explicit that cftime and typing-extensions are required (#59)
🐛 Bug Fixes#
- Fixed up the writing of the
creation_timeattribute and datetime metadata inference to use the expected time format (#60)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.11.2 (2024-08-05)#
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.11.1 (2024-08-03)#
🎉 Improvements#
- Added support for data without a time axis to
from_data_producer_minimum_informationandfrom_data_producer_minimum_information_multiple_variable. (#56)
🐛 Bug Fixes#
- Fixed the type hint for
datetime_end,datetime_startandtime_range. These fields will now serialise and de-serialise correctly. Previously, if these fields wereNone, they were serialised and de-serialised as strings. (#56)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.11.0 (2024-08-02)#
⚠️ Breaking Changes#
-
- Removed the
--create-db-entryflag from thevalidate-filecommand. Use the newly addedinput4mips-validation dbcommands to control the database instead.
- Removed the
- Our databases our now multi-file, one file per file entry. This makes it much easier to track changes to the database.
To load a database from a directory of files, use
load_database_file_entries - Changed the function signature of
input4mips_validation.cvs.loading.load_cvs. Now it simply expects thecv_sourcerather than requiring aRawCVLoaderas input.
(#55)
🆕 Features#
- Added the
--allow-cf-checker-warningsflag to thevalidate-fileandvalidate-treecommands. This allows the validation to pass, even if the CF-checker raises a warning. This was added because the CF-checker's warnings are sometimes overly strict. (#52) -
-
Added
input4mips-validation dbcommand group for handling database creation and manipulation. This includes: -
input4mips-validation db createfor creating new databases input4mips-validation db add-treefor adding files from a tree to an existing databasesinput4mips-validation db validatefor updating the validation status of the entries in a database
-
-
Added
input4mips_validation.validation.databasefor database validation -
Added
input4mips_validation.logging_configto support passing of logging configuration between parallel processes. We're not sure if this is a great solution. If you have another solution, PRs welcome!
(#55)
🎉 Improvements#
-
- Updated the type and default value of
Input4MIPsDatabaseEntryFile.validated_input4mipsto clarify the different states of validation.
- Updated the type and default value of
- Parallelised
create_db_file_entries
(#55)
🐛 Bug Fixes#
- Fixed a missing f-string marker in
validate-tree's logging. (#52) -
- Set
use_cftime=Truewhenever we callxr.open_datasetto avoid spurious warnings
- Set
- Only pass the directory to
extract_metadata_from_pathinDRS.validate_file_written_according_to_drs. This helps reduce the chance of incorrecetly parsing the metadata.
(#55)
📚 Improved Documentation#
- Clarified the meaning of the
timestampandversionfields in our database entries (#54) - Added documentation for how to manage a database (#55)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.10.2 (2024-07-28)#
🐛 Bug Fixes#
- Make loguru-config an optional dependency in
pyproject.tomltoo (#50)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.10.1 (2024-07-28)#
🎉 Improvements#
- Clarify handling of dry run in
upload_ftp(#45) - loguru-config is now an optional dependency. This makes it possible to install the package from conda without things exploding, as loguru-config is not available on conda. This may be changed in future, if loguru-config is released on conda (relevant MR here: https://github.com/conda-forge/staged-recipes/pull/27110) (#48)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.10.0 (2024-07-27)#
⚠️ Breaking Changes#
-
- Removed
--verboseoption from theinput4mips-validationcommand
- Removed
- Moved logging to
input4mips_validation.logging
(#40)
🆕 Features#
-
- Added
--versionflag to theinput4mips-validationcommand
- Added
-
Added
--no-loggingto theinput4mips-validationcommand to disable logging - Added
--logging-configto theinput4mips-validationcommand to allow the user to specify the path to the logging configuration file -
Added
--logging-levelto theinput4mips-validationcommand to allow the user to simply specify the logging level to use. Note that--logging-configtakes precedence over this flag. -
Fixed up the logging levels throughout the CLI and associated commands
-
Added the
Input4MIPsDataset.non_input4mips_metadataattribute to handle metadata that is not part of the known input4MIPs keys -
Added
Input4MIPsDataset.from_dsto allow easy creation from a loaded xarray.Dataset -
Added the
--rglob-inputoption to better control files of interest. This appplies to bothinput4mips-validation validate-treeandinput4mips-validation create-db
(#40)
- - Added the input4mips-validation upload-ftp command
- Added input4mips_validation.upload_ftp
(#43)
🎉 Improvements#
-
- Added support for fields used by input4MIPs database:
- comment
- comment_post_publication
- data_node
- esgf_dataset_master_id
- filepath
- latest
- publication_status
- replica
- sha256
- timestamp
- validated_input4mips
- xlink
-
Made all metadata-related classes frozen so they can be hashed, which makes sorting and comparison easier (and has almost no downsides as these classes do not generally need to be changed once created, and if they do need to be changed, that can be done with attrs.evolve).
-
Made commit
52841b0117474efd2705a083c21b3760531974f3a known registry for the raw CVs.
(#40)
🐛 Bug Fixes#
-
- Fixed a bug in the behaviour of
input4mips-validation validate-file's--write-in-drsflag. If this flag is used, this command now fixes file names too and will update the tracking ID and creation ID if anything about the file (including its name) is changed. The command now also raises an error if you try overwrite an existing file.
- Fixed a bug in the behaviour of
- Removed the product and region properties from the minimum dataset producer metadata related classes
- Replaced all uses of xarray.load_dataset with xarray.open_dataset. The latter doesn't load the file's data into memory, hence is much faster (especially for large files).
- Fixed the behaviour of
Input4MIPsDatabaseEntryFile.from_file. Now, if there is a clash between metadata, a warning is logged but the existing value is used (i.e. the value from higher-priority sources is used) rather than an error being raised.
(#40)
📚 Improved Documentation#
- Updated README so that the snippet comments don't show up (#37)
-
- Added docs about project status to the README
- Added docs about preparing a file in the how-to guides. How to upload will come in the next MR.
(#40) - Added documentation about how to upload to an FTP server, and cross-linked these with the rest of the docs (#43)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.9.0 (2024-07-24)#
🆕 Features#
- Added the
validate-treeandcreate-dbcommands.
These allow you to validate a tree of files and create a database of the files in the tree.
Use the following commands to get help:
input4mips-validation validate-tree --helpinput4mips-validation create-db --help
(#36)
📚 Improved Documentation#
-
- Updated the installation instructions now that we have a conda package.
- Generally cleaned up the docs
(#36)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.8.1 (2024-07-22)#
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.8.0 (2024-07-22)#
⚠️ Breaking Changes#
- Completely re-wrote the package.
The APIs are similar, but not identical. Given there are no users, we don't provide a migration guide.
Key changes:
- cleaned up the API to make clearer the different elements
- changed dev tooling to supporting conda packages, because we needed iris
(#31)
📚 Improved Documentation#
- Updated README badges (#28)
- Updated conda install workflow README badge (#29)
- Updated licence badge and tweaked badge layout (#30)
🔧 Trivial/Internal Changes#
Input4MIPs validation v0.7.0 (2024-07-19)#
Features#
- Added configuration so that a locked version of the package will be built too.
The instructions in the README for installation from PyPI should now be valid. The instructions for installation from conda are still waiting on https://github.com/conda-forge/staged-recipes/pull/26986. (#25)
Bug Fixes#
- Fixed up version number, putting it back in line with PyPI (#27)
Trivial/Internal Changes#
Input4MIPs validation v0.5.2 (2024-07-19)#
Trivial/Internal Changes#
Input4MIPs validation v0.5.1 (2024-07-19)#
Trivial/Internal Changes#
Input4MIPs validation v0.6.0 (2024-07-18)#
Breaking Changes#
- Re-named {py:attr}
input5mips_validation.cvs_handling.input4MIPs.activity_id.ActivityIDValues.urlto {py:attr}input4mips_validation.cvs_handling.input4MIPs.activity_id.ActivityIDValues.URLi.e. "url" --> "URL" (#17) - Loosened dependency pins (#21)
Features#
- Added handling of the institution ID controlled vocabulary (#16)
- Added handling of the futher_info_url within the context of the controlled vocabulary (#18)
Input4MIPs validation v0.5.0 (2024-06-25)#
Breaking Changes#
- Completely re-wrote the package in an attempt to better handle the controlled vocabularies (CVs).
The key module is still {py:mod}input4mips_validation.dataset.
However, we now also have {py:mod}input4mips_validation.cvs_handling, which we use for sanely handling the CVs.
This package may be split out into a separate package in future. (#15)
Input4MIPs validation v0.4.0 (2024-06-20)#
Bug Fixes#
-
- Pinned input4MIPs CVs source files to avoid unexpected breaking changes
- Pinned numpy < 2 to fix up install
(#13)
Input4MIPs validation v0.3.4 (2024-05-24)#
Trivial/Internal Changes#
Input4MIPs validation v0.3.3 (2024-05-23)#
Trivial/Internal Changes#
Input4MIPs validation v0.3.2 (2024-05-22)#
Trivial/Internal Changes#
Input4MIPs validation v0.3.1 (2024-04-23)#
Improvements#
- Disabled grid validation while we wait to work out what it means (#9)
Input4MIPs validation v0.3.0 (2024-04-23)#
Breaking Changes#
- Switched to using typer for our CLI.
This did not change the CLI, but it did include re-arranging a number of internal modules, hence this is a breaking change. (#7)
Features#
- Add support for yearly time bounds to {py:func}
input4mips_validation.xarray_helpers.add_time_bounds(#6)
Bug Fixes#
- Fixed {py:func}
input4mips_validation.controlled_vocabularies.inference.infer_frequencyso it can handle the switch from Julian to Gregorian calendars (which affects the number of days in October 1582). (#6)
Trivial/Internal Changes#
Input4MIPs validation v0.2.1 (2024-02-15)#
Bug Fixes#
- Loosened dependencies (#5)
Input4MIPs validation v0.2.0 (2024-02-09)#
Features#
- Add structure required to support basic command-line interface.
The command-line interface provides the command input4mips-validation validate-file. (#2)
Bug Fixes#
- Added LICENCE to the project (#3)
Input4MIPs validation v0.1.1 (2024-02-06)#
No significant changes.