ComPWA / gluex-nstar

Investigation of N* (and K*) in GlueX photoproduction experiment
https://compwa.github.io/gluex-nstar
MIT License
2 stars 0 forks source link

Add Readthedoc feature #15

Closed shenvitor closed 2 weeks ago

shenvitor commented 4 weeks ago

Make it now have both GitHub documentation and RTD build

shenvitor commented 4 weeks ago

I want to add this... and I have authorised in : https://readthedocs.org/projects/gluex-nstar/

seems like it is necessary to add the .readthedocs.yaml file, and that is enough(?) @redeboer

redeboer commented 4 weeks ago

Fancy! Not sure if RTD is really needed. Usually it is used for packages that need versioning (so a page per version, e.g. https://qrules.rtfd.io/0.10.1). Another benefit is PR previews. If you don't need those, GitHub Pages suffices. (GH has the benefit that it can cache e.g. notebook results and sympy caches.)

redeboer commented 4 weeks ago

But let's discuss tomorrow, there is something to say for using RTD ✨

shenvitor commented 4 weeks ago

Fancy! Not sure if RTD is really needed. Usually it is used for packages that need versioning (so a page per version, e.g. https://qrules.rtfd.io/0.10.1). Another benefit is PR previews. If you don't need those, GitHub Pages suffices. (GH has the benefit that it can cache e.g. notebook results and sympy caches.)

Yup actually I wanna have PR preview, that's why I wanna add it :)

shenvitor commented 3 weeks ago

OK, now I understand. Maybe "rtd" is not necessarily appropriate here, but I'll decide later and make this work first. Seems like it is Okish

redeboer commented 3 weeks ago

Have a look at the log output. The config is looking for docs/source/conf.py, not docs/conf.py https://readthedocs.org/projects/gluex-nstar/builds/24613998/

shenvitor commented 3 weeks ago

Interestingly... I see at some point the readthedoc is okay but the Github pages failed :( https://readthedocs.org/projects/gluex-nstar/builds/24613277/ Not sure if I can have both(?) extension of mystnb and sphinx of readthedoc

shenvitor commented 3 weeks ago

Man.... Finally now in this version both the GitHub documentation and RTD are working :) (waiting for approval @redeboer 🐳)

redeboer commented 2 weeks ago

Hmm seems that this is a bit more complicated then expected. I think the best way forward is to convert pixi.toml to pyproject.toml, so that the dependencies can be installed through pip (or uv) directly (which RTD requires/prefers). But let's look at that once I'm back

redeboer commented 2 weeks ago

@shenvitor check this newpixi release. There are some examples now of how to use pixi in Read the Docs: https://github.com/prefix-dev/pixi/blob/main/examples%2Freadthedocs-override%2F.readthedocs.yaml

shenvitor commented 2 weeks ago

@shenvitor check this newpixi release. There are some examples now of how to use pixi in Read the Docs: https://github.com/prefix-dev/pixi/blob/main/examples%2Freadthedocs-override%2F.readthedocs.yaml

Wow thanks for the info in the midnight :) p.s. gotta sleep I'll have half marathon in the early morning hahah😎

redeboer commented 2 weeks ago

I think you can replace the entire .readthedocs.yml with this part: https://github.com/prefix-dev/pixi/blob/f8f84d305673976600689aca74d8bdc312b63561/examples/readthedocs-override/.readthedocs.yaml#L1-L10 Of course, do replace the docs task name with docnb.

Forget the last line with pixi run readthedocs for now. Maybe we need some modification of that task later on, but let's see if it works without.