With few repo moved to pyproject.toml the sphinx docs generation needs modification
Opened this issue · 7 comments
Is your feature request related to a problem? Please describe.
We build sphinx docs using the setup.py build_sphinx command, however as we have moved a few repositories to use pyproject.toml . we have to accommodate the new changes, so we can build sphinx docs using pyproject.toml.
+ pipenv run python3 setup.py build_sphinx
/home/user/.local/share/virtualenvs/analyzer-KKVhO2re/bin/python3: can't open file 'setup.py': [Errno 2] No such file or directory
Additional context
Looks like build_sphinx is deprecated anyway, yet there is not a standard remplacement. Python packaging, I guess 😭
More details:
Looks like direct setup.py invocation for anything are deprecated anyway.
I see two options going forward:
- we invoke sphinx directly and format all of our project in the same way
- we use something like tox as a frontend handling the doc-building environment.
see https://github.com/tox-dev/tox/blob/legacy/tox.ini#L79-L86
@harshad16 @codificat any prefs ?
we can try the first method, and use sphinx-build
command instead of build_sphinx
from setup.py
then we can change this line:
Line 44 in b3ac82f
to
PYTHONPATH=. pipenv run sphinx-build docs/source/ build/html
it would fix the nepthys issues.
though setting version value https://github.com/thoth-station/python/blob/29050e8b2848f228caccd44cd6828c0077bde13f/docs/source/conf.py#L43 would be a problem.
@Gkrumbach07 @harshad16
From discussion in chat looks like there is some change which might affect how we do this ? Is that related to thoth-station/search#103 ?
Is that related to thoth-station/search#103 ?
I don't think so. Chromatic only is used to evaluate UI components. It does not handle or use any docs gen. However when generating the docs, we will want them to be styled in the same way as the website. I looked into using Gatsby to generate the docs, but that didn't seem feasible. However may be a way to add styling over the generated docs.
As we might move to the gatsby-themed website, our requirements to generate HTML files might not be needed anymore. This would make further feature development on nepthys low priority.
we should fix the current bug, by moving components to pyproject style and making change to accommodate sphix build from pyproject.