From 875d9dedecf4831891abee5d2a53ee644be84e8f Mon Sep 17 00:00:00 2001 From: Gert Mertes Date: Fri, 1 Nov 2024 10:38:14 +0000 Subject: [PATCH 1/4] test: add skip_on_hpc marker --- pytest.ini | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..beb91f3 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +markers = + skip_on_hpc: marks tests that should not be run on HPC (deselect with '-m "not skip_on_hpc"') From 752821f68fb4d22ccd8d68c238361f30c46fda9b Mon Sep 17 00:00:00 2001 From: Gert Mertes Date: Fri, 1 Nov 2024 10:38:51 +0000 Subject: [PATCH 2/4] ci: deselect skip_on_hpc in ci-hpc --- .github/ci-hpc-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ci-hpc-config.yml b/.github/ci-hpc-config.yml index cd11ba2..80bae95 100644 --- a/.github/ci-hpc-config.yml +++ b/.github/ci-hpc-config.yml @@ -5,4 +5,4 @@ build: parallel: 64 pytest_cmd: | - python -m pytest -vv -m 'not notebook and not no_cache_init' --cov=. --cov-report=xml + python -m pytest -vv -m 'not notebook and not no_cache_init and not skip_on_hpc' --cov=. --cov-report=xml From 176995144e36034051c7a85984c3fa011db28693 Mon Sep 17 00:00:00 2001 From: Gert Mertes Date: Fri, 1 Nov 2024 10:47:02 +0000 Subject: [PATCH 3/4] chore: changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72738a8..5800f55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Keep it human-readable, your future self will thank you! ### Added - Optional renaming of subcommands via `command` attribute [#34](https://github.com/ecmwf/anemoi-utils/pull/34) +- `skip_on_hpc` pytest marker for tests that should not be run on HPC [36](https://github.com/ecmwf/anemoi-utils/pull/36) ## [0.4.1](https://github.com/ecmwf/anemoi-utils/compare/0.4.0...0.4.1) - 2024-10-23 From d624a6a82318138f8030141b81301935c21f955d Mon Sep 17 00:00:00 2001 From: Gert Mertes Date: Fri, 1 Nov 2024 11:36:45 +0000 Subject: [PATCH 4/4] chore: remove pytest.ini, move to toml --- pyproject.toml | 5 +++++ pytest.ini | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index 93d6cb8..3848964 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,3 +82,8 @@ scripts.anemoi-utils = "anemoi.utils.__main__:main" [tool.setuptools_scm] version_file = "src/anemoi/utils/_version.py" + +[tool.pytest.ini_options] +markers = [ + "skip_on_hpc: mark a test that should not be run on HPC", +] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index beb91f3..0000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -markers = - skip_on_hpc: marks tests that should not be run on HPC (deselect with '-m "not skip_on_hpc"')