-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
MNT: fix CI and fix install on Linux #161
Changes from all commits
34aafc4
f4d2a23
b67fd86
6e64e86
eda6d70
7e190b6
8989447
b414189
89d6f3a
2d1b7c3
44cbad1
9934068
e2af7e5
55cb7cf
b0be7d6
51f94ed
7dae916
6b9b87b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
schedule: | ||
# Monthly, 1st of the month, 6am | ||
- cron: "0 6 1 * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build twine | ||
- name: Build sdist/wheel and check metadata | ||
run: | | ||
python -m build | ||
python -m twine check --strict dist/* | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- python-version: "3.7" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3.7 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I'm just building the oldest dependencies listed in |
||
os: ubuntu-latest | ||
name: oldest-dependencies | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install oldest dependencies | ||
if: ${{ contains(matrix.name,'oldest') }} | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install astropy~=4.0.0 numpy~=1.16.0 pyparsing~=2.0.0 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install .[test] | ||
- name: Test with pytest | ||
run: | | ||
pytest --import-mode=importlib --pyargs pyregion |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.10" | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: html | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,13 @@ | ||
include LICENSE | ||
include README.rst | ||
include CHANGES.rst | ||
|
||
include ah_bootstrap.py | ||
include setup.cfg | ||
include setup.py | ||
include pyproject.toml | ||
|
||
jdavies-st marked this conversation as resolved.
Show resolved
Hide resolved
|
||
recursive-include pyregion *.pyx *.c *.pxd | ||
recursive-include docs * | ||
recursive-include licenses * | ||
recursive-include cextern * | ||
recursive-include scripts * | ||
|
||
prune build | ||
prune docs/_build | ||
prune docs/api | ||
|
||
|
||
# the next few stanzas are for astropy_helpers. It's derived from the | ||
# astropy_helpers/MANIFEST.in, but requires additional includes for the actual | ||
# package directory and egg-info. | ||
|
||
include astropy_helpers/README.rst | ||
include astropy_helpers/CHANGES.rst | ||
include astropy_helpers/LICENSE.rst | ||
recursive-include astropy_helpers/licenses * | ||
|
||
include astropy_helpers/ez_setup.py | ||
include astropy_helpers/ah_bootstrap.py | ||
|
||
recursive-include astropy_helpers/astropy_helpers *.py *.pyx *.c *.h | ||
recursive-include astropy_helpers/astropy_helpers.egg-info * | ||
# include the sphinx stuff with "*" because there are css/html/rst/etc. | ||
recursive-include astropy_helpers/astropy_helpers/sphinx * | ||
|
||
prune astropy_helpers/build | ||
prune astropy_helpers/astropy_helpers/tests | ||
|
||
|
||
global-exclude *.pyc *.o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop 3.7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can! Though it is still officially supported by python.org, though that will change in mid-2023.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most packages in the python scientific stack have adopted NEP 29 (https://numpy.org/neps/nep-0029-deprecation_policy.html).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Given that I have no plans to add features or anything to this package, only to fix the build/install and verify it via CI, then I'm happy to have a wider allowed version schedule. Especially given that whatever code still uses it is probably also old. Of course if it stops working on Python 3.7 or Numpy 1.19 next year, happy to immediately drop support. I just didn't want to artificially bump allowed versions of dependencies without having a good reason for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think dropping Python 3.7 can be a separate PR if needed, especially given it is still green here.