Skip to content

Commit

Permalink
Fix RTD and modernize workflows (#151)
Browse files Browse the repository at this point in the history
* Fix RTD and modernize workflows

* DOC: extra requirements for docs

* RTD: Disable fail on warnings
  • Loading branch information
pllim committed Sep 22, 2023
1 parent 5580e6c commit addf0a5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Set up Python
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
Expand All @@ -80,7 +80,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 @@ -90,7 +90,7 @@ jobs:
- name: Install and build
run: |
python -m pip install --upgrade pip wheel 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
Expand All @@ -100,7 +100,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 @@ -120,15 +120,15 @@ 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:
python-version: '3.x'
- name: Install and build
run: |
python -m pip install --upgrade pip wheel setuptools sphinx
python -m pip install -e .
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e .[docs]
- name: Docs link check
run: |
cd doc
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
2 changes: 1 addition & 1 deletion .github/workflows/predeps_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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
Expand Down
8 changes: 5 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
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

python:
install:
- method: pip
path: .
extra_requirements:
- docs

# Don't build any extra formats
formats: []
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.imgmath',
'sphinx.ext.napoleon',
'numpydoc',
'sphinx.ext.intersphinx',
'sphinx.ext.autosummary',
'sphinx.ext.doctest']
Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ test =
pytest
pytest-astropy-header
pytest-doctestplus
docs =
sphinx<7
numpydoc
sphinx_rtd_theme

[options.package_data]
stsci.tools.tests = data/*.*
Expand Down

0 comments on commit addf0a5

Please sign in to comment.