Skip to content

Commit 0ae78c8

Browse files
Merge pull request #17 from ecmwf/develop
Prepare release 0.1.1
2 parents 998fda3 + 6aba232 commit 0ae78c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+130
-174
lines changed

.github/workflows/cd-pypi.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: cd
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
8+
jobs:
9+
pypi:
10+
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
11+
secrets: inherit

.github/workflows/legacy-ci.yml

Lines changed: 1 addition & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -36,62 +36,7 @@ jobs:
3636
python-version: 3.x
3737
- uses: pre-commit/action@v3.0.0
3838

39-
unit-tests:
40-
name: unit-tests (3.10)
41-
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
42-
runs-on: ubuntu-latest
43-
44-
steps:
45-
- uses: actions/checkout@v3
46-
with:
47-
ref: ${{ github.event.pull_request.head.sha || github.ref }}
48-
- name: Install Conda environment with Micromamba
49-
uses: mamba-org/provision-with-micromamba@v14
50-
with:
51-
environment-file: tests/environment-unit-tests.yml
52-
environment-name: DEVELOP
53-
channels: conda-forge
54-
cache-env: true
55-
extra-specs: |
56-
python=3.10
57-
- name: Install package
58-
run: |
59-
python -m pip install --no-deps -e .
60-
- name: Run tests
61-
run: |
62-
make unit-tests
63-
64-
type-check:
65-
needs: [unit-tests]
66-
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
67-
runs-on: ubuntu-latest
68-
defaults:
69-
run:
70-
shell: bash -l {0}
71-
72-
steps:
73-
- uses: actions/checkout@v3
74-
with:
75-
ref: ${{ github.event.pull_request.head.sha || github.ref }}
76-
- name: Install Conda environment with Micromamba
77-
uses: mamba-org/provision-with-micromamba@v12
78-
with:
79-
environment-file: environment.yml
80-
environment-name: DEVELOP
81-
channels: conda-forge
82-
cache-env: true
83-
cache-env-key: ubuntu-latest-3.10
84-
extra-specs: |
85-
python=3.10
86-
- name: Install package
87-
run: |
88-
python -m pip install --no-deps -e .
89-
- name: Run code quality checks
90-
run: |
91-
echo type-check not used
92-
9339
documentation:
94-
needs: [unit-tests]
9540
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
9641
runs-on: ubuntu-latest
9742
defaults:
@@ -105,7 +50,7 @@ jobs:
10550
- name: Install Conda environment with Micromamba
10651
uses: mamba-org/provision-with-micromamba@v12
10752
with:
108-
environment-file: environment.yml
53+
environment-file: tests/environment-unit-tests.yml
10954
environment-name: DEVELOP
11055
channels: conda-forge
11156
cache-env: true
@@ -118,75 +63,3 @@ jobs:
11863
- name: Build documentation
11964
run: |
12065
make docs-build
121-
122-
integration-tests:
123-
needs: [unit-tests]
124-
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
125-
runs-on: ubuntu-latest
126-
defaults:
127-
run:
128-
shell: bash -l {0}
129-
130-
strategy:
131-
matrix:
132-
include:
133-
- python-version: "3.10"
134-
# extra: -minver # This will need to be uncommented and environment-minver.yml updated if we want to publish on conda
135-
136-
steps:
137-
- uses: actions/checkout@v3
138-
with:
139-
ref: ${{ github.event.pull_request.head.sha || github.ref }}
140-
- name: Install Conda environment with Micromamba
141-
uses: mamba-org/provision-with-micromamba@v12
142-
with:
143-
environment-file: tests/environment-unit-tests${{ matrix.extra }}.yml
144-
environment-name: DEVELOP${{ matrix.extra }}
145-
channels: conda-forge
146-
cache-env: true
147-
cache-env-key: ubuntu-latest-${{ matrix.python-version }}${{ matrix.extra }}.
148-
extra-specs: |
149-
python=${{matrix.python-version }}
150-
- name: Install package
151-
run: |
152-
python -m pip install --no-deps -e .
153-
- name: Run tests
154-
run: |
155-
make unit-tests
156-
157-
distribution:
158-
needs: [integration-tests, type-check, documentation]
159-
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
160-
runs-on: ubuntu-latest
161-
162-
steps:
163-
- uses: actions/checkout@v3
164-
with:
165-
ref: ${{ github.event.pull_request.head.sha || github.ref }}
166-
- name: Build distributions
167-
run: |
168-
$CONDA/bin/python -m pip install build
169-
$CONDA/bin/python -m build
170-
- name: Publish a Python distribution to PyPI
171-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
172-
uses: pypa/gh-action-pypi-publish@release/v1
173-
with:
174-
user: __token__
175-
password: ${{ secrets.PYPI_API_TOKEN }}
176-
177-
notify:
178-
if: always() && ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
179-
needs:
180-
- pre-commit
181-
- unit-tests
182-
- type-check
183-
- documentation
184-
- integration-tests
185-
- distribution
186-
runs-on: ubuntu-latest
187-
steps:
188-
- name: Trigger Teams notification
189-
uses: ecmwf-actions/notify-teams@v1
190-
with:
191-
incoming_webhook: ${{ secrets.MS_TEAMS_INCOMING_WEBHOOK }}
192-
needs_context: ${{ toJSON(needs) }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# setuptools-scm
22
version.py
3+
_version.py
34

45
# Sphinx automatic generation of API
56
docs/_api/

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
autodoc_typehints = "none"
4343

4444
# autoapi configuration
45-
autoapi_dirs = ["../earthkit/meteo"]
46-
autoapi_ignore = ["*/version.py", "sphinxext/*"]
45+
autoapi_dirs = ["../src/earthkit/meteo"]
46+
autoapi_ignore = ["*/_version.py", "sphinxext/*"]
4747
autoapi_options = [
4848
"members",
4949
"undoc-members",

pyproject.toml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,47 @@
11
[build-system]
2-
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
2+
requires = ["setuptools>=61", "setuptools-scm>=8.0"]
3+
4+
[project]
5+
authors = [
6+
{name = "European Centre for Medium-Range Weather Forecasts (ECMWF)", email = "software.support@ecmwf.int"}
7+
]
8+
classifiers = [
9+
"Development Status :: 2 - Pre-Alpha",
10+
"Intended Audience :: Developers",
11+
"License :: OSI Approved :: Apache Software License",
12+
"Programming Language :: Python :: 3",
13+
"Programming Language :: Python :: 3.8",
14+
"Programming Language :: Python :: 3.9",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: Implementation :: CPython",
18+
"Programming Language :: Python :: Implementation :: PyPy",
19+
"Operating System :: OS Independent"
20+
]
21+
dependencies = [
22+
"numpy"
23+
]
24+
description = "Meteorological computations"
25+
dynamic = ["version"]
26+
license = {text = "Apache License Version 2.0"}
27+
name = "earthkit-meteo"
28+
readme = "README.md"
29+
requires-python = ">= 3.8"
30+
31+
[project.optional-dependencies]
32+
test = [
33+
"pytest",
34+
"pytest-cov"
35+
]
36+
37+
[project.urls]
38+
Documentation = "https://earthkit-meteo.readthedocs.io/"
39+
Homepage = "https://github.com/ecmwf/earthkit-meteo/"
40+
Issues = "https://github.com/ecmwf/earthkit-meteo.issues"
41+
Repository = "https://github.com/ecmwf/earthkit-meteo/"
342

443
[tool.coverage.run]
5-
branch = true
44+
branch = "true"
645

746
[tool.isort]
847
profile = "black"
@@ -11,9 +50,9 @@ profile = "black"
1150
add_ignore = ["D1", "D200", "D205", "D400", "D401"]
1251
convention = "numpy"
1352

53+
[tool.setuptools.packages.find]
54+
include = ["earthkit.meteo"]
55+
where = ["src/"]
56+
1457
[tool.setuptools_scm]
15-
write_to = "earthkit/meteo/version.py"
16-
write_to_template = '''
17-
# Do not change! Do not track in version control!
18-
__version__ = "{version}"
19-
'''
58+
version_file = "src/earthkit/meteo/_version.py"

setup.cfg

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
[metadata]
2-
name = earthkit-meteo
3-
license = Apache License 2.0
4-
description = Meteorological computations
5-
Development Status :: 2 - Pre-Alpha
6-
Intended Audience :: Science/Research
7-
License :: OSI Approved :: Apache Software License
8-
Operating System :: OS Independent
9-
Programming Language :: Python
10-
Programming Language :: Python :: 3
11-
Programming Language :: Python :: 3.8
12-
Programming Language :: Python :: 3.9
13-
Programming Language :: Python :: 3.10
14-
Programming Language :: Python :: 3.11
15-
Topic :: Scientific/Engineering
16-
long_description_content_type=text/markdown
17-
long_description = file: README.md
18-
test_suite = tests
19-
20-
[options]
21-
packages = find_namespace:
22-
install_requires =
23-
numpy
24-
25-
[options.packages.find]
26-
include = earthkit.*
27-
28-
[options.extras_require]
29-
test =
30-
pytest
31-
pytest-cov
32-
331
[flake8]
342
max-line-length = 110
353
extend-ignore = E203, W503
36-
37-
[mypy]
38-
strict = False
39-
ignore_missing_imports = True

earthkit/meteo/__init__.py renamed to src/earthkit/meteo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
try:
1111
# NOTE: the `version.py` file must not be present in the git repository
1212
# as it is generated by setuptools at install time
13-
from .version import __version__
13+
from ._version import __version__
1414
except ImportError: # pragma: no cover
1515
# Local copy or not installed with setuptools
1616
__version__ = "999"
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)