Skip to content

Commit

Permalink
docs: build the sphinx documentation on windows (#1891)
Browse files Browse the repository at this point in the history
This commit enables building the sphinx documentation on windows.
The make.bat needed to do so was missing and is added in this commit.

To build the documentation from a fresh git clone you need to run these commands:

pixi install
pixi run update-flopy
pixi run get-exes
pixi run setup builddir
pixi run build builddir
pixi run benchmark
pixi run sphinx

Furthermore I added the rtd environment to the pixi.toml. When building sphinx you now don't have to manually pip install the requirements.rtd.txt. Instead the task will automatically use the rtd environment

Finally i updated the github pipeline files. The newly generated pixi.lock is using version 5 which needs a newer pixi version. I also removed the pixi run install as this is no longer required.
  • Loading branch information
Manangka authored Jun 21, 2024
1 parent ba29c04 commit 02b605f
Show file tree
Hide file tree
Showing 11 changed files with 14,600 additions and 2,223 deletions.
35 changes: 35 additions & 0 deletions .build_rtd_docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
14 changes: 0 additions & 14 deletions .build_rtd_docs/requirements.rtd.txt

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2

- name: Check Fortran source formatting
run: pixi run check-format
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2

- name: Meson setup
run: pixi run setup -Dwerror=true builddir
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2

- name: Check spelling
run: pixi run check-spelling
Expand Down Expand Up @@ -65,17 +65,13 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
working-directory: modflow6
run: pixi run install

- name: Install additional packages for Sphinx using pip
working-directory: modflow6/.build_rtd_docs
run: pixi run pip install -r requirements.rtd.txt

- name: Print python package versions
working-directory: modflow6
run: pixi run pip list
Expand Down Expand Up @@ -230,7 +226,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2

- name: Custom pixi install
run: pixi run install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/large.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pixi_auto_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
cache: false

- name: Update pixi lock file
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Setup pixi
uses: prefix-dev/[email protected]
with:
pixi-version: v0.19.1
pixi-version: v0.24.2
manifest-path: "modflow6/pixi.toml"

- name: Custom pixi install
Expand Down
5 changes: 0 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,3 @@ sphinx:

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- requirements: .build_rtd_docs/requirements.rtd.txt
Loading

0 comments on commit 02b605f

Please sign in to comment.