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

MNT: fix CI and fix install on Linux #161

Merged
merged 18 commits into from
Nov 21, 2022
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
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
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"]
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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).

Copy link
Contributor Author

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.

Copy link
Member

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.

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.7

Copy link
Contributor Author

@jdavies-st jdavies-st Nov 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I'm just building the oldest dependencies listed in install_requires on python 3.7, and it was to figure out what minimum version to specify, as there was none specified before.

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
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

12 changes: 0 additions & 12 deletions .landscape.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .readthedocs.yml
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
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

31 changes: 2 additions & 29 deletions MANIFEST.in
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
Loading