diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 79d3ca0a2..e550e50d4 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -41,9 +41,9 @@ jobs: # - os: ubuntu-latest # python: '3.10' # tox_env: 'py310-test-alldeps-cov' - - os: macos-12 - python: '3.13' - tox_env: 'py313-test' + # - os: macos-12 + # python: '3.13' + # tox_env: 'py313-test' # - os: windows-latest # python: '3.8' # tox_env: 'py38-test' @@ -94,3 +94,47 @@ jobs: # with: # name: documentation # path: .tox/docs_out/ + macos-latest-py313: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Set-Up Python Env + uses: mamba-org/setup-micromamba@v1 + with: + init-shell: bash + environment-name: pint + cache-environment: true + cache-downloads: true + create-args: >- + --platform osx-64 + -c conda-forge + python=3.13 + astropy + git + - name: Install base dependencies + shell: bash -el {0} + run: | + python -m pip install --upgrade pip + python -m pip install tox pytest hypothesis numdifftools pathos setuptools + - name: Print OS, machine info + shell: bash -el {0} + run: | + python -c "import os; print(f'os {os.uname()}')" + python -c "import platform; print(f'processor {platform.processor()}')" + python -c "import numpy as np; print(f'eps: {np.finfo(np.longdouble).eps}')" + - name: Print Python, pip, and tox versions + shell: bash -el {0} + run: | + python -c "import sys; print(f'Python {sys.version}')" + python -c "import pip; print(f'pip {pip.__version__}')" + python -c "import tox; print(f'tox {tox.__version__}')" + - name: Install PINT and requirements + shell: bash -el {0} + run: | + python -m pip install -r requirements.txt + python -m pip install -r requirements_dev.txt + python -m pip install --force-reinstall --no-deps . + - name: Run tests + shell: bash -el {0} + run: pytest -v --pyargs tests + \ No newline at end of file diff --git a/CHANGELOG-unreleased.md b/CHANGELOG-unreleased.md index cd766f352..120c8a73e 100644 --- a/CHANGELOG-unreleased.md +++ b/CHANGELOG-unreleased.md @@ -20,8 +20,11 @@ the released changes. - When TCB->TDB conversion info is missing, will print parameter name - Piecewise-constant model for chromatic variations (CMX) - `add_param` returns the name of the parameter (useful for numbered parameters) +- micromamba CI environment for testing macOS-latest, without tox ### Fixed - Changed WAVE_OM units from 1/d to rad/d. - When EQUAD is created from TNEQ, has proper TCB->TDB conversion info - TOA selection masks will work when only TOA is the first one ### Removed +- macOS 12 CI + diff --git a/requirements_dev.txt b/requirements_dev.txt index f5dfff94b..de85bbaca 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -27,7 +27,6 @@ jupytext pdbpp tox pre-commit -typed-ast>=1.5.0 black~=24.0 pygments ipython diff --git a/tests/test_phase_offset.py b/tests/test_phase_offset.py index d28fc26c0..61d46bd5f 100644 --- a/tests/test_phase_offset.py +++ b/tests/test_phase_offset.py @@ -26,7 +26,7 @@ def test_phase_offset(): m = get_model(io.StringIO(simplepar)) assert hasattr(m, "PHOFF") and m.PHOFF.value == 0.2 - + np.random.seed(1929) t = make_fake_toas_uniform( startMJD=50000, endMJD=50500, diff --git a/tox.ini b/tox.ini index efadd9b9c..60f8fa754 100644 --- a/tox.ini +++ b/tox.ini @@ -66,7 +66,7 @@ deps = hypothesis<=6.72.0 setuptools # can change this as needed for a single test run -commands = pytest tests/test_model_derivatives.py +commands = pytest tests/test_precision.py [testenv:ephemeris_connection]