From 18d1d3a5e222c6c75cb9b00c4ea083f2aaf56e08 Mon Sep 17 00:00:00 2001 From: Alexander Oonk Date: Wed, 12 Mar 2025 16:51:19 +0100 Subject: [PATCH 1/2] readthedocs shit --- .gitignore | 3 ++- readthedocs.yaml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 readthedocs.yaml diff --git a/.gitignore b/.gitignore index c23fdba..5847739 100644 --- a/.gitignore +++ b/.gitignore @@ -177,4 +177,5 @@ cython_debug/ .DS_Store # jupyter-book -practicals_jn_book/_build/* +practicals_jn_book/_build +practicals_jn_book/conf.py diff --git a/readthedocs.yaml b/readthedocs.yaml new file mode 100644 index 0000000..62bdaec --- /dev/null +++ b/readthedocs.yaml @@ -0,0 +1,18 @@ +version: 2 + +# Set the version of Python and other tools you might need +build: + os: macos-latest + tools: + python: "3.12" + jobs: + pre_build: + - "jupyter-book config sphinx practicals_jn_book/" + +python: + install: + - requirements: docs/requirements.txt + +formats: + - pdf + - epub From d6fe59d0ce9919e92f2251f9ddb83d5c532d9f4a Mon Sep 17 00:00:00 2001 From: Alexander Oonk Date: Wed, 12 Mar 2025 16:55:00 +0100 Subject: [PATCH 2/2] readthedocs.yml --- .github/workflows/build_jb.yml | 25 +++++++++++++++++++++++++ readthedocs.yaml | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_jb.yml diff --git a/.github/workflows/build_jb.yml b/.github/workflows/build_jb.yml new file mode 100644 index 0000000..eb4eb5e --- /dev/null +++ b/.github/workflows/build_jb.yml @@ -0,0 +1,25 @@ +on: + pull_request: + branches: + - '*' # Pull requests to all branches + +jobs: + build-jupyter-book: + runs-on: macos-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install dependencies + run: | + pip install -r practicals_jn_book/requirements.txt + pip install jupyter-book + + - name: Build documentation (only on macos-latest) + run: jupyter-book build practicals_jn_book --all -W diff --git a/readthedocs.yaml b/readthedocs.yaml index 62bdaec..dfbebb9 100644 --- a/readthedocs.yaml +++ b/readthedocs.yaml @@ -11,7 +11,7 @@ build: python: install: - - requirements: docs/requirements.txt + - requirements: practicals_jn_book/requirements.txt formats: - pdf