Skip to content

Commit

Permalink
chore: add .readthedocs.yaml for rtd v2 (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil authored Nov 15, 2024
1 parent c4ce2b0 commit cc8be6b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 27 deletions.
53 changes: 26 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ on:
pull_request:
branches_ignore: []

defaults:
run:
shell: bash -el {0}

jobs:
default-shell:
name: Default shell
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}

cancel-previous:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,25 +54,25 @@ jobs:
You can trigger all lints locally by running `make lint`
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sphinx-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
pip install -e ".[docs]"
pip freeze
- name: Build documentation
run: |
cd docs
make html
# sphinx-docs:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Install Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.12"
#
# - name: Install dependencies
# run: |
# pip install -e ".[docs]"
# pip freeze
#
# - name: Build documentation
# run: |
# cd docs
# make html

testing:
runs-on: ubuntu-latest
Expand All @@ -97,9 +95,10 @@ jobs:
environment-file: environment.yml
channels: conda-forge,bioconda,nodefaults
channel-priority: strict
activate-environment: test
- run: which pip
- name: Install some more dependencies via pip
# Workaround - see https://github.com/pytest-dev/pytest/issues/10420#issuecomment-1290697849
run: pip install ".[test]"; pip install --ignore-installed py
run: pip install '.[test]' # 'pyproject.toml[test]'
- name: Run tests
run: pytest
env:
Expand Down
23 changes: 23 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yaml
# 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-22.04
tools:
python: "3.12"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

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

0 comments on commit cc8be6b

Please sign in to comment.