Skip to content

Commit

Permalink
Merge pull request #30 from munechika-koyo/develop
Browse files Browse the repository at this point in the history
Add tests scripts
  • Loading branch information
munechika-koyo authored Aug 10, 2024
2 parents f00d0f3 + fd389b1 commit d962a66
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Pixi 🟨
uses: prefix-dev/[email protected].0
uses: prefix-dev/[email protected].1
with:
environments: build

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Pixi 🟨
uses: prefix-dev/[email protected].0
uses: prefix-dev/[email protected].1
with:
environments: build

Expand All @@ -43,7 +43,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Pixi 🟨
uses: prefix-dev/[email protected].0
uses: prefix-dev/[email protected].1
with:
environments: build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Pixi 🟨
uses: prefix-dev/[email protected].0
uses: prefix-dev/[email protected].1
with:
environments: ${{ matrix.environment }}

Expand Down
2 changes: 2 additions & 0 deletions cherab/inversion/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,3 +40,4 @@ endif
# subdir('bayesian')
subdir('tools')
subdir('data')
subdir('tests')
2 changes: 1 addition & 1 deletion cherab/inversion/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
13 changes: 13 additions & 0 deletions cherab/inversion/tests/meson.build
Original file line number Diff line number Diff line change
@@ -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',
)
3 changes: 0 additions & 3 deletions cherab/inversion/tests/test_mfr.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from contextlib import nullcontext as does_not_raise
from pathlib import Path

import numpy as np
import pytest
Expand All @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions cherab/inversion/tools/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ py.install_sources(
python_sources,
subdir: 'cherab/inversion/tools',
)

subdir('tests')
9 changes: 9 additions & 0 deletions cherab/inversion/tools/tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
py.install_sources(
[
'__init__.py',
'test_spinner.py',
'test_scientific_format.py',
],
subdir: 'cherab/inversion/tools/tests',
install_tag: 'tests',
)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" },
Expand Down

0 comments on commit d962a66

Please sign in to comment.