- CMR native IDs generated from variable names with spaces in them will replace those space characters with underscores to avoid errors when trying to ingest such variables.
- The
python-cmr
requirement is updated to v0.12.0, which adds type hints for that package. A couple of type hints inearthdata-varinfo
have been updated accordingly. - The
numpy
requirement has been relaxed to allow broader compatibility with client software. Note: This enables Python 3.12 compatibility. - To ensure compatibility with Python 3.12, the tests are now run using
pytest
. This allows JUnit style output to be produced, as the previously usedunittets-xml-runner
package was not compatible with Python 3.12. The tests themselves are still written using classes and syntax fromunittest
. The CI/CD for running the tests has been updated to also run the tests under Python 3.12.
The configuration file schema for earthdata-varinfo
is significantly updated
in this release. For more information, see the release notes for schema v1.0.0
in config/CHANGELOG.md
.
- Groups within a NetCDF-4 or DMR file are now assigned to the
VarInfo*.groups
dictionary, allowing for their metadata attributes to be accessed after parsing an input file.
CFConfig.get_cf_attributes
has been renamedCFConfig.get_metadata_overrides
, as there are now only overrides to be returned from this method. Calls toCFConfig.get_metadata_overrides
now must specify a variable path. All overrides from a configuration file for a given collection are now retrievable from the newly publicCFConfig.metadata_overrides
class attribute.- Metadata overrides retrieved for a matching file path are ordered such that the most specific applicable override to the variable takes precedence. For example, when requesting the value of the "units" metadata attribute for variable "/nested/variable", an applicability rule that exactly matches this variable path will take precedence over rules matching to either the group, or all variables in the file.
- Handling of nested
Applicability_Groups
has been removed from theCFConfig
class, as the configuration file no longer nests these items in overrides.
CFConfig._cf_supplements
has been deprecated in favour of specifying all in-file metadata changes via aMetadataOverrides
item (formerlyCFOverrides
) instead.
The VarInfoBase.get_missing_variable_attributes
method has been added to allow
someone to get metadata attributes from the configuration file for variables
that are absent from a file. An example usage is when a CF Convention grid
mapping variable is missing from a source file.
The VarInfoBase.get_references_for_attribute
method has been added to retrieve
all unique variable references contained in a single metadata attribute for a
list of variables. For example, retrieving all references listed under the
coordinates metadata attribute.
The generate_collection_umm_var
function in earthdata-varinfo updated to
support an optional kwarg config_file
for a configuration file, to be able to
override known metadata errors.
The requests
package has been added as an explicit dependency of the package.
Additionally, black code formatting has been applied to the entire repository.
This version of earthdata-varinfo
updates varinfo.cmr_search
to include
functionality to get a users EDL token given a LaunchPad token with
get_edl_token_from_launchpad
and get_edl_token_header
.
get_edl_token_from_launchpad
returns a users EDL token given a LaunchPad
token and CMR environment and get_edl_token_header
returns the appropriate header
prefix for each respective token.
This version of earthdata-varinfo
updates the value of the LongName
attribute in generated UMM-Var records to use the value of the CF-Convention
long_name
attribute for a variable, if it is present in the file. If this
attribute is not present in the in-file metadata, then the full path to the
variable (without the leading /
) is used as before.
Fixed deployment issues
This version of earthdata-varinfo
improves the functionality of the
varinfo.get_science_variables
function with varinfo.is_science_variable()
method.
This method returns true if a variable is a science variable by checking if
a variable contains dimension scale variables or if it contains coordinate references
or grid mapping attribute variables. This version also updates umm_var.get_umm_var
with get_umm_var_type
. This function adds the UMM-Var field "VariableType"
to a UMM-Var record if a variable is a science variable.
This version of earthdata-varinfo
adds functionality to publish records to
CMR, along with a single overarching function that wraps the search, download
and publication functionality into a single function for the convenience of the
end-user. Additionally, the function signatures for cmr_search.get_granules
and cmr_search.download_granule
have been updated to accept the full
Authorization
header, instead of a bearer token, so that they are also
compatible with LaunchPad tokens.
generate_umm_var.generate_collection_umm_var
is designed to be a single call for local workflows to find appropriate granules for a collection, download them, parse them and generate UMM-Var JSON, which can be optionally published to CMR.umm_var.publish_umm_var
ingests a single UMM-Var entry to CMRumm_var.publish_all_umm_var
ingests all of the UMM-Var entries from a given collection to CMR
This version of earthdata-varinfo
includes preliminary functionality to
streamline the process of creating UMM-Var records given information about a
collection in CMR:
- Added
cmr_search.py
to search CMR for granule URLs given collection information. - Added function
download_granule
tocmr_search.py
, to download a granule from a specified URL.
This version of earthdata-varinfo
contains all functionality previous
released as sds-varinfo==4.1.1
, but resets the version number to begin
semantic version numbers for earthdata-varinfo
at 1.0.0. Additional contents
to the repository include updated documentation and files outlined by the
NASA open-source guidelines.
For more information on internal releases prior to NASA open-source approval,
see legacy-CHANGELOG.md
.