Skip to content

Commit

Permalink
Merge pull request #269 from karllark/update_astropy6
Browse files Browse the repository at this point in the history
updating for astropy6
  • Loading branch information
karllark authored Jan 24, 2024
2 parents 6a0ade8 + 4297a16 commit 171c645
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 137 deletions.
88 changes: 35 additions & 53 deletions .github/workflows/tex-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
schedule:
# Weekly Monday 4 AM build
# * is a special character in YAML so you have to quote this string
- cron: '0 1 * * 1'
- cron: '0 4 * * 1'

jobs:

Expand All @@ -27,16 +27,16 @@ jobs:
# For example -- os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

# Test python 3.8, 3.9, and 3.10 by default.
python-ver: [8, 9, 10]
# Test python version 3.x
python-ver: [9, 10, 11]

# Specify which tox environments to test in this list.
# tox-env: [cov, alldeps, devdeps, astropylts]
tox-env: [alldeps]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up python 3.${{ matrix.python-ver }} with tox environment py3${{ matrix.python-ver }}-${{ matrix.tox-env }} on ${{ matrix.os }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.${{ matrix.python-ver }}
- name: Install base dependencies
Expand All @@ -48,58 +48,58 @@ jobs:
tox -e py3${{ matrix.python-ver }}-${{ matrix.tox-env }}
# Dev version test
dev_test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- name: Set up python for astropy, numpy dev test
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: |
tox -e py310-devdeps
# dev_test:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, '[ci skip]')"
# steps:
# - uses: actions/checkout@v4
# - name: Set up python for astropy, numpy dev test
# uses: actions/setup-python@v4
# with:
# python-version: 3.8
# - name: Install base dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install tox
# - name: Test with tox
# run: |
# tox -e py38-devdeps

# LTS version test
lts_test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up python for astropy lts test
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: 3.9
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: |
tox -e py310-astropylts
tox -e py39-astropylts
# Coverage test
cov_test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up python for coverage test
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: 3.11
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: |
tox -e py310-cov
tox -e py311-cov
- name: Upload coverage to codecov
uses: codecov/codecov-action@v1
with:
Expand All @@ -118,11 +118,11 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python to build docs with sphinx
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: 3.11
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -131,36 +131,18 @@ jobs:
- name: Build and check docs using tox
run: |
tox -e build_docs
# Test building of docs and check the links
link_test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- name: Set up Python to build docs with sphinx
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
sudo apt-get install graphviz
- name: Build and check docs using tox
run: |
tox -e linkcheck
# Perform codestyle check
codestyle:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Python codestyle check
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: 3.11
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
Expand Down
7 changes: 5 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
version: 2

build:
image: latest
os: ubuntu-22.04
tools:
python: "3.12"

python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
- all

# Don't build any extra formats
formats: []

2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fixes, code, or documentation (no git or GitHub experience necessary):

* `Coding Guidelines <https://docs.astropy.org/en/latest/development/codeguide.html>`_

* `Developer Documentation <https://docs.astropy.org/en/latest/#developer-documentation>`_
* `Developer Documentation <https://docs.astropy.org/en/latest/index_dev.html>`_

For the complete list of contributors please see the `pahfit
contributors page on Github
Expand Down
13 changes: 5 additions & 8 deletions pahfit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from importlib.metadata import version as _version, PackageNotFoundError

# Packages may add whatever they like to this file, but
# should keep this content at the top.
# ----------------------------------------------------------------------------
from ._astropy_init import * # noqa
# ----------------------------------------------------------------------------

__all__ = []
try:
__version__ = _version(__name__)
except PackageNotFoundError: # pragma: no cover
pass
55 changes: 0 additions & 55 deletions pahfit/_astropy_init.py

This file was deleted.

20 changes: 2 additions & 18 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[tox]
envlist =
py{38,39,310}-test{,-alldeps,-devdeps}{,-cov}
py{38,39,310}-test-numpy{118,119,120,121}
py{38,39,310}-test-astropy{40,50}
py{39,310,311}-test{,-alldeps}{,-cov}
build_docs
linkcheck
codestyle
Expand Down Expand Up @@ -36,27 +34,13 @@ description =
devdeps: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
cov: and test coverage
numpy118: with numpy 1.18.*
numpy119: with numpy 1.19.*
numpy120: with numpy 1.20.*
numpy121: with numpy 1.21.*
astropy40: with astropy 4.0.*
astropy50: with astropy 5.0.*
astropylts: with the latest astropy LTS (currently v5.0)

# The following provides some specific pinnings for key packages
deps =

numpy118: numpy==1.18.*
numpy119: numpy==1.19.*
numpy120: numpy==1.20.*
numpy121: numpy==1.21.*

astropy40: astropy==4.0.*
astropy50: astropy==5.0.*
astropylts: astropy==5.0.*

devdeps: git+https://github.com/astropy/astropy.git#egg=astropy
devdeps: PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scipy-wheels-nightly/simple

# The following indicates which extras_require from setup.cfg will be installed
extras =
Expand Down

0 comments on commit 171c645

Please sign in to comment.