Changelog from esgprep 2.x to 3.0
esgprep version 3.0 introduces significant changes from the previous Python 2 version. This document
summarizes what’s new and changed.
Note
Version 3.0 is a Python 3.12+ rewrite with modernized architecture and dependencies. Most changes are automatic and don’t require modifications to your workflow. This is provided for informational purposes to help you understand the improvements.
Breaking Changes
Removed Commands
The following commands have been removed in version 3.0:
esgfetchini- Configuration file fetching
esgfetchtables- CMOR table fetching
esgcheckvocab- Vocabulary checking
Remaining Commands
The core data preparation commands remain available:
esgdrs- DRS tree management
esgmapfile- Mapfile generation
Migration from esgfetchini
What changed:
The esgfetchini command previously downloaded esg.<project_id>.ini configuration files from the ESGF GitHub
repository. This functionality is now integrated into the esgvoc library.
Old workflow (version 2.x):
# Fetch configuration files
$> esgfetchini --project cmip6
$> esgfetchini --project cmip5 cordex
New workflow (version 3.0+):
No action required. The esgvoc library automatically handles configuration and vocabulary management:
# Just use esgdrs or esgmapfile directly
$> esgdrs make --project cmip6 /path/to/data/
$> esgmapfile make --project cmip6 /path/to/data/
What happens behind the scenes:
esgvocautomatically fetches and caches project definitionsVocabularies are updated automatically when needed
No manual configuration file management required
Cache is stored locally for offline use
Advanced configuration:
If you need to customize vocabulary sources or manage caching, refer to the esgvoc documentation.
Migration from esgfetchtables
What changed:
The esgfetchtables command downloaded CMOR tables from PCMDI GitHub repositories. This functionality has been
removed as CMOR table management is outside the scope of esgprep.
Old workflow (version 2.x):
# Fetch CMOR tables
$> esgfetchtables --project cmip6
$> esgfetchtables --branch master --table-dir /path/to/tables/
New workflow (version 3.0+):
CMOR table management should be handled separately using appropriate tools:
Download tables directly from PCMDI repositories
Use CMOR-specific tools for table validation
Manage tables according to your project’s requirements
esgprep focuses on DRS tree management and mapfile generation, not on CMOR table management.
Migration from esgcheckvocab
What changed:
The esgcheckvocab command validated facet values against configuration files. This functionality is now integrated
into the core esgdrs and esgmapfile commands through the esgvoc library.
Old workflow (version 2.x):
# Check vocabulary compliance
$> esgcheckvocab --project cmip6 --directory /path/to/data/
$> esgcheckvocab --project cmip6 --incoming /path/to/incoming/
$> esgcheckvocab --project cmip6 --dataset-list datasets.txt
New workflow (version 3.0+):
Vocabulary checking is now automatic when using esgdrs or esgmapfile:
# Vocabulary is automatically validated during processing
$> esgdrs list --project cmip6 /path/to/data/
$> esgmapfile make --project cmip6 /path/to/data/
What happens behind the scenes:
esgvocvalidates facet values automaticallyInvalid values are reported as errors during processing
No separate validation step required
Validation uses the same controlled vocabularies as before
Python Version Requirements
- Version 2.x:
Python 2.6+ (Python 2.7 recommended)
- Version 3.0+:
Python 3.12+ (required)
You must upgrade your Python environment to Python 3.12 or higher. See Installation for details.
Dependency Changes
Removed dependencies:
ESGConfigParser- Replaced byesgvoc
tqdm- Progress bars modernized
New dependencies:
esgvoc>= 2.2.1 - Controlled vocabulary and configuration management
python-levenshtein>= 0.27.1 - Enhanced string matchingUpdated versions of
numpy,netCDF4, and other core libraries
All dependencies are installed automatically via pip install esgprep.
Configuration File Migration
Old system (version 2.x):
Configuration stored in /esg/config/esgcet/ or custom directories:
esg.ini- General configuration
esg.<project_id>.ini- Project-specific configuration
New system (version 3.0+):
Configuration managed by esgvoc:
No manual file management required
Vocabularies cached automatically
Updates handled transparently
If you have custom esg.<project_id>.ini files, you will need to work with the esgvoc maintainers to integrate
them into the vocabulary system. See Configuration for details.
Command-Line Argument Changes
Most command-line arguments remain the same between versions. Key changes:
Removed arguments:
-i, --ini- Configuration directory (no longer needed withesgvoc)
Unchanged arguments:
-p, --project- Project identifier
-l, --log- Logfile location
-d, --debug- Debug mode
--max-processes- Multiprocessing control
--color, --no-color- Color output controlAll filter arguments (
--ignore-dir,--include-file,--exclude-file)
Quick Reference
Old Command (2.x) |
New Approach (3.0+) |
|---|---|
|
Automatic via |
|
Use CMOR tools directly |
|
Automatic in |
|
|
|
|
Getting Help
If you encounter issues during migration:
Check the updated documentation for Generic usage, Manage local data through the DRS, and Generate mapfile for ESGF publication
Review the Configuration section for
esgvocdetailsReport issues on GitHub
Consult the esgvoc documentation for vocabulary management