From 593ff821d8aefdf0601a7252238c4535d479682f Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:33:50 -0400 Subject: [PATCH] Fix RTD and modernize workflows (#58) * DOC: Fix RTD. * TST: Modernize workflows. * RTD: Ignore warnings * TST: use astropy wheel --- .github/workflows/ci_workflows.yml | 16 ++++++++-------- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/predeps_workflow.yml | 4 ++-- .github/workflows/publish-to-pypi.yml | 2 +- .readthedocs.yml | 7 +++---- doc/source/conf.py | 2 +- setup.cfg | 2 ++ 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 7c680ab..8319921 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index aa4ec6a..b9c65d2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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 diff --git a/.github/workflows/predeps_workflow.yml b/.github/workflows/predeps_workflow.yml index 81891ca..139269c 100644 --- a/.github/workflows/predeps_workflow.yml +++ b/.github/workflows/predeps_workflow.yml @@ -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 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 9170743..60f53ad 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -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 diff --git a/.readthedocs.yml b/.readthedocs.yml index b037881..d8ac652 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -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: . diff --git a/doc/source/conf.py b/doc/source/conf.py index 2579af6..cf2a398 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,7 +27,7 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', - 'sphinx.ext.napoleon', + 'numpydoc', 'sphinx.ext.intersphinx', 'sphinx.ext.imgmath'] diff --git a/setup.cfg b/setup.cfg index 9148d50..d6e3d4c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,6 +42,8 @@ test = pytest-remotedata pytest-astropy-header docs = + sphinx<7 + numpydoc sphinx_rtd_theme [options.package_data]