diff --git a/.github/ci-hpc-config.yml b/.github/ci-hpc-config.yml index 06c3c0e4f..a74f2ed2f 100644 --- a/.github/ci-hpc-config.yml +++ b/.github/ci-hpc-config.yml @@ -21,7 +21,7 @@ build: - ECCODES_DEFINITION_PATH=$ECCODES_DIR/share/eccodes/definitions - GITHUB_WORKFLOW=anything parallel: 64 - requirements: tests/downstream-ci-requirements.txt + toml_opt_dep_sections: all,test,ci pytest_cmd: | python -m pytest -vv -m 'not notebook and not no_cache_init' --cov=. --cov-report=xml python -m pytest -v -m 'notebook' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ceb1ac0c0..450d54d2c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace # Trailing whitespace checker - id: end-of-file-fixer # Ensure files end in a newline diff --git a/Makefile b/Makefile index 60026f43f..a08f32e9c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ COV_REPORT := html setup: pre-commit install -default: qa unit-tests type-check +default: qa unit-tests qa: pre-commit run --all-files @@ -15,25 +15,3 @@ unit-tests: python -m pytest -vv -m 'not notebook and not no_cache_init' --cov=. --cov-report=$(COV_REPORT) python -m pytest -v -m "notebook" python -m pytest --forked -vv -m 'no_cache_init' - -# type-check: -# python -m mypy . - -conda-env-update: - $(CONDA) env update $(CONDAFLAGS) -f environment.yml - -docker-build: - docker build -t $(PROJECT) . - -docker-run: - docker run --rm -ti -v $(PWD):/srv $(PROJECT) - -template-update: - pre-commit run --all-files cruft -c .pre-commit-config-weekly.yaml - -docs-build: - cd docs && rm -fr _api && make clean && make html - -#integration-tests: -# python -m pytest -vv --cov=. --cov-report=$(COV_REPORT) tests/integration*.py -# python -m pytest -vv --doctest-glob='*.md' diff --git a/docs/source/development/conda.rst b/docs/source/development/conda.rst index 03daed427..11704f678 100644 --- a/docs/source/development/conda.rst +++ b/docs/source/development/conda.rst @@ -11,14 +11,18 @@ First, clone the repository locally. You can use the following command: git clone --branch develop git@github.com:ecmwf/earthkit-data.git - -Next, enter your git repository and run the following commands: +Then, create a new environment and activate it: .. code-block:: shell - make conda-env-update + conda create -n earthkit-data python=3.12 conda activate earthkit-data - make setup - pip install -e . -This will create a new conda environment called "earthkit-data" with all the dependencies installed into it. This setup enables the `pre-commit`_ hooks, performing a series of quality control checks on every commit. If any of these checks fails the commit will be rejected. +Lastly, enter your git repository and run the following commands: + +.. code-block:: shell + + pip install -e .[dev] + pre-commit install + +This setup enables the `pre-commit`_ hooks, performing a series of quality control checks on every commit. If any of these checks fails the commit will be rejected. diff --git a/environment.yml b/environment.yml deleted file mode 100644 index 2db5a45d6..000000000 --- a/environment.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: earthkit-data -channels: -- conda-forge -- nodefaults -dependencies: -- eccodeslib==2.46.2.17 -- eckit==2.0.6.17 -- python-eccodes>=1.7.0 -- pip -- numpy -- pandas -- xarray>=0.19.0 -- dask -- netcdf4 -- cfgrib>=0.9.10.1 -- pdbufr>=0.11.0 -- pyodc -- filelock -- pyyaml -- entrypoints -- jupyterlab -- ecmwf-api-client>=1.6.1 -- cdsapi>=0.7.2 -- hda>=2.22 -- pip: - - multiurl>=0.3.3 - - pyfdb>=0.1.0,<1.0 - - ecmwf-opendata>=0.1.2 - - polytope-client>=0.7.4 - - covjsonkit>=0.2.2 - - earthkit-utils>=1.0.0rc0 -- tqdm>=4.63.0 -- lru-dict -- markdown -- aws-requests-auth -- botocore -- make -- mypy -- myst-parser -- pre-commit -- pydata-sphinx-theme -- pyfakefs -- pytest -- pytest-cov -- pytest-forked -- pytest-reraise -- pytest-timeout -- sphinx>=7.2.6 -- pip: - - sphinx-autoapi>=3.0.0 -- sphinx_rtd_theme -- sphinxcontrib-apidoc -- sphinx-design -- sphinx-issues -- sphinx-tabs -- sphinx-copybutton -- nbformat -- nbconvert -- nbsphinx -- ipykernel -- geopandas -- deprecation -- ncdata -- scitools-iris diff --git a/pyproject.toml b/pyproject.toml index 227b38cb6..f7f2c6d5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=61", "setuptools-scm>=8"] +requires = ["setuptools>=77", "setuptools-scm>=8"] [project] authors = [ @@ -8,13 +8,13 @@ authors = [ classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", - "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ] @@ -41,7 +41,8 @@ dependencies = [ ] description = "A format-agnostic Python interface for geospatial data" dynamic = ["version"] -license = {text = "Apache License Version 2.0"} +license = "Apache-2.0" +license-files = ["LICENSE"] name = "earthkit-data" readme = "README.md" requires-python = ">=3.10" diff --git a/tests/environment-unit-tests.yml b/tests/environment-unit-tests.yml deleted file mode 100644 index 29c022f6c..000000000 --- a/tests/environment-unit-tests.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: earthkit-data -channels: -- conda-forge -- nodefault -dependencies: -- eccodes=>2.35.0 -- python-eccodes>=1.7.0 -- pip -- numpy -- pandas -- xarray>=0.19.0 -- cartopy -- dask -- netcdf4 -- cfgrib>=0.9.10.1 -- pdbufr>=0.11.0 -- pyodc -- filelock -- pyyaml -- entrypoints -- jupyterlab -- ecmwf-api-client>=1.6.1 -- cdsapi>=0.7.2 -- hda>2.22 -- jsonschema -- pip: - - multiurl>=0.3.3 - - pyfdb>=0.1.0,<1.0 - - ecmwf-opendata>=0.3.3 - - polytope-client>=0.7.4 - - git+https://github.com/ecmwf/earthkit-data-demo-source - - covjsonkit>=0.2.2 - - earthkit-utils>=1.0.0rc0 -- tqdm>=4.63.0 -- lru-dict -- markdown -- aws-requests-auth -- botocore -- make -- mypy -- myst-parser -- pre-commit -- pydata-sphinx-theme -- pyfakefs -- pytest -- pytest-cov -- pytest-forked -- pytest-reraise -- pytest-timeout -- sphinx -- sphinx-autoapi -- sphinx_rtd_theme -- sphinxcontrib-apidoc -- sphinx-design -- sphinx-issues -- sphinx-tabs -- sphinx-copybutton -- nbformat -- nbconvert -- nbsphinx -- ipykernel -- geopandas -- deprecation -- ncdata -- scitools-iris