Skip to content

Commit 78c3534

Browse files
authored
Update build to fix CI (#472)
* Treat warnings not anymore as errors There are some sphinx internal warnings that are time consuming to debug and don't affect the quality of the tutorial page, so we ignore them by treating warnings as warnings. This is in already done by RTD with the `--keep-going` flag * Relax dependency requirements The current pinned version in the requirements do not work anymore so new version have been pinned. * Fix linkchecks - pipx has been updated - the underscore explanation link works but somehow is marked as broken so we replace with an explanation from realpython - big-map.eu does not work but is sponsor so cannot be replaced/removed * Update pre-commits hook and run formatter Update to python 3.11 and update sphinx and subsequent dependencies. * Add OS to RTD config * Update how python is specified in the RTD config and version RTD wants that the version is now specified in the build.tools. Updated to python 3.12 * Remove pinned python version for black Uses latest version, also the python version should not matter for a formatter. * Update versions in the CI to Python 3.12
1 parent ab4708d commit 78c3534

File tree

8 files changed

+24
-18
lines changed

8 files changed

+24
-18
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Set up Python 3.8
14+
- name: Set up Python 3.12
1515
uses: actions/setup-python@v2
1616
with:
17-
python-version: 3.8
17+
python-version: 3.12
1818
- uses: pre-commit/action@v2.0.0
1919

2020
build:
@@ -24,10 +24,10 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@v2
27-
- name: Set up Python 3.8
27+
- name: Set up Python 3.12
2828
uses: actions/setup-python@v2
2929
with:
30-
python-version: 3.8
30+
python-version: 3.12
3131
- name: Install python dependencies
3232
run: |
3333
pip install --upgrade pip

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ repos:
1616
rev: '22.6.0'
1717
hooks:
1818
- id: black
19-
language_version: python3.8
2019

2120
- repo: https://github.com/myint/rstcheck
22-
rev: v6.1.0
21+
rev: v6.2.4
2322
hooks:
2423
- id: rstcheck
2524
additional_dependencies:
26-
- sphinx==4.1.2
25+
- sphinx~=8.0.0

.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
# Required
55
version: 2
66

7+
build:
8+
os: "ubuntu-22.04"
9+
tools:
10+
python: "3.12"
11+
712
# Build documentation in the docs/ directory with Sphinx
813
sphinx:
914
configuration: docs/conf.py
@@ -16,6 +21,5 @@ formats: []
1621

1722
# Optionally set the version of Python and requirements required to build your docs
1823
python:
19-
version: "3.8"
2024
install:
2125
- requirements: requirements.txt

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ cleannotebooks:
5656

5757
# -W: exit on warning
5858
defaultdoc:
59-
$(SPHINXBUILD) -b html -nW $(ALLSPHINXOPTS) $(BUILDDIR)/html
59+
$(SPHINXBUILD) -b html -T -W --keep-going $(ALLSPHINXOPTS) $(BUILDDIR)/html
6060

6161
all: html latexpdf
6262

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,9 @@
390390

391391
suppress_warnings = ["misc.highlighting_failure"]
392392

393+
# Links we ignore, because they do not work temporary and we cannot fix it
394+
linkcheck_ignore = ["https://www.big-map.eu/"]
395+
393396

394397
def setup(app):
395398
"""Setup function called by sphinx."""

docs/sections/getting_started/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AiiDAlab Launch makes it easy to run AiiDA on your own workstation or laptop.
2929
To use AiiDAlab launch you will have to
3030

3131
1. [Install Docker on your workstation or laptop](https://docs.docker.com/get-docker/) and [Manage Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/).
32-
2. Install AiiDAlab launch with [pipx](https://pypa.github.io/pipx/installation/) (**recommended**):
32+
2. Install AiiDAlab launch with [pipx](https://pipx.pypa.io/stable/installation/) (**recommended**):
3333

3434
```console
3535
pipx install aiidalab-launch

docs/sections/writing_workflows/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ You can read about the ports and port namespace concepts in the [AiiDA documenta
9090
{{ python }} **The underscore `_` character**
9191

9292
The underscore character has quite a lot interesting use cases in Python!
93-
You can find out more about them [here](https://www.datacamp.com/tutorial/role-underscore-python).
93+
You can find out more about them [here](https://realpython.com/python-double-underscore/).
9494

9595
:::
9696

requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
jinja2~=3.0
2-
Sphinx~=4.1
3-
sphinx-book-theme
4-
sphinx-copybutton~=0.4.0
5-
sphinx-panels
6-
sphinx-tabs
7-
myst-nb==0.16.0
1+
jinja2~=3.1.4
2+
Sphinx~=8.0.2
3+
sphinx-book-theme~=1.1.3
4+
sphinx-copybutton~=0.5.2
5+
sphinx-panels~=0.4.1
6+
sphinx-tabs~=3.4.5
7+
myst-nb~=1.1.1

0 commit comments

Comments
 (0)