From 02430ccbe39dfbcea9c12aba5e4d920c6335c91a Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Thu, 25 Jul 2024 15:43:25 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=85=20Update=20import=20statement=20i?= =?UTF-8?q?n=20conftest.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cherab/inversion/tests/conftest.py | 2 +- cherab/inversion/tests/test_mfr.py | 3 --- pyproject.toml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cherab/inversion/tests/conftest.py b/cherab/inversion/tests/conftest.py index 4922b19..69e9216 100644 --- a/cherab/inversion/tests/conftest.py +++ b/cherab/inversion/tests/conftest.py @@ -1,7 +1,7 @@ import numpy as np import pytest -from ..data import get_sample_data +from cherab.inversion.data import get_sample_data def true_func(x): diff --git a/cherab/inversion/tests/test_mfr.py b/cherab/inversion/tests/test_mfr.py index ecf7556..5d232ca 100644 --- a/cherab/inversion/tests/test_mfr.py +++ b/cherab/inversion/tests/test_mfr.py @@ -1,5 +1,4 @@ from contextlib import nullcontext as does_not_raise -from pathlib import Path import numpy as np import pytest @@ -10,8 +9,6 @@ from cherab.inversion.lcurve import Lcurve from cherab.inversion.mfr import Mfr -BASE = Path(__file__).parent - @pytest.fixture def mfr(test_tomography_data): diff --git a/pyproject.toml b/pyproject.toml index 40a5275..e3b4d0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "mesonpy" [project] name = "cherab-inversion" description = "Cherab inversion framework" -version = "0.3.0" +version = "0.3.1" readme = "README.md" authors = [ { name = "Koyo Munechika", email = "munechika.koyo@torus.nr.titech.ac.jp" }, From eb290aa34b03adcaedbe7cad8ad9c598402a23d1 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Sat, 10 Aug 2024 16:01:59 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=85=20Add=20tests=20for=20inversion?= =?UTF-8?q?=20module=20and=20tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit with "tests" tag for `install_tag` --- cherab/inversion/meson.build | 2 ++ cherab/inversion/tests/meson.build | 13 +++++++++++++ cherab/inversion/tools/meson.build | 2 ++ cherab/inversion/tools/tests/meson.build | 9 +++++++++ 4 files changed, 26 insertions(+) create mode 100644 cherab/inversion/tests/meson.build create mode 100644 cherab/inversion/tools/tests/meson.build diff --git a/cherab/inversion/meson.build b/cherab/inversion/meson.build index 5481579..c79ef28 100644 --- a/cherab/inversion/meson.build +++ b/cherab/inversion/meson.build @@ -27,6 +27,7 @@ if not fs.exists('cherab/inversion/version.py') build_by_default: true, install: true, install_dir: py.get_install_dir() / 'cherab/inversion', + install_tag: 'python-runtime', ) else # When building from sdist, version.py exists and should be included @@ -39,3 +40,4 @@ endif # subdir('bayesian') subdir('tools') subdir('data') +subdir('tests') diff --git a/cherab/inversion/tests/meson.build b/cherab/inversion/tests/meson.build new file mode 100644 index 0000000..957abb8 --- /dev/null +++ b/cherab/inversion/tests/meson.build @@ -0,0 +1,13 @@ +py.install_sources( + [ + '__init__.py', + 'conftest.py', + 'test_core.py', + 'test_derivative.py', + 'test_gcv.py', + 'test_lcurve.py', + 'test_mfr.py', + ], + subdir: 'cherab/inversion/tests', + install_tag: 'tests', +) diff --git a/cherab/inversion/tools/meson.build b/cherab/inversion/tools/meson.build index 205983a..9b5705d 100644 --- a/cherab/inversion/tools/meson.build +++ b/cherab/inversion/tools/meson.build @@ -8,3 +8,5 @@ py.install_sources( python_sources, subdir: 'cherab/inversion/tools', ) + +subdir('tests') diff --git a/cherab/inversion/tools/tests/meson.build b/cherab/inversion/tools/tests/meson.build new file mode 100644 index 0000000..fbcab95 --- /dev/null +++ b/cherab/inversion/tools/tests/meson.build @@ -0,0 +1,9 @@ +py.install_sources( + [ + '__init__.py', + 'test_spinner.py', + 'test_scientific_format.py', + ], + subdir: 'cherab/inversion/tools/tests', + install_tag: 'tests', +) From fd389b1fd007a334d7badc15bee2606a0d3acff4 Mon Sep 17 00:00:00 2001 From: munechika-koyo Date: Sat, 10 Aug 2024 16:29:13 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20Pixi=20setup?= =?UTF-8?q?=20to=20version=200.8.1=20in=20build=20and=20deploy=20workflows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_dist.yml | 2 +- .github/workflows/deploy-pypi.yml | 4 ++-- .github/workflows/pytest.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_dist.yml b/.github/workflows/build_dist.yml index 2b50f12..421de04 100644 --- a/.github/workflows/build_dist.yml +++ b/.github/workflows/build_dist.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Pixi 🟨 - uses: prefix-dev/setup-pixi@v0.8.0 + uses: prefix-dev/setup-pixi@v0.8.1 with: environments: build diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index 48e459c..aa0677f 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Pixi 🟨 - uses: prefix-dev/setup-pixi@v0.8.0 + uses: prefix-dev/setup-pixi@v0.8.1 with: environments: build @@ -43,7 +43,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Pixi 🟨 - uses: prefix-dev/setup-pixi@v0.8.0 + uses: prefix-dev/setup-pixi@v0.8.1 with: environments: build diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 61ec308..cd79d9e 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Set up Pixi 🟨 - uses: prefix-dev/setup-pixi@v0.8.0 + uses: prefix-dev/setup-pixi@v0.8.1 with: environments: ${{ matrix.environment }}