Skip to content

Commit

Permalink
Merge pull request #56 from pllim/tst-update
Browse files Browse the repository at this point in the history
MNT: Drop support for Python 3.6 and 3.7 and update workflows
  • Loading branch information
pllim committed Dec 8, 2022
2 parents fd07990 + 6f5580e commit fb67f41
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 46 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/cancel_workflows.yml

This file was deleted.

38 changes: 21 additions & 17 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ on:
# * is a special character in YAML so you have to quote this string
- cron: '0 5 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
initial_check:
name: Mandatory checks before CI
runs-on: ubuntu-latest
steps:
- name: Check base branch
uses: actions/github-script@v3
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
script: |
Expand All @@ -36,11 +40,11 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Lint with flake8
Expand All @@ -64,13 +68,13 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.8'
python-version: '3.9'
- name: Install and build
run: |
python -m pip install --upgrade pip setuptools
Expand All @@ -84,13 +88,13 @@ jobs:
needs: [pep_and_audit, initial_tests]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'
python-version: '3.10'
- name: Install and build
run: |
python -m pip install --upgrade pip setuptools
Expand All @@ -105,18 +109,18 @@ jobs:
needs: [pep_and_audit, initial_tests]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.7'
python-version: '3.8'
- name: Install and build
run: |
python -m pip install --upgrade pip setuptools
python -m pip install numpy==1.16.6
python -m pip install astropy==3.2.2
python -m pip install astropy==4.0.6
python -m pip install -e .[test]
- name: Test with old deps
run: pytest
Expand All @@ -130,11 +134,11 @@ jobs:
os: [windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install and build
Expand All @@ -150,9 +154,9 @@ jobs:
needs: [pep_and_audit, initial_tests]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install and build
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
# The branches below must be a subset of the branches above
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand All @@ -33,11 +37,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -49,7 +53,7 @@ jobs:
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
if: matrix.language != 'cpp'
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -59,7 +63,7 @@ jobs:
# uses a compiled language

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
if: matrix.language == 'cpp'
with:
python-version: 3.9
Expand All @@ -72,4 +76,4 @@ jobs:
python setup.py build_ext --inplace
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
4 changes: 2 additions & 2 deletions .github/workflows/open_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Comment Draft PR'
uses: actions/github-script@v3
uses: actions/github-script@v6
if: github.event.pull_request.draft == true
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

# Check out the commit containing this workflow file.
- name: checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: custom action
uses: spacetelescope/action-publish_to_pypi@master
Expand Down
10 changes: 8 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2

build:
os: ubuntu-20.04
apt_packages:
- graphviz
tools:
python: "3.9"

sphinx:
builder: html
configuration: doc/source/conf.py
fail_on_warning: true

# Set the version of Python and requirements required to build your docs
python:
version: 3.7
system_packages: true
system_packages: false
install:
- method: pip
path: .
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
2.2.0 (unreleased)
==================

- Dropped support for Python 3.6 and 3.7. Minimum supported Python
version is now 3.8. [#56]

- Minimum supported version of ``astropy`` is now 4. [#56]

2.1.0 (2022-02-02)
==================

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ zip_safe = False
setup_requires = setuptools_scm
install_requires =
numpy
astropy>=3
python_requires = >=3.6
astropy>=4
python_requires = >=3.8

[options.extras_require]
all =
Expand Down

0 comments on commit fb67f41

Please sign in to comment.