From de55eb47cd703d27cc039785da0076531e34b162 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Tue, 23 May 2023 15:17:14 +0100 Subject: [PATCH 1/4] remove unneeded sphinxcontrib extension - `sphinxcontrib.jquery` (#2047) --- doc/api/esmvalcore.cmor.rst | 1 + doc/conf.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/api/esmvalcore.cmor.rst b/doc/api/esmvalcore.cmor.rst index 1f0758a73f..3e1f88a52e 100644 --- a/doc/api/esmvalcore.cmor.rst +++ b/doc/api/esmvalcore.cmor.rst @@ -7,6 +7,7 @@ Checking compliance ------------------- .. automodule:: esmvalcore.cmor.check + :no-inherited-members: :member-order: bysource Automatically fixing issues diff --git a/doc/conf.py b/doc/conf.py index 8696e7bc6b..a1fec6a06e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -67,8 +67,6 @@ 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', - # github.com/readthedocs/sphinx_rtd_theme/issues/1451 - 'sphinxcontrib.jquery', ] autodoc_default_options = { From 88827d64d794da435e44dbf938cb02581f8eaabd Mon Sep 17 00:00:00 2001 From: Bouwe Andela Date: Wed, 24 May 2023 14:11:26 +0200 Subject: [PATCH 2/4] Drop support for Python 3.8 (#2053) --- .github/workflows/install-from-conda.yml | 10 +++++----- .github/workflows/install-from-condalock-file.yml | 4 ++-- .github/workflows/install-from-pypi.yml | 10 +++++----- .github/workflows/install-from-source.yml | 8 ++++---- .github/workflows/run-tests-comment.yml | 4 ++-- .github/workflows/run-tests-monitor.yml | 4 ++-- .github/workflows/run-tests.yml | 4 ++-- environment.yml | 2 +- setup.py | 1 - 9 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/install-from-conda.yml b/.github/workflows/install-from-conda.yml index c8748df1b1..2ad481f6b4 100644 --- a/.github/workflows/install-from-conda.yml +++ b/.github/workflows/install-from-conda.yml @@ -15,12 +15,12 @@ name: Install from conda-forge # runs on a push on main and at the end of every day on: - # triggering on push without branch name will run tests everytime + # triggering on push without branch name will run tests every time # there is a push on any branch # turn it on only if needed push: branches: - - main + - main # run the test only if the PR is to main # turn it on if required # pull_request: @@ -35,9 +35,9 @@ jobs: strategy: matrix: # TODO add "3.11" once we have the package built - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] # fail-fast set to False allows all other tests - # in the worflow to run regardless of any fail + # in the workflow to run regardless of any fail fail-fast: false name: Linux Python ${{ matrix.python-version }} steps: @@ -75,7 +75,7 @@ jobs: runs-on: "macos-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] fail-fast: false name: OSX Python ${{ matrix.python-version }} steps: diff --git a/.github/workflows/install-from-condalock-file.yml b/.github/workflows/install-from-condalock-file.yml index 91a4281787..1e6adeaa0d 100644 --- a/.github/workflows/install-from-condalock-file.yml +++ b/.github/workflows/install-from-condalock-file.yml @@ -10,7 +10,7 @@ name: Conda-lock Install on: push: branches: - - main + - main # run the test only if the PR is to main # turn it on if required #pull_request: @@ -24,7 +24,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: Linux Python ${{ matrix.python-version }} steps: diff --git a/.github/workflows/install-from-pypi.yml b/.github/workflows/install-from-pypi.yml index a6c51d9e29..951cc787a2 100644 --- a/.github/workflows/install-from-pypi.yml +++ b/.github/workflows/install-from-pypi.yml @@ -20,7 +20,7 @@ on: # turn it on only if needed push: branches: - - main + - main # run the test only if the PR is to main # turn it on if required #pull_request: @@ -35,7 +35,7 @@ jobs: strategy: matrix: # TODO add "3.11" once we have the package built - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] # fail-fast set to False allows all other tests # in the workflow to run regardless of any fail fail-fast: false @@ -77,7 +77,7 @@ jobs: runs-on: "macos-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] fail-fast: false name: OSX Python ${{ matrix.python-version }} steps: @@ -103,8 +103,8 @@ jobs: run: pip install esmvalcore 2>&1 | tee pip_install_osx_artifacts_python_${{ matrix.python-version }}/install.txt - name: Verify installation shell: bash -l {0} - run: | - esmvaltool --help + run: | + esmvaltool --help esmvaltool version 2>&1 | tee pip_install_osx_artifacts_python_${{ matrix.python-version }}/version.txt - name: Upload artifacts if: ${{ always() }} # upload artifacts even if fail diff --git a/.github/workflows/install-from-source.yml b/.github/workflows/install-from-source.yml index 98fd6b6ec3..12f7f7c60a 100644 --- a/.github/workflows/install-from-source.yml +++ b/.github/workflows/install-from-source.yml @@ -13,12 +13,12 @@ name: Install from Source # runs on a push on main and at the end of every day on: - # triggering on push without branch name will run tests everytime + # triggering on push without branch name will run tests every time # there is a push on any branch # turn it on only if needed push: branches: - - main + - main # run the test only if the PR is to main # turn it on if required #pull_request: @@ -32,7 +32,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: Linux Python ${{ matrix.python-version }} steps: @@ -73,7 +73,7 @@ jobs: runs-on: "macos-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: OSX Python ${{ matrix.python-version }} steps: diff --git a/.github/workflows/run-tests-comment.yml b/.github/workflows/run-tests-comment.yml index d5342971a7..2351203dc9 100644 --- a/.github/workflows/run-tests-comment.yml +++ b/.github/workflows/run-tests-comment.yml @@ -9,7 +9,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] fail-fast: false name: Linux Python ${{ matrix.python-version }} if: ${{ github.event.issue.pull_request && github.event.comment.body == '@runGAtests' }} @@ -48,7 +48,7 @@ jobs: runs-on: "macos-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] fail-fast: false name: OSX Python ${{ matrix.python-version }} if: ${{ github.event.issue.pull_request && github.event.comment.body == '@runGAtests' }} diff --git a/.github/workflows/run-tests-monitor.yml b/.github/workflows/run-tests-monitor.yml index c49dd61ffa..e59bb79073 100644 --- a/.github/workflows/run-tests-monitor.yml +++ b/.github/workflows/run-tests-monitor.yml @@ -17,7 +17,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: Linux Python ${{ matrix.python-version }} steps: @@ -57,7 +57,7 @@ jobs: runs-on: "macos-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: OSX Python ${{ matrix.python-version }} steps: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 84801e3464..d7426ecbc0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -34,7 +34,7 @@ jobs: runs-on: "ubuntu-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: Linux Python ${{ matrix.python-version }} steps: @@ -72,7 +72,7 @@ jobs: runs-on: "macos-latest" strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11"] fail-fast: false name: OSX Python ${{ matrix.python-version }} steps: diff --git a/environment.yml b/environment.yml index b31578c785..26809991e1 100644 --- a/environment.yml +++ b/environment.yml @@ -34,7 +34,7 @@ dependencies: - psutil - py-cordex - pybtex - - python>=3.8 + - python>=3.9 - python-stratify - pyyaml - requests diff --git a/setup.py b/setup.py index 113bda3ebe..05d5a9ac55 100755 --- a/setup.py +++ b/setup.py @@ -216,7 +216,6 @@ def read_description(filename): 'Natural Language :: English', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', From dd3ff29971dbd44cabdfffe4cb35c2fce3b34572 Mon Sep 17 00:00:00 2001 From: Valeriu Predoi Date: Thu, 25 May 2023 17:45:55 +0100 Subject: [PATCH 3/4] Show ESMValTool logo on PyPI webpage (#2065) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22552e5ddc..3c438fe6f3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [![Github Actions Test](https://github.com/ESMValGroup/ESMValCore/actions/workflows/run-tests.yml/badge.svg)](https://github.com/ESMValGroup/ESMValCore/actions/workflows/run-tests.yml) [![Github Actions Dashboard](https://api.meercode.io/badge/ESMValGroup/ESMValCore?type=ci-success-rate&branch=main&lastDay=14)](https://meercode.io) -![esmvaltoollogo](https://github.com/ESMValGroup/ESMValCore/blob/main/doc/figures/ESMValTool-logo-2.png) +![esmvaltoollogo](https://raw.githubusercontent.com/ESMValGroup/ESMValCore/main/doc/figures/ESMValTool-logo-2.png) ESMValCore: core functionalities for the ESMValTool, a community diagnostic and performance metrics tool for routine evaluation of Earth System Models From 83b12a233b9bd3ae3dc37540db9ac07d14e3b613 Mon Sep 17 00:00:00 2001 From: Manuel Schlund <32543114+schlunma@users.noreply.github.com> Date: Fri, 26 May 2023 08:24:18 +0200 Subject: [PATCH 4/4] Introduce `Fix.session` to access `Session` in fixes (#1988) --- doc/develop/fixing_data.rst | 11 ++++++ esmvalcore/cmor/_fixes/fix.py | 44 ++++++++++++++++++----- esmvalcore/cmor/fix.py | 24 +++++++++++-- esmvalcore/dataset.py | 3 ++ tests/integration/cmor/_fixes/test_fix.py | 16 +++++++-- tests/unit/cmor/test_fix.py | 11 +++++- tests/unit/test_dataset.py | 3 ++ 7 files changed, 97 insertions(+), 15 deletions(-) diff --git a/doc/develop/fixing_data.rst b/doc/develop/fixing_data.rst index 8902fb5dbf..4c43ffb04c 100644 --- a/doc/develop/fixing_data.rst +++ b/doc/develop/fixing_data.rst @@ -60,6 +60,17 @@ called by the preprocessor functions :py:func:`esmvalcore.preprocessor.fix_metadata`, and :py:func:`esmvalcore.preprocessor.fix_data`. +The :class:`~esmvalcore.cmor._fixes.fix.Fix` class provides the following +attributes: + +- :attr:`Fix.vardef`: :class:`~esmvalcore.cmor.table.VariableInfo` object that + corresponds to the variable fixed by the fix. +- :attr:`Fix.extra_facets`: :obj:`dict` that contains all facets of the + corresponding dataset fixed by the fix (see + :attr:`esmvalcore.dataset.Dataset.facets`). +- :attr:`Fix.session`: :class:`~esmvalcore.config.Session` object that includes + configuration and directory information. + Fixing a dataset ================ diff --git a/esmvalcore/cmor/_fixes/fix.py b/esmvalcore/cmor/_fixes/fix.py index 96a1c709c1..08e065787b 100644 --- a/esmvalcore/cmor/_fixes/fix.py +++ b/esmvalcore/cmor/_fixes/fix.py @@ -5,29 +5,43 @@ import inspect import tempfile from pathlib import Path +from typing import TYPE_CHECKING, Optional from ..table import CMOR_TABLES +if TYPE_CHECKING: + from ...config import Session + from ..table import VariableInfo + class Fix: """Base class for dataset fixes.""" - def __init__(self, vardef, extra_facets=None): + def __init__( + self, + vardef: VariableInfo, + extra_facets: Optional[dict] = None, + session: Optional[Session] = None, + ): """Initialize fix object. Parameters ---------- - vardef: str + vardef: VariableInfo CMOR table entry. extra_facets: dict, optional Extra facets are mainly used for data outside of the big projects like CMIP, CORDEX, obs4MIPs. For details, see :ref:`extra_facets`. + session: Session, optional + Current session which includes configuration and directory + information. """ self.vardef = vardef if extra_facets is None: extra_facets = {} self.extra_facets = extra_facets + self.session = session def fix_file( self, @@ -136,7 +150,14 @@ def __ne__(self, other): return not self.__eq__(other) @staticmethod - def get_fixes(project, dataset, mip, short_name, extra_facets=None): + def get_fixes( + project: str, + dataset: str, + mip: str, + short_name: str, + extra_facets: Optional[dict] = None, + session: Optional[Session] = None, + ) -> list: """Get the fixes that must be applied for a given dataset. It will look for them at the module @@ -163,6 +184,9 @@ def get_fixes(project, dataset, mip, short_name, extra_facets=None): extra_facets: dict, optional Extra facets are mainly used for data outside of the big projects like CMIP, CORDEX, obs4MIPs. For details, see :ref:`extra_facets`. + session: Session, optional + Current session which includes configuration and directory + information. Returns ------- @@ -202,13 +226,15 @@ def get_fixes(project, dataset, mip, short_name, extra_facets=None): pass for fixes_module in fixes_modules: - classes = inspect.getmembers(fixes_module, inspect.isclass) - classes = dict((name.lower(), value) for name, value in classes) + classes = dict( + (name.lower(), value) for (name, value) in + inspect.getmembers(fixes_module, inspect.isclass) + ) for fix_name in (short_name, mip.lower(), 'allvars'): - try: - fixes.append(classes[fix_name](vardef, extra_facets)) - except KeyError: - pass + if fix_name in classes: + fixes.append(classes[fix_name]( + vardef, extra_facets=extra_facets, session=session + )) return fixes diff --git a/esmvalcore/cmor/fix.py b/esmvalcore/cmor/fix.py index 7afab44938..8ec48e4047 100644 --- a/esmvalcore/cmor/fix.py +++ b/esmvalcore/cmor/fix.py @@ -4,15 +4,21 @@ for the given dataset. Therefore is recommended to apply them to all variables to be sure that all known errors are fixed. """ +from __future__ import annotations + import logging from collections import defaultdict from pathlib import Path +from typing import TYPE_CHECKING, Optional from iris.cube import CubeList from ._fixes.fix import Fix from .check import CheckLevels, _get_cmor_checker +if TYPE_CHECKING: + from ..config import Session + logger = logging.getLogger(__name__) @@ -24,6 +30,7 @@ def fix_file( mip: str, output_dir: Path, add_unique_suffix: bool = False, + session: Optional[Session] = None, **extra_facets, ) -> Path: """Fix files before ESMValTool can load them. @@ -49,6 +56,8 @@ def fix_file( Output directory for fixed files. add_unique_suffix: bool, optional (default: False) Adds a unique suffix to `output_dir` for thread safety. + session: Session, optional + Current session which includes configuration and directory information. **extra_facets: dict, optional Extra facets are mainly used for data outside of the big projects like CMIP, CORDEX, obs4MIPs. For details, see :ref:`extra_facets`. @@ -71,7 +80,8 @@ def fix_file( dataset=dataset, mip=mip, short_name=short_name, - extra_facets=extra_facets): + extra_facets=extra_facets, + session=session): file = fix.fix_file( file, output_dir, add_unique_suffix=add_unique_suffix ) @@ -85,6 +95,7 @@ def fix_metadata(cubes, mip, frequency=None, check_level=CheckLevels.DEFAULT, + session: Optional[Session] = None, **extra_facets): """Fix cube metadata if fixes are required and check it anyway. @@ -109,6 +120,8 @@ def fix_metadata(cubes, Variable's data frequency, if available. check_level: CheckLevels Level of strictness of the checks. Set to default. + session: Session, optional + Current session which includes configuration and directory information. **extra_facets: dict, optional Extra facets are mainly used for data outside of the big projects like CMIP, CORDEX, obs4MIPs. For details, see :ref:`extra_facets`. @@ -137,7 +150,8 @@ def fix_metadata(cubes, dataset=dataset, mip=mip, short_name=short_name, - extra_facets=extra_facets) + extra_facets=extra_facets, + session=session) fixed_cubes = [] by_file = defaultdict(list) for cube in cubes: @@ -193,6 +207,7 @@ def fix_data(cube, mip, frequency=None, check_level=CheckLevels.DEFAULT, + session: Optional[Session] = None, **extra_facets): """Fix cube data if fixes add present and check it anyway. @@ -219,6 +234,8 @@ def fix_data(cube, Variable's data frequency, if available. check_level: CheckLevels Level of strictness of the checks. Set to default. + session: Session, optional + Current session which includes configuration and directory information. **extra_facets: dict, optional Extra facets are mainly used for data outside of the big projects like CMIP, CORDEX, obs4MIPs. For details, see :ref:`extra_facets`. @@ -247,7 +264,8 @@ def fix_data(cube, dataset=dataset, mip=mip, short_name=short_name, - extra_facets=extra_facets): + extra_facets=extra_facets, + session=session): cube = fix.fix_data(cube) checker = _get_cmor_checker(frequency=frequency, table=project, diff --git a/esmvalcore/dataset.py b/esmvalcore/dataset.py index 9293c42107..5710ef6651 100644 --- a/esmvalcore/dataset.py +++ b/esmvalcore/dataset.py @@ -726,11 +726,13 @@ def _load(self, callback) -> Cube: settings['fix_file'] = { 'output_dir': fix_dir_prefix, 'add_unique_suffix': True, + 'session': self.session, **self.facets, } settings['load'] = {'callback': callback} settings['fix_metadata'] = { 'check_level': self.session['check_level'], + 'session': self.session, **self.facets, } settings['concatenate'] = {} @@ -747,6 +749,7 @@ def _load(self, callback) -> Cube: } settings['fix_data'] = { 'check_level': self.session['check_level'], + 'session': self.session, **self.facets, } settings['cmor_check_data'] = { diff --git a/tests/integration/cmor/_fixes/test_fix.py b/tests/integration/cmor/_fixes/test_fix.py index 1bf38d1425..7abc734182 100644 --- a/tests/integration/cmor/_fixes/test_fix.py +++ b/tests/integration/cmor/_fixes/test_fix.py @@ -15,6 +15,7 @@ ) from esmvalcore.cmor._fixes.cordex.cordex_fixes import AllVars from esmvalcore.cmor.fix import Fix +from esmvalcore.config import CFG def test_get_fix(): @@ -108,7 +109,7 @@ def test_get_fixed_filepath_paths(tmp_path): assert fixed_path == tmp_path / 'fixed' / 'file.nc' -def test_get_fixed_filepath_temporary_paths(tmp_path): +def test_get_fixed_filepath_unique_suffix_paths(tmp_path): output_dir = tmp_path / 'fixed' / 'prefix_1_' filepath = Path('this', 'is', 'a', 'file.nc') assert not output_dir.parent.is_dir() @@ -132,7 +133,7 @@ def test_get_fixed_filepath_strs(tmp_path): assert fixed_path == tmp_path / 'fixed' / 'file.nc' -def test_get_fixed_filepath_temporary_strs(tmp_path): +def test_get_fixed_filepath_unique_suffix_strs(tmp_path): output_dir = os.path.join(str(tmp_path), 'fixed', 'prefix_1_') filepath = os.path.join('this', 'is', 'a', 'file.nc') assert not Path(output_dir).parent.is_dir() @@ -144,3 +145,14 @@ def test_get_fixed_filepath_temporary_strs(tmp_path): assert fixed_path != tmp_path / 'fixed' / 'prefix_1_' / 'file.nc' assert fixed_path.parent.name.startswith('prefix_1_') assert fixed_path.name == 'file.nc' + + +def test_session_empty(): + fix = Fix(None) + assert fix.session is None + + +def test_session(): + session = CFG.start_session('my session') + fix = Fix(None, session=session) + assert fix.session == session diff --git a/tests/unit/cmor/test_fix.py b/tests/unit/cmor/test_fix.py index e8f98a3972..86293e2aaa 100644 --- a/tests/unit/cmor/test_fix.py +++ b/tests/unit/cmor/test_fix.py @@ -2,7 +2,7 @@ from pathlib import Path from unittest import TestCase -from unittest.mock import Mock, patch +from unittest.mock import Mock, patch, sentinel from esmvalcore.cmor.check import CheckLevels from esmvalcore.cmor.fix import Fix, fix_data, fix_file, fix_metadata @@ -27,6 +27,7 @@ def setUp(self): 'mip': 'mip', 'short_name': 'short_name', }, + 'session': sentinel.session, } def test_fix(self): @@ -40,6 +41,7 @@ def test_fix(self): dataset='model', mip='mip', output_dir=Path('output_dir'), + session=sentinel.session, ) self.assertNotEqual(file_returned, self.filename) self.assertEqual(file_returned, 'new_filename') @@ -58,6 +60,7 @@ def test_nofix(self): dataset='model', mip='mip', output_dir=Path('output_dir'), + session=sentinel.session, ) self.assertEqual(file_returned, self.filename) mock_get_fixes.assert_called_once_with( @@ -124,6 +127,7 @@ def setUp(self): 'short_name': 'short_name', 'frequency': None, }, + 'session': sentinel.session, } @staticmethod @@ -146,6 +150,7 @@ def test_fix(self): project='project', dataset='model', mip='mip', + session=sentinel.session, )[0] self.checker.assert_called_once_with(self.intermediate_cube) self.check_metadata.assert_called_once_with() @@ -169,6 +174,7 @@ def test_nofix(self): project='project', dataset='model', mip='mip', + session=sentinel.session, )[0] self.checker.assert_called_once_with(self.cube) self.check_metadata.assert_called_once_with() @@ -266,6 +272,7 @@ def setUp(self): 'short_name': 'short_name', 'frequency': None, }, + 'session': sentinel.session, } def test_fix(self): @@ -281,6 +288,7 @@ def test_fix(self): project='project', dataset='model', mip='mip', + session=sentinel.session, ) self.checker.assert_called_once_with(self.intermediate_cube) self.check_data.assert_called_once_with() @@ -304,6 +312,7 @@ def test_nofix(self): project='project', dataset='model', mip='mip', + session=sentinel.session, ) self.checker.assert_called_once_with(self.cube) self.check_data.assert_called_once_with() diff --git a/tests/unit/test_dataset.py b/tests/unit/test_dataset.py index b8ebc209c8..bd5c5546e6 100644 --- a/tests/unit/test_dataset.py +++ b/tests/unit/test_dataset.py @@ -1688,6 +1688,7 @@ def mock_preprocess(items, step, input_files, output_file, debug, }, 'fix_file': { 'add_unique_suffix': True, + 'session': session, 'dataset': 'CanESM2', 'ensemble': 'r1i1p1', 'exp': 'historical', @@ -1700,6 +1701,7 @@ def mock_preprocess(items, step, input_files, output_file, debug, }, 'fix_metadata': { 'check_level': CheckLevels.DEFAULT, + 'session': session, 'dataset': 'CanESM2', 'ensemble': 'r1i1p1', 'exp': 'historical', @@ -1721,6 +1723,7 @@ def mock_preprocess(items, step, input_files, output_file, debug, }, 'fix_data': { 'check_level': CheckLevels.DEFAULT, + 'session': session, 'dataset': 'CanESM2', 'ensemble': 'r1i1p1', 'exp': 'historical',