Skip to content

Commit

Permalink
Fix RTD and modernize workflows (#58)
Browse files Browse the repository at this point in the history
* DOC: Fix RTD.

* TST: Modernize workflows.

* RTD: Ignore warnings

* TST: use astropy wheel
  • Loading branch information
pllim authored Sep 22, 2023
1 parent 2436c9b commit 593ff82
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
needs: initial_check
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -91,7 +91,7 @@ jobs:
needs: [pep_and_audit, initial_tests]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -101,18 +101,18 @@ jobs:
- name: Install and build
run: |
python -m pip install --upgrade pip setuptools
python -m pip install git+https://github.com/astropy/astropy.git@main#egg=astropy
python -m pip install --extra-index-url https://pypi.anaconda.org/astropy/simple astropy>=0.0.dev0 --pre --upgrade
python -m pip install -e .[test]
- name: Test with dev deps
run: pytest

old_deps_tests:
name: CI with old dependencies
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs: [pep_and_audit, initial_tests]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -137,7 +137,7 @@ jobs:
os: [windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -157,7 +157,7 @@ jobs:
needs: [pep_and_audit, initial_tests]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/predeps_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Install and build
run: |
python -m pip install --upgrade pip setuptools
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@v3
uses: actions/checkout@v4

- name: custom action
uses: spacetelescope/action-publish_to_pypi@master
Expand Down
7 changes: 3 additions & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,19 @@
version: 2

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

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

# Set the version of Python and requirements required to build your docs
python:
system_packages: false
install:
- method: pip
path: .
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'numpydoc',
'sphinx.ext.intersphinx',
'sphinx.ext.imgmath']

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ test =
pytest-remotedata
pytest-astropy-header
docs =
sphinx<7
numpydoc
sphinx_rtd_theme

[options.package_data]
Expand Down

0 comments on commit 593ff82

Please sign in to comment.