Skip to content

Commit

Permalink
Merge pull request #1865 from dlakaplan/mambaci
Browse files Browse the repository at this point in the history
Add MacOS CI workflow using mamba
  • Loading branch information
abhisrkckl authored Dec 6, 2024
2 parents f1f719b + 6491552 commit f3362ef
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 6 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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

3 changes: 3 additions & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 0 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jupytext
pdbpp
tox
pre-commit
typed-ast>=1.5.0
black~=24.0
pygments
ipython
Expand Down
2 changes: 1 addition & 1 deletion tests/test_phase_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f3362ef

Please sign in to comment.