From ea598df27d5aed0e12179c593fa794526836c12d Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 09:59:04 +0200 Subject: [PATCH 01/22] parallel tox --- .github/workflows/ci_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 65f603dba..d508187d9 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -77,7 +77,7 @@ jobs: python -c "import pip; print(f'pip {pip.__version__}')" python -c "import tox; print(f'tox {tox.__version__}')" - name: Run tests - run: tox -e ${{ matrix.tox_env }} + run: tox -p auto -e ${{ matrix.tox_env }} - name: Upload coverage to codecov if: "endsWith(matrix.tox_env, '-cov')" uses: codecov/codecov-action@v2 From 37866df3e7ba67f96023ecd0110f4f8edd7b2618 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 10:12:45 +0200 Subject: [PATCH 02/22] pytest -p auto --- .github/workflows/ci_test.yml | 2 +- tox.ini | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index d508187d9..65f603dba 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -77,7 +77,7 @@ jobs: python -c "import pip; print(f'pip {pip.__version__}')" python -c "import tox; print(f'tox {tox.__version__}')" - name: Run tests - run: tox -p auto -e ${{ matrix.tox_env }} + run: tox -e ${{ matrix.tox_env }} - name: Upload coverage to codecov if: "endsWith(matrix.tox_env, '-cov')" uses: codecov/codecov-action@v2 diff --git a/tox.ini b/tox.ini index bc9b94cf6..bc5c5bb5d 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,7 @@ passenv = deps = pytest + pytest-xdist cov: coverage cov: pytest-cov cov: pytest-remotedata @@ -42,8 +43,8 @@ deps = setuptools commands = pip freeze - !cov: pytest - cov: pytest -v --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} + !cov: pytest -p auto + cov: pytest -p auto -v --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml depends = @@ -70,6 +71,7 @@ deps = matplotlib==3.2.0 scipy==1.4.1 pytest + pytest-xdist coverage hypothesis<=6.72.0 commands = {posargs:pytest} From ae40390d798c86bfae0b6cde72557e19e0cd7b62 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 10:14:36 +0200 Subject: [PATCH 03/22] -n --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index bc5c5bb5d..0f5cad571 100644 --- a/tox.ini +++ b/tox.ini @@ -43,8 +43,8 @@ deps = setuptools commands = pip freeze - !cov: pytest -p auto - cov: pytest -p auto -v --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} + !cov: pytest -n auto + cov: pytest -n auto -v --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml depends = From 2dbbf265faec4b5b677b1a28a2250020a1361cc8 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 10:18:01 +0200 Subject: [PATCH 04/22] oldestdeps --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0f5cad571..86d4e27a3 100644 --- a/tox.ini +++ b/tox.ini @@ -74,7 +74,7 @@ deps = pytest-xdist coverage hypothesis<=6.72.0 -commands = {posargs:pytest} +commands = {posargs:pytest -n auto} [testenv:report] skip_install = true From 4d072d21e212f0115bdd1a93bfbcfb6855705caa Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 10:36:32 +0200 Subject: [PATCH 05/22] test_noisefit --- tests/test_noisefit.py | 55 +++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/tests/test_noisefit.py b/tests/test_noisefit.py index 16e7cdc31..69f652cec 100644 --- a/tests/test_noisefit.py +++ b/tests/test_noisefit.py @@ -6,27 +6,38 @@ from io import StringIO import numpy as np +import pytest -par = """ - ELAT 1.3 1 - ELONG 2.5 1 - F0 100 1 - F1 1e-13 1 - PEPOCH 55000 - EPHEM DE440 - EFAC mjd 50000 53000 2 1 - EQUAD mjd 53000 55000 0.8 1 -""" -m = get_model(StringIO(par)) -t = make_fake_toas_uniform(50000, 55000, 200, m, add_noise=True) +@pytest.fixture +def model_and_toas_1(): + par = """ + ELAT 1.3 1 + ELONG 2.5 1 + F0 100 1 + F1 1e-13 1 + PEPOCH 55000 + EPHEM DE440 + EFAC mjd 50000 53000 2 1 + EQUAD mjd 53000 55000 0.8 1 + """ -m2, t2 = get_model_and_toas( - datadir / "ecorr_fit_test.par", datadir / "ecorr_fit_test.tim" -) + m = get_model(StringIO(par)) + t = make_fake_toas_uniform(50000, 55000, 200, m, add_noise=True) + return m, t + + +@pytest.fixture +def model_and_toas_2(): + return get_model_and_toas( + datadir / "ecorr_fit_test.par", datadir / "ecorr_fit_test.tim" + ) + + +def test_white_noise_fit(model_and_toas_1): + m, t = model_and_toas_1 -def test_white_noise_fit(): assert m.EFAC1.uncertainty_value == 0 and m.EQUAD1.uncertainty_value == 0 ftr = DownhillWLSFitter(t, m) @@ -47,7 +58,9 @@ def test_white_noise_fit(): ) -def test_white_noise_refit(): +def test_white_noise_refit(model_and_toas_1): + m, t = model_and_toas_1 + ftr = DownhillWLSFitter(t, m) ftr.model.EFAC1.value = 1.5 @@ -67,7 +80,9 @@ def test_white_noise_refit(): ) -def test_ecorr_fit(): +def test_ecorr_fit(model_and_toas_2): + m2, t2 = model_and_toas_2 + ftr = DownhillGLSFitter(t2, m2) ftr.fit_toas() @@ -79,7 +94,9 @@ def test_ecorr_fit(): ) -def test_ecorr_refit(): +def test_ecorr_refit(model_and_toas_2): + m2, t2 = model_and_toas_2 + ftr = DownhillGLSFitter(t2, m2) ftr.model.ECORR1.value = 0.75 From f0781b299c494b0860c1815e2565322862200e77 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 10:42:22 +0200 Subject: [PATCH 06/22] CHANGELOG --- CHANGELOG-unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 2899b99f8..bf668fc9c 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -9,6 +9,7 @@ the released changes. ## Unreleased ### Changed +- Run CI tests in parallel ### Added ### Fixed ### Removed From fb3c6f1f7cc01f03bed325caf3385961abc74f59 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 10:48:09 +0200 Subject: [PATCH 07/22] test_publish --- tests/test_publish.py | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/tests/test_publish.py b/tests/test_publish.py index f8663ff3d..cab74adb1 100644 --- a/tests/test_publish.py +++ b/tests/test_publish.py @@ -5,24 +5,37 @@ from pint.scripts import pintpublish import os -data_NGC6440E = get_model_and_toas(datadir / "NGC6440E.par", datadir / "NGC6440E.tim") +@pytest.fixture +def data_NGC6440E(): + return get_model_and_toas(datadir / "NGC6440E.par", datadir / "NGC6440E.tim") -def test_NGC6440E(): + +@pytest.fixture +def data_J0613m0200_NANOGrav_9yv1(): + return get_model_and_toas( + datadir / "J0613-0200_NANOGrav_9yv1.gls.par", + datadir / "J0613-0200_NANOGrav_9yv1.tim", + ) + + +@pytest.fixture +def data_J1614m2230_NANOGrav_12yv3_wb(): + return get_model_and_toas( + datadir / "J1614-2230_NANOGrav_12yv3.wb.gls.par", + datadir / "J1614-2230_NANOGrav_12yv3.wb.tim", + ) + + +def test_NGC6440E(data_NGC6440E): m, t = data_NGC6440E output = publish(m, t) assert "1748-2021E" in output assert "DE421" in output -data_J0613m0200_NANOGrav_9yv1 = get_model_and_toas( - datadir / "J0613-0200_NANOGrav_9yv1.gls.par", - datadir / "J0613-0200_NANOGrav_9yv1.tim", -) - - @pytest.mark.parametrize("full", [True, False]) -def test_J0613m0200_NANOGrav_9yv1(full): +def test_J0613m0200_NANOGrav_9yv1(data_J0613m0200_NANOGrav_9yv1, full): m, t = data_J0613m0200_NANOGrav_9yv1 output = publish( m, t, include_dmx=full, include_fd=full, include_noise=full, include_jumps=full @@ -39,14 +52,8 @@ def test_J0613m0200_NANOGrav_9yv1(full): assert not full or "RNAMP" in output -data_J1614m2230_NANOGrav_12yv3_wb = get_model_and_toas( - datadir / "J1614-2230_NANOGrav_12yv3.wb.gls.par", - datadir / "J1614-2230_NANOGrav_12yv3.wb.tim", -) - - @pytest.mark.parametrize("full", [True, False]) -def test_J1614m2230_NANOGrav_12yv3_wb(full): +def test_J1614m2230_NANOGrav_12yv3_wb(data_J1614m2230_NANOGrav_12yv3_wb, full): m, t = data_J1614m2230_NANOGrav_12yv3_wb output = publish( m, t, include_dmx=full, include_fd=full, include_noise=full, include_jumps=full From a510a3ce80edc3c8ca4a39d68f5759434e5efb96 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 12:02:42 +0200 Subject: [PATCH 08/22] test_timing_model --- tests/test_timing_model.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/test_timing_model.py b/tests/test_timing_model.py index 2cd37645c..5c9456757 100644 --- a/tests/test_timing_model.py +++ b/tests/test_timing_model.py @@ -42,9 +42,6 @@ def timfile_nojumps(): return get_TOAs(os.path.join(datadir, "NGC6440E.tim")) -len_timfile_nojumps = len(get_TOAs(os.path.join(datadir, "NGC6440E.tim"))) - - class TestModelBuilding: def setup_method(self): self.parfile = os.path.join(datadir, "J0437-4715.par") From 8ed1af7bf2d6b93d09966d4535158b50d5a04ee0 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 15:55:13 +0200 Subject: [PATCH 09/22] -- --- tests/test_toa_shuffle.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test_toa_shuffle.py b/tests/test_toa_shuffle.py index 2d757c09b..cf97b8ce1 100644 --- a/tests/test_toa_shuffle.py +++ b/tests/test_toa_shuffle.py @@ -18,12 +18,6 @@ import pint.residuals from pint.models import get_model -shuffletoas = """FORMAT 1 -test 1234.0 54321 0 pks -test2 888 59055 0 meerkat -test3 350 59000 0 gbt -""" - class TOAOrderSetup: parfile = os.path.join(datadir, "NGC6440E.par") @@ -95,6 +89,11 @@ def test_resorting_toas_chi2_match(sortkey): class TOALineOrderSetup: + shuffletoas = """FORMAT 1 + test 1234.0 54321 0 pks + test2 888 59055 0 meerkat + test3 350 59000 0 gbt + """ timfile = io.StringIO(shuffletoas) t = toa.get_TOAs(timfile) timfile.seek(0) From 119b749f52af64f65b934ce2dd1bd06b257740af Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 2 Jul 2024 16:24:44 +0200 Subject: [PATCH 10/22] not verbose --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 86d4e27a3..6fa6a9a7c 100644 --- a/tox.ini +++ b/tox.ini @@ -44,7 +44,7 @@ deps = commands = pip freeze !cov: pytest -n auto - cov: pytest -n auto -v --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} + cov: pytest -n auto --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml depends = From 8bee2c66a2a8a441397fe33d68ba5552f1b93909 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 13 Aug 2024 10:43:48 +0200 Subject: [PATCH 11/22] rerun --- tox.ini | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index dce11bda3..53134d7dd 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,8 @@ envlist = skip_missing_interpreters = True [tool:pytest] -# pytest docs seem to say that this section should be called just pytest, not tool:pytest; is it working? +# pytest docs seem to say that this section should be called just pytest, +# not tool:pytest; is it working? testpaths = tests addopts = --cov-report=term-missing @@ -34,6 +35,7 @@ passenv = deps = pytest pytest-xdist + pytest-rerunfailures cov: coverage cov: pytest-cov cov: pytest-remotedata @@ -43,8 +45,8 @@ deps = setuptools commands = pip freeze - !cov: pytest -n auto - cov: pytest -n auto --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} + !cov: pytest -n auto --reruns 5 + cov: pytest -n auto --reruns 5 --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml depends = @@ -72,9 +74,10 @@ deps = scipy==1.4.1 pytest pytest-xdist + pytest-rerunfailures coverage hypothesis<=6.72.0 -commands = {posargs:pytest -n auto} +commands = {posargs:pytest -n auto --reruns 5} [testenv:report] skip_install = true From e6db751bed4f74e1cdb62226f26c864cb284ad42 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 13 Aug 2024 10:50:28 +0200 Subject: [PATCH 12/22] CHANGELOG --- CHANGELOG-unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 1ee8b6ed6..89f18dc9f 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -11,7 +11,7 @@ the released changes. ### Changed - Moved the events -> TOAs and photon weights code into the function `load_events_weights` within `event_optimize`. - Updated the `maxMJD` argument in `event_optimize` to default to the current mjd -- Run CI tests in parallel +- Run CI tests in parallel, re-run failed tests - `maskParameter.__repr__()` output now includes the frozen attribute. - Changed default value of `FDJUMPLOG` to `Y` - Bumped `black` version to 24.x From 558058078ebeec76dad1e75f831948b39888f634 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 13 Aug 2024 10:51:05 +0200 Subject: [PATCH 13/22] CHANGELOG --- CHANGELOG-unreleased.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index 89f18dc9f..7cfe0c486 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -11,7 +11,7 @@ the released changes. ### Changed - Moved the events -> TOAs and photon weights code into the function `load_events_weights` within `event_optimize`. - Updated the `maxMJD` argument in `event_optimize` to default to the current mjd -- Run CI tests in parallel, re-run failed tests +- Run CI tests in parallel, re-run failed tests (for intermittent failures due to random chance) - `maskParameter.__repr__()` output now includes the frozen attribute. - Changed default value of `FDJUMPLOG` to `Y` - Bumped `black` version to 24.x From b659ac4adbdc81beaf0145c9995f6ed916a8324e Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 13 Aug 2024 11:00:09 +0200 Subject: [PATCH 14/22] oversubscribe --- requirements_dev.txt | 2 ++ tox.ini | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/requirements_dev.txt b/requirements_dev.txt index a00511840..d210e4854 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -12,6 +12,8 @@ wheel>=0.29.0 pytest>=4.3 pytest-cov>=2.7.1 pytest-runner>=5.1 +pytest-xdist +pytest-rerunfailures flake8>=3.7 pep8-naming>=0.8.2 flake8-docstrings>=1.4 diff --git a/tox.ini b/tox.ini index 53134d7dd..bba6c8f7d 100644 --- a/tox.ini +++ b/tox.ini @@ -45,8 +45,8 @@ deps = setuptools commands = pip freeze - !cov: pytest -n auto --reruns 5 - cov: pytest -n auto --reruns 5 --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} + !cov: pytest -n 6 --reruns 5 + cov: pytest -n 6 --reruns 5 --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml depends = @@ -77,7 +77,7 @@ deps = pytest-rerunfailures coverage hypothesis<=6.72.0 -commands = {posargs:pytest -n auto --reruns 5} +commands = {posargs:pytest -n 6 --reruns 5} [testenv:report] skip_install = true From 0ca156d1f77f3fd90f2b39e32b290d1aa135805d Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Tue, 13 Aug 2024 11:14:11 +0200 Subject: [PATCH 15/22] test_toa_shuffle --- tests/test_toa_shuffle.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tests/test_toa_shuffle.py b/tests/test_toa_shuffle.py index cf97b8ce1..cd7bd1b3c 100644 --- a/tests/test_toa_shuffle.py +++ b/tests/test_toa_shuffle.py @@ -23,22 +23,17 @@ class TOAOrderSetup: parfile = os.path.join(datadir, "NGC6440E.par") model = get_model(parfile) # fake a multi-telescope, multi-frequency data-set and make sure the results don't depend on TOA order - fakes = [ + t = ( simulation.make_fake_toas_uniform( 55000, 55500, 30, model=model, freq=1400 * u.MHz, obs="ao" - ), - simulation.make_fake_toas_uniform( + ) + + simulation.make_fake_toas_uniform( 55010, 55500, 40, model=model, freq=800 * u.MHz, obs="gbt" - ), - simulation.make_fake_toas_uniform( + ) + + simulation.make_fake_toas_uniform( 55020, 55500, 50, model=model, freq=2000 * u.MHz, obs="@" - ), - ] - f = io.StringIO() - for t in fakes: - t.write_TOA_file(f) - f.seek(0) - t = toa.get_TOAs(f) + ) + ) r = pint.residuals.Residuals(t, model, subtract_mean=False) @classmethod From 0eea13a5f37488254028363c48de0c4e911f5ddd Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 09:19:47 +0200 Subject: [PATCH 16/22] reduce nprocs for macos --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index bba6c8f7d..96e6f403d 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ deps = setuptools commands = pip freeze - !cov: pytest -n 6 --reruns 5 + !cov: pytest --reruns 5 cov: pytest -n 6 --reruns 5 --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml From b65a136cb2d3ca90e5b86c46543118991e04e987 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 09:20:16 +0200 Subject: [PATCH 17/22] tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 96e6f403d..7028ea667 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ deps = setuptools commands = pip freeze - !cov: pytest --reruns 5 + !cov: pytest -n 2 --reruns 5 cov: pytest -n 6 --reruns 5 --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml From 80111e4a819087c4537115d0e9fc03de791f591f Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 09:24:24 +0200 Subject: [PATCH 18/22] verbose tests --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 7028ea667..c5f6e5737 100644 --- a/tox.ini +++ b/tox.ini @@ -45,8 +45,8 @@ deps = setuptools commands = pip freeze - !cov: pytest -n 2 --reruns 5 - cov: pytest -n 6 --reruns 5 --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} + !cov: pytest -n 2 --reruns 5 --verbose + cov: pytest -n 6 --reruns 5 --verbose --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml depends = @@ -77,7 +77,7 @@ deps = pytest-rerunfailures coverage hypothesis<=6.72.0 -commands = {posargs:pytest -n 6 --reruns 5} +commands = {posargs:pytest -n 6 --reruns 5 --verbose} [testenv:report] skip_install = true From d0a85424e0106fbb2d5c3c0c59c5839a9c2e51f6 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 09:27:32 +0200 Subject: [PATCH 19/22] no parallel in macos --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c5f6e5737..a56bc2ef9 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,7 @@ deps = setuptools commands = pip freeze - !cov: pytest -n 2 --reruns 5 --verbose + !cov: pytest --reruns 5 --verbose cov: pytest -n 6 --reruns 5 --verbose --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml From 87ffae37359cd977f66205fb8f8382f2ad18f02c Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 10:40:18 +0200 Subject: [PATCH 20/22] refresh --- tests/refresh.py | 4 ++++ tox.ini | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/refresh.py diff --git a/tests/refresh.py b/tests/refresh.py new file mode 100644 index 000000000..fce039c31 --- /dev/null +++ b/tests/refresh.py @@ -0,0 +1,4 @@ +from pint.models import get_model_and_toas +from pinttestdata import datadir + +get_model_and_toas(datadir / "NGC6440E.par", datadir / "NGC6440E.tim") diff --git a/tox.ini b/tox.ini index a56bc2ef9..0108b15a7 100644 --- a/tox.ini +++ b/tox.ini @@ -45,6 +45,7 @@ deps = setuptools commands = pip freeze + python tests/refresh.py !cov: pytest --reruns 5 --verbose cov: pytest -n 6 --reruns 5 --verbose --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml @@ -77,7 +78,10 @@ deps = pytest-rerunfailures coverage hypothesis<=6.72.0 -commands = {posargs:pytest -n 6 --reruns 5 --verbose} +commands = + python tests/refresh.py + posargs: pytest -n 6 --reruns 5 --verbose + [testenv:report] skip_install = true From 3e3bdfdaca78f93b6e93cf3fec4893a831e605f9 Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 10:43:22 +0200 Subject: [PATCH 21/22] -- --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 0108b15a7..4c2772079 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,7 @@ deps = commands = pip freeze python tests/refresh.py - !cov: pytest --reruns 5 --verbose + !cov: pytest -n 6 --reruns 5 --verbose cov: pytest -n 6 --reruns 5 --verbose --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml @@ -80,7 +80,7 @@ deps = hypothesis<=6.72.0 commands = python tests/refresh.py - posargs: pytest -n 6 --reruns 5 --verbose + pytest -n 6 --reruns 5 --verbose [testenv:report] From 4555fbe16165049ebff6aa011e1ea9358c8f643f Mon Sep 17 00:00:00 2001 From: Abhimanyu Susobhanan Date: Thu, 29 Aug 2024 10:55:22 +0200 Subject: [PATCH 22/22] ignore --- tests/refresh.py | 4 ---- tox.ini | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 tests/refresh.py diff --git a/tests/refresh.py b/tests/refresh.py deleted file mode 100644 index fce039c31..000000000 --- a/tests/refresh.py +++ /dev/null @@ -1,4 +0,0 @@ -from pint.models import get_model_and_toas -from pinttestdata import datadir - -get_model_and_toas(datadir / "NGC6440E.par", datadir / "NGC6440E.tim") diff --git a/tox.ini b/tox.ini index 4c2772079..3b714a73f 100644 --- a/tox.ini +++ b/tox.ini @@ -45,8 +45,8 @@ deps = setuptools commands = pip freeze - python tests/refresh.py - !cov: pytest -n 6 --reruns 5 --verbose + !cov: pytest --reruns 5 --verbose tests/test_toa_selection.py + !cov: pytest -n 6 --reruns 5 --verbose --ignore=tests/test_toa_selection.py cov: pytest -n 6 --reruns 5 --verbose --pyargs tests --cov=pint --cov-config={toxinidir}/.coveragerc {posargs} cov: coverage xml -o {toxinidir}/coverage.xml @@ -79,7 +79,6 @@ deps = coverage hypothesis<=6.72.0 commands = - python tests/refresh.py pytest -n 6 --reruns 5 --verbose