-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Readthedoc feature #15
Changes from 49 commits
3845af3
52bbc60
5e5a047
3d345c2
1f6e247
95f69ce
2892baa
9d6d073
05ebb94
0ea61f2
a20a5de
99fe394
a5ed974
85f269e
b227762
1635fc9
6670cf0
3b72423
9be9505
514ea3c
cead558
9f23541
470bfc9
9296e67
ecd5520
8c789c1
de092ce
11b18ce
109788b
d50722c
f4d5473
b7c23f1
3872f23
1066b68
c764ba7
ef82961
13a82a2
20d6256
276d103
94c5c4b
7085d98
657d996
3b4f9ad
5b812ce
5d2025d
bd5d1e2
dd52c07
8a9dbde
e63b382
980f254
8e35409
5523780
6a051d7
e5992b4
0ca76fa
c2c8b15
d760eeb
f7231ef
5c3746c
653cd5f
418daad
7fee9c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "2" | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.12" | ||
jobs: | ||
post_install: | ||
- curl -fsSL https://pixi.sh/install.sh | bash | ||
- export PATH="$HOME/.pixi/bin:$PATH" && pixi install | ||
- pixi shell -c "pixi install && sphinx-build -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html" | ||
sphinx: | ||
builder: html | ||
configuration: docs/conf.py | ||
fail_on_warning: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
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 file can be removed, right? 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. yup originally just testing |
||
. $(pixi shell --quiet) | ||
pixi run docnb |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,35 @@ | ||
project = "GlueX-Nstar" | ||
author = "ComPWA" | ||
|
||
exclude_patterns = [ | ||
"**.ipynb_checkpoints", | ||
".DS_Store", | ||
".pixi", | ||
"Thumbs.db", | ||
"_build", | ||
] | ||
extensions = ["myst_nb"] | ||
html_theme = "pydata_sphinx_theme" | ||
extensions = [ | ||
"myst_nb", | ||
"sphinx.ext.duration", | ||
"sphinx.ext.doctest", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.autosummary", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.napoleon", | ||
"sphinx.ext.viewcode", | ||
] | ||
html_theme = "sphinx_rtd_theme" | ||
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 theme change is not required on RTD. Also works with what you had before. |
||
master_doc = "index" | ||
myst_enable_extensions = [ | ||
shenvitor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"colon_fence", | ||
"deflist", | ||
"dollarmath", | ||
"html_admonition", | ||
"html_image", | ||
"linkify", | ||
"substitution", | ||
"tasklist", | ||
] | ||
nitpicky = True | ||
project = "GlueX N-Star" | ||
nb_execution_mode = "auto" | ||
shenvitor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version = "0.1.0" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
# MyST-NB Quickstart | ||
# Welcome Page | ||
|
||
# Welcome to GlueX-Nstar documentation! | ||
|
||
Investigation of the N\* Resonances in the GlueX Experiment | ||
|
||
> **Note:** This project is under active development. | ||
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. I would use a MyST admonition here |
||
|
||
## Contents | ||
|
||
```{toctree} | ||
hello | ||
shenvitor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,12 +28,17 @@ jupyterlab = ">=4.2.0,<4.3" | |
jupyterlab-git = ">=0.50.0,<0.51" | ||
jupyterlab-lsp = ">=5.1.0,<5.2" | ||
jupyterlab-myst = ">=2.4.2,<2.5" | ||
linkify-it-py = ">=2.0.3,<2.1" | ||
myst-nb = ">=1.1.0,<1.2" | ||
myst-parser = ">=3.0.1,<3.1" | ||
nbsphinx = ">=0.9.4,<0.10" | ||
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. I would use 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. Actually, why are dependency changes required in this PR? 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. I added them when I added RTD from their example |
||
numpy = ">=1.26.4,<1.27" | ||
pre-commit = ">=3.7.1,<3.8" | ||
pydata-sphinx-theme = ">=0.15.2,<0.16" | ||
python = ">=3.12.3,<3.13" | ||
python-graphviz = ">=0.20.3,<0.21" | ||
scipy = ">=1.13.0,<1.14" | ||
sphinx = ">=7.3.7,<7.4" | ||
sphinx-autobuild = ">=2024.4.16,<2024.5" | ||
sphinx_rtd_theme = ">=2.0.0,<2.1" | ||
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. Are you selecting that in 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. Yes I have |
||
sympy = ">=1.12,<2" |
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.
Unfortunately, RTD runs its own
sphinx-build
command (hencepre_build
,post_build
, not build itself). So just runningpixi shell
should suffice 🤞 If it doesn't, this may be a more tricky issue to solve...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.
Btw
pixi install
is not needed, at mostpixi shell
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.
Seems like it doesn't, maybe tricky? What if the
pixi shell
an interactive shell which is not supported in the ReadTheDocs environment, maybe?e.g. this issue in RTD build indicates that it probably can't start an interactive shell there:
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.
https://readthedocs.org/projects/gluex-nstar/builds/24669635/