From b64de00e4b451e086d5136e3e270d79e0ed4b762 Mon Sep 17 00:00:00 2001 From: shimwell Date: Sun, 27 Oct 2024 14:15:05 +0000 Subject: [PATCH 1/2] removing nesst --- .github/workflows/python-publish.yml | 8 ++++---- pyproject.toml | 2 +- tests/test_average_neutron_energy.py | 22 ++++++++++++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 376bf16..3551b0b 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,7 +3,7 @@ # # maturin generate-ci github -o .github/workflows/python-publish.yml --pytest --platform manylinux windows # -name: CI +name: PyPI publish on: push: @@ -60,7 +60,7 @@ jobs: set -e python3 -m venv .venv source .venv/bin/activate - pip install fusion_neutron_utils nesst --find-links dist --force-reinstall + pip install fusion_neutron_utils --find-links dist --force-reinstall pip install pytest pytest - name: pytest @@ -76,7 +76,7 @@ jobs: pip3 install -U pip pytest run: | set -e - pip3 install fusion_neutron_utils nesst --find-links dist --force-reinstall + pip3 install fusion_neutron_utils --find-links dist --force-reinstall pytest windows: @@ -112,7 +112,7 @@ jobs: set -e python3 -m venv .venv source .venv/Scripts/activate - pip install fusion_neutron_utils nesst --find-links dist --force-reinstall + pip install fusion_neutron_utils --find-links dist --force-reinstall pip install pytest pytest diff --git a/pyproject.toml b/pyproject.toml index ea6d789..6fa1dc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,4 +15,4 @@ dynamic = ["version"] features = ["pyo3/extension-module"] [project.optional-dependencies] -tests = ["pytest", "scipy==1.13.1", "NeSST"] +tests = ["pytest", "scipy==1.13.1"] diff --git a/tests/test_average_neutron_energy.py b/tests/test_average_neutron_energy.py index d8557c4..d432578 100644 --- a/tests/test_average_neutron_energy.py +++ b/tests/test_average_neutron_energy.py @@ -1,14 +1,24 @@ -import NeSST as nst from fusion_neutron_utils import neutron_energy_mean_and_std_dev from pytest import approx +# +# import NeSST as nst +# ion_temperature = 19e3 +# nesst_dt_mean, nesst_dt_std_dev, nest_dt_var = nst.DTprimspecmoments(ion_temperature) +# nesst_dd_mean, nesst_dd_std_dev, nest_dd_var = nst.DDprimspecmoments(ion_temperature) +# print('nesst_dt_mean',nesst_dt_mean) +# print('nesst_dd_mean',nesst_dd_mean) +# print('nesst_dt_std_dev',nesst_dt_std_dev) +# print('nesst_dd_std_dev',nesst_dd_std_dev) +nesst_dt_mean=14078902.211125117 +nesst_dd_mean=2504155.2217132743 +nesst_dt_std_dev=329151.6960472965 +nesst_dd_std_dev=156175.79383984138 + def test_mean_energy_with_nesst(): ion_temperature = 19e3 - nesst_dt_mean, nest_dt_std_dev, nest_dt_var = nst.DTprimspecmoments(ion_temperature) - nesst_dd_mean, nest_dd_std_dev, nest_dd_var = nst.DDprimspecmoments(ion_temperature) - fnu_dd_mean, fnu_dd_std_dev = neutron_energy_mean_and_std_dev( reaction='D+D=n+He3', ion_temperature=ion_temperature, @@ -24,8 +34,8 @@ def test_mean_energy_with_nesst(): ) assert nesst_dt_mean == approx(fnu_dt_mean, rel=1e-6) assert nesst_dd_mean == approx(fnu_dd_mean, rel=1e-6) - assert nest_dt_std_dev == approx(fnu_dt_std_dev, rel=1e-6) - assert nest_dd_std_dev == approx(fnu_dd_std_dev, rel=1e-6) + assert nesst_dt_std_dev == approx(fnu_dt_std_dev, rel=1e-6) + assert nesst_dd_std_dev == approx(fnu_dd_std_dev, rel=1e-6) def test_mean_energy(): mean, std_dev = neutron_energy_mean_and_std_dev( From 928f7aabb519c5a220b31a242dcf436c8691a810 Mon Sep 17 00:00:00 2001 From: shimwell Date: Sun, 27 Oct 2024 14:28:53 +0000 Subject: [PATCH 2/2] disable pytest --- .github/workflows/python-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3551b0b..775a19f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,7 +3,7 @@ # # maturin generate-ci github -o .github/workflows/python-publish.yml --pytest --platform manylinux windows # -name: PyPI publish +name: CI on: push: @@ -62,7 +62,7 @@ jobs: source .venv/bin/activate pip install fusion_neutron_utils --find-links dist --force-reinstall pip install pytest - pytest + # pytest - name: pytest if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }} uses: uraimo/run-on-arch-action@v2 @@ -77,7 +77,7 @@ jobs: run: | set -e pip3 install fusion_neutron_utils --find-links dist --force-reinstall - pytest + # pytest windows: runs-on: ${{ matrix.platform.runner }} @@ -114,7 +114,7 @@ jobs: source .venv/Scripts/activate pip install fusion_neutron_utils --find-links dist --force-reinstall pip install pytest - pytest + # pytest sdist: runs-on: ubuntu-latest