Skip to content

Commit

Permalink
Merge pull request #82 from ecmwf/develop
Browse files Browse the repository at this point in the history
Prepare release 0.9.0
  • Loading branch information
sandorkertesz authored Nov 27, 2024
2 parents 2bd8f70 + db34e25 commit 6d235ee
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/components_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ This is the summary of the available ``earthkit`` components.
* - :xref:`earthkit-regrid`
- Regridding of geospatial data.
-
* - :xref:`earthkit-time`
- Manipulation of dates and time for weather forecasting.
-
* - :xref:`earthkit-transforms`
- Aggregation and transformation of geospatial data.
-
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
"earthkit-regrid",
"https://earthkit-regrid.readthedocs.io",
),
"earthkit-time": (
"earthkit-time",
"https://earthkit-time.readthedocs.io",
),
"earthkit-transforms": (
"earthkit-transforms",
"https://earthkit-transforms.readthedocs.io",
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The interface of :ref:`earthkit components <components>` is designed to be high-
earthkit-meteo <https://earthkit-meteo.readthedocs.io>
earthkit-plots <https://earthkit-plots.readthedocs.io>
earthkit-regrid <https://earthkit-regrid.readthedocs.io>
earthkit-time <https://earthkit-time.readthedocs.io>
earthkit-transforms <https://earthkit-transforms.readthedocs.io>

.. toctree::
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ dependencies:
- earthkit-data>=0.11.1
- geos
- pip:
- earthkit-geo>=0.2.0
- earthkit-geo>=0.3.0
- earthkit-meteo>=0.1.1
- earthkit-plots>=0.2.5
- earthkit-regrid>=0.3.4
- earthkit-time>=0.1.6
- earthkit-transforms>=0.3.4
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ classifiers = [
dynamic = [ "version" ]
dependencies = [
"earthkit-data[all]>=0.11.1",
"earthkit-geo>=0.2",
"earthkit-geo>=0.3",
"earthkit-meteo>=0.1.1",
"earthkit-plots>=0.2.5",
"earthkit-regrid>=0.3.4",
"earthkit-time>=0.1.6",
"earthkit-transforms>=0.3.4",
]
optional-dependencies.test = [ "pytest" ]
Expand Down
2 changes: 2 additions & 0 deletions src/earthkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import earthkit.meteo as meteo
import earthkit.plots as plots
import earthkit.regrid as regrid
import earthkit.time as time
import earthkit.transforms as transforms

__all__ = [
Expand All @@ -29,6 +30,7 @@
"meteo",
"plots",
"regrid",
"time",
"transforms",
"__version__",
]
3 changes: 2 additions & 1 deletion tests/environment-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ dependencies:
- geos
- pip:
- earthkit-data[all]>=0.11.1
- earthkit-geo>=0.2.0
- earthkit-geo>=0.3.0
- earthkit-meteo>=0.1.1
- earthkit-plots>=0.2.5
- earthkit-regrid>=0.3.4
- earthkit-time>=0.1.6
- earthkit-transforms>=0.3.4
45 changes: 45 additions & 0 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env python3

# (C) Copyright 2023 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#


def test_earthkit_data_import():
import earthkit.data # noqa
from earthkit.data import from_source # noqa


def test_earthkit_geo_import():
import earthkit.geo # noqa
from earthkit.geo import nearest_point_kdtree # noqa


def test_earthkit_meteo_import():
import earthkit.meteo # noqa
from earthkit.meteo import thermo # noqa


def test_earthkit_plots_import():
import earthkit.plots # noqa
from earthkit.plots import quickmap # noqa


def test_earthkit_regrid_import():
import earthkit.regrid # noqa
from earthkit.regrid import interpolate # noqa


def test_earthkit_time_import():
import earthkit.time # noqa
from earthkit.time import DailySequence # noqa


def test_earthkit_transforms_import():
import earthkit.transforms # noqa
from earthkit.transforms import aggregate # noqa
96 changes: 96 additions & 0 deletions tests/test_obj.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/usr/bin/env python3

# (C) Copyright 2023 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
#


def test_earthkit_data_obj_1():
import earthkit.data

assert callable(earthkit.data.from_source)


def test_earthkit_data_obj_2():
from earthkit import data

assert callable(data.from_source)


def test_earthkit_geo_obj_1():
import earthkit.geo

assert callable(earthkit.geo.nearest_point_kdtree)


def test_earthkit_geo_obj_2():
from earthkit import geo

assert callable(geo.nearest_point_kdtree)


def test_earthkit_meteo_obj_1():
import earthkit.meteo

assert callable(earthkit.meteo.thermo.potential_temperature)


def test_earthkit_meteo_obj_2():
from earthkit import meteo

assert callable(meteo.thermo.potential_temperature)


def test_earthkit_plots_obj_1():
import earthkit.plots

assert callable(earthkit.plots.quickmap.plot)


def test_earthkit_plots_obj_2():
from earthkit import plots

assert callable(plots.quickmap.plot)


def test_earthkit_regrid_obj_1():
import earthkit.regrid

assert callable(earthkit.regrid.interpolate)


def test_earthkit_regrid_obj_2():
from earthkit import regrid

assert callable(regrid.interpolate)


def test_earthkit_time_obj_1():
import earthkit.time

x = earthkit.time.DailySequence()
assert x is not None


def test_earthkit_time_obj_2():
from earthkit import time

x = time.DailySequence()
assert x is not None


def test_earthkit_transforms_obj_1():
import earthkit.transforms

assert callable(earthkit.transforms.aggregate.spatial.masks)


def test_earthkit_transforms_obj_2():
from earthkit import transforms

assert callable(transforms.aggregate.spatial.masks)
16 changes: 16 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#

import re
from importlib.metadata import version

import pytest

VERSION_RX = re.compile(r"""\d+\.\d+\.*""")

Expand Down Expand Up @@ -81,6 +84,19 @@ def test_earthkit_regrid_version_2():
assert VERSION_RX.match(regrid.__version__) is not None


def test_earthkit_time_version_1():
import earthkit.time # noqa

assert VERSION_RX.match(version("earthkit.time")) is not None


@pytest.mark.xfail(reason="version not available")
def test_earthkit_time_version_2():
from earthkit import time # noqa

assert VERSION_RX.match(time.__version__) is not None


def test_earthkit_transforms_version_1():
import earthkit.transforms # noqa

Expand Down

0 comments on commit 6d235ee

Please sign in to comment.