Skip to content

Commit f3362ef

Browse files
authored
Merge pull request #1865 from dlakaplan/mambaci
Add MacOS CI workflow using mamba
2 parents f1f719b + 6491552 commit f3362ef

File tree

5 files changed

+52
-6
lines changed

5 files changed

+52
-6
lines changed

.github/workflows/ci_test.yml

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ jobs:
4141
# - os: ubuntu-latest
4242
# python: '3.10'
4343
# tox_env: 'py310-test-alldeps-cov'
44-
- os: macos-12
45-
python: '3.13'
46-
tox_env: 'py313-test'
44+
# - os: macos-12
45+
# python: '3.13'
46+
# tox_env: 'py313-test'
4747
# - os: windows-latest
4848
# python: '3.8'
4949
# tox_env: 'py38-test'
@@ -94,3 +94,47 @@ jobs:
9494
# with:
9595
# name: documentation
9696
# path: .tox/docs_out/
97+
macos-latest-py313:
98+
runs-on: macos-latest
99+
steps:
100+
- uses: actions/checkout@v4
101+
- name: Set-Up Python Env
102+
uses: mamba-org/setup-micromamba@v1
103+
with:
104+
init-shell: bash
105+
environment-name: pint
106+
cache-environment: true
107+
cache-downloads: true
108+
create-args: >-
109+
--platform osx-64
110+
-c conda-forge
111+
python=3.13
112+
astropy
113+
git
114+
- name: Install base dependencies
115+
shell: bash -el {0}
116+
run: |
117+
python -m pip install --upgrade pip
118+
python -m pip install tox pytest hypothesis numdifftools pathos setuptools
119+
- name: Print OS, machine info
120+
shell: bash -el {0}
121+
run: |
122+
python -c "import os; print(f'os {os.uname()}')"
123+
python -c "import platform; print(f'processor {platform.processor()}')"
124+
python -c "import numpy as np; print(f'eps: {np.finfo(np.longdouble).eps}')"
125+
- name: Print Python, pip, and tox versions
126+
shell: bash -el {0}
127+
run: |
128+
python -c "import sys; print(f'Python {sys.version}')"
129+
python -c "import pip; print(f'pip {pip.__version__}')"
130+
python -c "import tox; print(f'tox {tox.__version__}')"
131+
- name: Install PINT and requirements
132+
shell: bash -el {0}
133+
run: |
134+
python -m pip install -r requirements.txt
135+
python -m pip install -r requirements_dev.txt
136+
python -m pip install --force-reinstall --no-deps .
137+
- name: Run tests
138+
shell: bash -el {0}
139+
run: pytest -v --pyargs tests
140+

CHANGELOG-unreleased.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ the released changes.
2020
- When TCB->TDB conversion info is missing, will print parameter name
2121
- Piecewise-constant model for chromatic variations (CMX)
2222
- `add_param` returns the name of the parameter (useful for numbered parameters)
23+
- micromamba CI environment for testing macOS-latest, without tox
2324
### Fixed
2425
- Changed WAVE_OM units from 1/d to rad/d.
2526
- When EQUAD is created from TNEQ, has proper TCB->TDB conversion info
2627
- TOA selection masks will work when only TOA is the first one
2728
### Removed
29+
- macOS 12 CI
30+

requirements_dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jupytext
2727
pdbpp
2828
tox
2929
pre-commit
30-
typed-ast>=1.5.0
3130
black~=24.0
3231
pygments
3332
ipython

tests/test_phase_offset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_phase_offset():
2626
m = get_model(io.StringIO(simplepar))
2727

2828
assert hasattr(m, "PHOFF") and m.PHOFF.value == 0.2
29-
29+
np.random.seed(1929)
3030
t = make_fake_toas_uniform(
3131
startMJD=50000,
3232
endMJD=50500,

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ deps =
6666
hypothesis<=6.72.0
6767
setuptools
6868
# can change this as needed for a single test run
69-
commands = pytest tests/test_model_derivatives.py
69+
commands = pytest tests/test_precision.py
7070

7171

7272
[testenv:ephemeris_connection]

0 commit comments

Comments
 (0)