From 8101f489fcd2dce6a6bb9a07d307963af2086662 Mon Sep 17 00:00:00 2001 From: Mirko Bunse Date: Thu, 19 Sep 2024 10:52:07 +0200 Subject: [PATCH] Simplify the documentation of how to build the docs locally (and correct the version to an rc version) --- docs/.gitignore | 1 - docs/Makefile | 20 ------------------- docs/make.bat | 35 ---------------------------------- docs/source/developer-guide.md | 7 ++----- docs/source/index.md | 9 +-------- qunfold/__init__.py | 2 +- 6 files changed, 4 insertions(+), 70 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/make.bat diff --git a/docs/.gitignore b/docs/.gitignore index 19928a2..567609b 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1 @@ build/ -source/*.rst diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 747ffb7..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -%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.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/source/developer-guide.md b/docs/source/developer-guide.md index 01c664c..fc97295 100644 --- a/docs/source/developer-guide.md +++ b/docs/source/developer-guide.md @@ -24,11 +24,8 @@ As soon as you push to the `main` branch, GitHub Actions will take out these uni After locally building the documentation, open `docs/build/html/index.html` in your browser. ```bash -. venv/bin/activate -pip install -e .[docs] -cd docs/ -sphinx-apidoc --force --output-dir source/ ../qunfold -make html +venv/bin/pip install -e .[docs] +venv/bin/sphinx-build -M html docs/source docs/build ``` As soon as you push to the `main` branch, GitHub Actions will build the documentation, push it to the `gh-pages` branch, and publish the result on GitHub Pages: [https://mirkobunse.github.io/qunfold](https://mirkobunse.github.io/qunfold) diff --git a/docs/source/index.md b/docs/source/index.md index d7000b7..138bacd 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -15,6 +15,7 @@ The Python package [qunfold](https://github.com/mirkobunse/qunfold) implements o ## Installation ``` +pip install --upgrade pip setuptools wheel pip install 'qunfold @ git+https://github.com/mirkobunse/qunfold' ``` @@ -32,14 +33,6 @@ To upgrade an existing installation of `qunfold`, run pip install --force-reinstall --no-deps 'qunfold @ git+https://github.com/mirkobunse/qunfold@main' ``` -### Troubleshooting - -Starting from `pip 23.1.2`, you have to install `setuptools` and `wheel` explicitly. If you receive a "NameError: name 'setuptools' is not defined", you need to execute the following command before installing `qunfold`. - -``` -pip install --upgrade pip setuptools wheel -``` - ## Usage diff --git a/qunfold/__init__.py b/qunfold/__init__.py index 5a1d003..c435f98 100644 --- a/qunfold/__init__.py +++ b/qunfold/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.1.5" +__version__ = "0.1.5-rc" from .losses import ( instantiate_loss,