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

Dev #207

Merged
merged 7 commits into from
May 17, 2024
Merged

Dev #207

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
9 changes: 5 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
name: Publish to PyPi
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout source
uses: actions/checkout@v4
Expand All @@ -31,10 +34,8 @@ jobs:
pip install wheel setuptools -U
python setup.py sdist
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.1.0
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip-existing: true

test-publish-pypi:
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, macos-12]
python-version: [3.9]

steps:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest", "macos-latest", "macos-12"]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -49,8 +49,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install --upgrade flake8 coverage pytest-cov cython "tables==3.8.0"
pip install git+https://github.com/EconForge/interpolation.py.git
pip install --upgrade flake8 coverage pytest-cov cython

if [[ ${{matrix.os}} == macos-latest ]];
then
brew update
brew install hdf5
fi

pip install -e .
- name: Lint with flake8
run: |
Expand Down Expand Up @@ -94,7 +100,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest", "macos-latest", "macos-12"]
python-version: [3.9]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies:
- wcslib
- future
- xspec-modelsonly==6.30.1
- numba<0.59
- numba
- h5py
- interpolation>=2.2.3
- libgfortran
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ install_requires =
astropy>=1.2
dill
future
interpolation>=2.2.3
numba<0.59
interpolation>=2.2.3
numba
h5py
pandas
tables
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,16 @@ def find_library(library_root, additional_places=None):

def setup_xspec():

skip_xspec = os.environ.get("SKIP_XSPEC")
headas_root = os.environ.get("HEADAS")
conda_prefix = os.environ.get("CONDA_PREFIX")
xspec_version = os.environ.get("ASTRO_XSPEC_VERSION")

if skip_xspec is not None:

print("The SKIP_XSPEC env variable was set. Xspec support will not be installed.")
return None

# thanks to the sherpa team for this

if xspec_version is None:
Expand Down
Loading