Skip to content

Commit

Permalink
Expanded cmor public API (#714)
Browse files Browse the repository at this point in the history
* Added add_plev_from_altitude and add_sigma_factory to public API

Co-authored-by: Bouwe Andela <[email protected]>
  • Loading branch information
schlunma and bouweandela committed Jul 20, 2020
1 parent fef54c7 commit bc1f6a7
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
9 changes: 7 additions & 2 deletions doc/api/esmvalcore.cmor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ Checking compliance

.. automodule:: esmvalcore.cmor.check

Fixing issues
-------------
Automatically fixing issues
---------------------------

.. automodule:: esmvalcore.cmor.fix

Functions for fixing issues
---------------------------

.. automodule:: esmvalcore.cmor.fixes

Using CMOR tables
-----------------

Expand Down
2 changes: 1 addition & 1 deletion esmvalcore/cmor/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""CMOR module"""
"""CMOR module."""
8 changes: 8 additions & 0 deletions esmvalcore/cmor/fixes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Functions for fixing specific issues with datasets."""

from ._fixes.shared import add_plev_from_altitude, add_sigma_factory

__all__ = [
'add_plev_from_altitude',
'add_sigma_factory',
]
12 changes: 12 additions & 0 deletions tests/unit/cmor/test_fixes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Test individual fix functions."""
import pytest

import esmvalcore.cmor.fixes


@pytest.mark.parametrize('func', [
'add_plev_from_altitude',
'add_sigma_factory',
])
def test_imports(func):
assert func in esmvalcore.cmor.fixes.__all__

0 comments on commit bc1f6a7

Please sign in to comment.