Skip to content
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

With few repo moved to pyproject.toml the sphinx docs generation needs modification #98

Open
harshad16 opened this issue Oct 27, 2022 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/devsecops Categorizes an issue or PR as relevant to SIG DevSecOps. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@harshad16
Copy link
Member

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

@github-project-automation github-project-automation bot moved this to 🆕 New in Planning Board Jan 9, 2023
@codificat codificat added the sig/devsecops Categorizes an issue or PR as relevant to SIG DevSecOps. label Jan 9, 2023
@harshad16 harshad16 added kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on. labels Jan 12, 2023
@codificat codificat moved this from 🆕 New to 🔖 Next in Planning Board Jan 16, 2023
@VannTen
Copy link
Member

VannTen commented Jan 16, 2023

Looks like build_sphinx is deprecated anyway, yet there is not a standard remplacement. Python packaging, I guess 😭

@VannTen
Copy link
Member

VannTen commented Jan 16, 2023

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 ?

@harshad16
Copy link
Member Author

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.

@VannTen
Copy link
Member

VannTen commented Jan 17, 2023 via email

@VannTen
Copy link
Member

VannTen commented Jan 30, 2023

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

@Gkrumbach07
Copy link
Member

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.

@harshad16
Copy link
Member Author

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.

@goern goern moved this from 🔖 Next to 📋 Backlog in Planning Board Feb 9, 2023
@VannTen VannTen removed their assignment Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/devsecops Categorizes an issue or PR as relevant to SIG DevSecOps. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants