Skip to main content

CCI Tagger

Static Badge Current Git Release PyPI version

CEDA Dependencies

Static Badge

Overview

This package provides a command line tool moles_esgf_tag to generate dataset tags for both MOLES and ESGF.

Installation

Create a Python virtual environment: Must be Python 3

python -m venv venv
source venv/bin/activate

Install the latest version of the library

git clone https://github.com/cedadev/cci-tag-scanner
cd cci-tag-scanner
pip install -e .

NOTE: As of 22nd Jan 2025 the cci-tag-scanner repository has been upgraded for use with Poetry version 2. This requires the use of an additional requirements_fix.txt patch while a solution for poetry dependencies in github is worked on. The above installation MUST be supplemented with:

pip install -r requirements_fix.txt

This is a temporary fix and will be removed when poetry is patched.

Command Line Script

This script is to be used to check what the tagger outputs when fed with the JSON files. This can be used to build the JSON files and check they are producing what you expect. This script also produces a moles_tags files to attach to this dataset.

Usage

moles_esgf_tag [-h] (-d DATASET | -f FILE | -j JSON_FILE) [--file_count FILE_COUNT] [-v]

You can tag an individual dataset, or tag all the datasets listed in a file. By default a check sum will be produces for each file.

Arguments:

-h, --help            show help message and exit

-d DATASET, --dataset DATASET
                      the full path to the dataset that is to be tagged. This option is used to tag a single
                      dataset.

-f FILE, --file FILE  the name of the file containing a list of datasets to process. This option is used for
                      tagging one or more datasets.

-j, --json_file       Use the JSON file to provide a list of datasets and also provide the mappings
                      which are used by the tagging code. Useful to test datsets and specific mapping files.

--file_count FILE_COUNT
                      how many .nc files to look at per dataset

-v, --verbose         increase output verbosity. Add more vs to increase verbosity.

Output

A number of files are produced as output:

  • esgf_drs.json contains a list of DRS and associated files. Will also list all files which could not generate a DRS
  • moles_tags.csv contains a list of dataset paths and vocabulary URLs
  • error.log contains a log of errors. This is appended to on each run so if you want a clean start, you will need to delete the file.

Examples

moles_esgf_tag -d /neodc/esacci/cloud/data/L3C/avhrr_noaa-16 -v
moles_esgf_tag -f datapath --file_count 2 -v

Check tags

This code generates a directory with HTML pages which can be used to interrogate the opensearch elasticsearch indices to check that the tags which you are expecting are being found. It also highlights files without DRSs

Usage

cci_check_tags [--conf CONF] [--output OUTPUT]

Arguments:

    --conf          Specify the configuration file. Defaults to use %(default)s' 
                    DEFAULT: cci_tagger/conf/tag_check.conf
                    
    --output        Directory to place the output files.
                    DEFAULT: html 

Output

  • index.html The main page listing all ECVs in the index
  • ecv/<ecv_name>.html ECV specific page. Lists all MOLES datasets in the index and displays details about them.

Breaking Changes

V2.0.0

  • Removed default terms file
  • Removed DRS version based on date

Metadata

Release files for cci-tag-scanner 2.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cci-tag-scanner 2.6.2
File Size Uploaded Provenance Actions
cci_tag_scanner-2.6.2.tar.gz 66.6 MB Without provenance Details for cci_tag_scanner-2.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cci-tag-scanner 2.6.2
File Interpreter ABI Platform Actions
cci_tag_scanner-2.6.2-py3-none-any.whl Python 3 none any Details for cci_tag_scanner-2.6.2-py3-none-any.whl

Total release size: 133.2 MB

Release files / cci_tag_scanner-2.6.2.tar.gz

Download URL cci_tag_scanner-2.6.2.tar.gz
Size 66.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b4424914ca03d79edb547cfe5d269518f26ed53dc7f9aca24100b510306fedbb
BLAKE2b-256 checksum
How to use checksums
edd0f76c9229f76c85f64914d35ad21b87d99c4fff565bd1a55b3c3324530d1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.9 Darwin/25.2.0

Release files / cci_tag_scanner-2.6.2-py3-none-any.whl

Download URL cci_tag_scanner-2.6.2-py3-none-any.whl
Size 66.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
59f7ae3c5da0d31a83d1831248fae5d70d01f0342f37de5dd3bebbfc2588a396
BLAKE2b-256 checksum
How to use checksums
1a3a74f52de3f69acb51f5257119ec69add60d27ff8ac79141372c088dc78715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.13.9 Darwin/25.2.0

Security for cci-tag-scanner 2.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.6.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page