-
Notifications
You must be signed in to change notification settings - Fork 261
DOC Add make.bat for building documentation on Windows #1963
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
08e830e
DOC Add make.bat for building documentation on Windows
DCchoudhury15 105491f
DOC Add Windows-specific pixi tasks in pyproject.toml for doc build
DCchoudhury15 494abcc
DOC Sync clean targets between Makefile and make.bat and fix pixi win…
DCchoudhury15 89acf84
Update pyproject.toml
DCchoudhury15 78d8cfd
CI Retrigger CI checks
DCchoudhury15 110c3ed
DOC Add note about optuna Windows permission issue in CONTRIBUTING.rst
DCchoudhury15 35ff550
DOC Revert pixi.lock to main
DCchoudhury15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| @ECHO OFF | ||
| setlocal | ||
| REM Command file for Sphinx documentation (skrub) | ||
|
|
||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| set BUILDDIR=_build | ||
| set SOURCEDIR=. | ||
| set ALLSPHINXOPTS=-d "%BUILDDIR%/doctrees" %SPHINXOPTS% "%SOURCEDIR%" | ||
|
|
||
| if NOT "%PAPER%" == "" ( | ||
| set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% | ||
| ) | ||
|
|
||
| if NOT "%EXAMPLES_PATTERN%" == "" ( | ||
| set ALLSPHINXOPTS=-D sphinx_gallery_conf.filename_pattern=%EXAMPLES_PATTERN% %ALLSPHINXOPTS% | ||
| ) | ||
|
|
||
| if "%1" == "" goto html-noplot | ||
| if "%1" == "help" goto help | ||
| if "%1" == "clean" goto clean | ||
| if "%1" == "html" goto html | ||
| if "%1" == "html-noplot" goto html-noplot | ||
| if "%1" == "linkcheck" goto linkcheck | ||
| if "%1" == "linkcheck-noplot" goto linkcheck-noplot | ||
|
|
||
| echo.Unknown target "%1", use "make.bat help" for available targets. | ||
| goto end | ||
|
|
||
| :help | ||
| echo.Please use make.bat ^<target^> where ^<target^> is one of | ||
| echo. html to make standalone HTML files | ||
| echo. html-noplot to make HTML files without plotting the gallery | ||
| echo. linkcheck to check all external links for integrity | ||
| echo. linkcheck-noplot to check links without plotting the gallery | ||
| echo. clean to remove all build output | ||
| goto end | ||
|
|
||
| :clean | ||
| if exist "%BUILDDIR%\" ( | ||
| rmdir /q /s "%BUILDDIR%" | ||
| echo. Removed %BUILDDIR%\ | ||
| ) | ||
| if exist "auto_examples\" ( | ||
| rmdir /q /s "auto_examples" | ||
| echo. Removed auto_examples\ | ||
| ) | ||
| if exist "generated\" ( | ||
| rmdir /q /s "generated" | ||
| echo. Removed generated\ | ||
| ) | ||
| if exist "reference\generated\" ( | ||
| rmdir /q /s "reference\generated" | ||
| echo. Removed reference\generated\ | ||
| ) | ||
| if exist "generated_for_index\" ( | ||
| rmdir /q /s "generated_for_index" | ||
| echo. Removed generated_for_index\ | ||
| ) | ||
| if exist "reference\" ( | ||
| for %%i in ("reference\*.rst") do del /q "%%i" 2>nul | ||
| echo. Removed reference\*.rst | ||
| ) | ||
| goto end | ||
|
|
||
| :html | ||
| if exist "%BUILDDIR%\html\_images\" ( | ||
| rmdir /q /s "%BUILDDIR%\html\_images" | ||
| ) | ||
| set SKB_TABLE_REPORT_VERBOSITY=0 | ||
| %SPHINXBUILD% -b html %ALLSPHINXOPTS% "%BUILDDIR%/html" | ||
| echo. | ||
| echo.Build finished. The HTML pages are in %BUILDDIR%/html. | ||
| goto end | ||
|
|
||
| :html-noplot | ||
| set SKB_TABLE_REPORT_VERBOSITY=0 | ||
| %SPHINXBUILD% -D plot_gallery=0 -b html %ALLSPHINXOPTS% "%BUILDDIR%/html" | ||
| echo. | ||
| echo.Build finished. The HTML pages are in %BUILDDIR%/html. | ||
| goto end | ||
|
|
||
| :linkcheck | ||
| %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% "%BUILDDIR%/linkcheck" | ||
| echo. | ||
| echo.Linkcheck finished. Results are in %BUILDDIR%/linkcheck. | ||
| goto end | ||
|
|
||
| :linkcheck-noplot | ||
| %SPHINXBUILD% -D plot_gallery=0 -b linkcheck %ALLSPHINXOPTS% "%BUILDDIR%/linkcheck-noplot" | ||
| echo. | ||
| echo.Linkcheck (no plot) finished. Results are in %BUILDDIR%/linkcheck-noplot. | ||
| goto end | ||
|
|
||
| :end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -227,6 +227,13 @@ clean-doc = { cmd = "rm -rf _build/ && rm -rf auto_examples/ && rm -rf reference | |||||||||||||||||||||
| linkcheck = { cmd = "make linkcheck", cwd = "doc" } | ||||||||||||||||||||||
| linkcheck-quick = { cmd = "make linkcheck-noplot", cwd = "doc" } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| [tool.pixi.feature.doc.target.win-64.tasks] | ||||||||||||||||||||||
| build-doc = { cmd = "make.bat html", cwd = "doc" } | ||||||||||||||||||||||
| build-doc-quick = { cmd = "make.bat html-noplot", cwd = "doc" } | ||||||||||||||||||||||
| clean-doc = { cmd = "make.bat clean", cwd = "doc" } | ||||||||||||||||||||||
| linkcheck = { cmd = "make.bat linkcheck", cwd = "doc" } | ||||||||||||||||||||||
| linkcheck-quick = { cmd = "make.bat linkcheck-noplot", cwd = "doc" } | ||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should fix the windows targets
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| [tool.pixi.feature.lint.tasks] | ||||||||||||||||||||||
| lint = { cmd = "pre-commit install && pre-commit run -v --all-files --show-diff-on-failure" } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that more files are being cleaned here than in the original makefile. That's good! Could you update the linux makefile to match?