thoth-station/nepthys

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.

see https://discuss.python.org/t/pep517s-definition-of-frontend-and-backend-is-unclear-to-me/16575/20?u=vannten

I see two options going forward:

@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:

pipenv run python3 setup.py build_sphinx

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.