Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MacOS CI workflow using mamba #1865

Merged
merged 25 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -16,8 +16,11 @@ the released changes.
- Added AIC and BIC calculation to be written in the post fit parfile from `event_optimize`
- When TCB->TDB conversion info is missing, will print parameter name
- `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
Loading