Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade infra, CIs and pre-commit checks & sync with website #355

Merged
merged 13 commits into from
Jan 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update CI workflows and config, and sync with website
CAM-Gerlach committed Jan 29, 2024
commit 5ac038d646676768200d12ba95236daaaee268c9
16 changes: 10 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Build the docs to test that they work correctly
# Based on https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

# Build the site and deploy it to GitHub pages
name: Build

on: # yamllint disable-line rule:truthy
@@ -19,13 +17,13 @@ on: # yamllint disable-line rule:truthy

jobs:
build:
name: Build Docs
name: Build and Deploy

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
@@ -38,6 +36,12 @@ jobs:
- name: List dependencies
shell: bash
run: pip list
- name: Build with Sphinx
- name: Build site
shell: bash
run: ./ci/build.sh
- name: Deploy to GitHub Pages
if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') && github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
FOLDER: ./doc/_build/html
CLEAN: true # Remove deleted files from the deploy branch
3 changes: 1 addition & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Build the docs and run checks on them
# Based on https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Check

@@ -25,7 +24,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
38 changes: 0 additions & 38 deletions .github/workflows/deploy.yaml

This file was deleted.

10 changes: 2 additions & 8 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -23,16 +23,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
shell: bash
run: ./ci/install.sh
- name: List dependencies
shell: bash
run: pip list
- name: Run Pre-Commit hooks
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -122,13 +122,13 @@ You can install them into your current Conda environment with:

```shell
conda install -c conda-forge --file requirements-conda.txt
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
```

Or, if using ``pip``, you can grab them with just:

```shell
python -m pip install -r requirements-dev.txt
python -m pip install -r requirements.txt
```


2 changes: 1 addition & 1 deletion ci/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -ex

python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install --upgrade -r requirements-dev.txt
python3 -m pip install --upgrade -r requirements.txt

# You can uncomment the command below to use a different version of the theme (but return it to the correct one before merging)
# python3 -m pip install --upgrade --force-reinstall --no-deps git+https://github.com/spyder-ide/spyder-docs-sphinx-theme.git@develop_spyder
2 changes: 1 addition & 1 deletion requirements-conda.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jinja2>=2,<3 # Sphinx <4 is not compatible with Jinja >=3
MarkupSafe>=1,<2 # Sphinx <4 is not compatible with MarkupSafe >=2
pre-commit>=2.10.0,<3 # For pre-commit hooks
pre-commit>=2.10.0,<4 # For pre-commit hooks
sphinx>=3,<4 # Sphinx-Multiversion is not compatible with Sphinx 4
2 changes: 1 addition & 1 deletion requirements-dev.txt → requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
git+https://github.com/spyder-ide/spyder-docs-sphinx-theme.git@develop_spyder
jinja2>=2,<3 # Sphinx <4 is not compatible with Jinja >=3
MarkupSafe>=1,<2 # Sphinx <4 is not compatible with MarkupSafe >=2
pre-commit>=2.10.0,<3 # For pre-commit hooks
pre-commit>=2.10.0,<4 # For pre-commit hooks
sphinx>=3,<4 # Sphinx-Multiversion is not compatible with Sphinx 4
sphinx-multiversion # For version selector support
sphinx-panels # For dropdowns and other fancy UI elements