Closed bonicim closed 2 years ago
@bonicim I feel this approach is a bit advanced for template users.
@kefeimo just some thoughts on your comments. Let me know if this addresses your concerns
@bonicim I feel this approach is a bit advanced for template users.
- (Assuming myself is a non-advanced user), following the common practice like Pandas and Numpy, I am going to look for requests.txt, instead of looking into pyproject.toml.
- I argue that, people normally know what to do with requirements.txt but I am not sure about pyproject.toml.
- I also argue that sphinx is not the key feature of the custom-agent-project, i.e., the content of the documentation is what matters, instead of the rendering result using sphinx. So, maybe we don't need to make it so automatic.
During the feedback on Wednesday's meeting, I thought we were going to automate the installation of sphinx so user's don't have to install themselves, with the goal of allowing users to render the documentation using sphinx so that they can see it on a broswer. Maybe I'm wrong, but what should be the user experience with documentation building?
As for requirements.txt, we don't provide that since we are using pyproject.toml to store all the dependencies.
@bonicim My understanding is the same. We decided to use sphinx to make html docs for agents.
~@bonicim @schandrika, my concern is mainly from the design principles of decoupling, and isolation.~
~ I don't think it is a good idea to ship sphinx dependencies with the user package requirement. (If I understand correctly, once ruuning poetry install
, users will have all dependencies requested by your pyproject.toml file. ~
~ Use Pandas and Numpy as examples. Neither of them will install sphinx dependencies when running pip install numpy
(or pip install pandas
). i.e., there is no doc dependencies in their pyproject.toml (of numpy, of pandas). Numpy isolates documentation using doc_requirements.txt, Pandas use environment.yml;~
~* From a user experience point of view, I don't think it is a lot of gain by directly running make html
. (I personally use a separate virtual environment to build html from sphinx. And I would specify requirements.txt under doc to render reproducible documentation in ReadtheDocs. ref: Reproducible Builds - Read the Docs: Documentation Simplifie) On the contrary, it is very troublesome to resolve dependency conflict, e.g., the user has a conflict with sphinx version in pyproject.toml.~
@bonicim @schandrika, thanks for the explanation. Ref: Dependency Management With Python Poetry ref: Package Python Projects the Proper Way with Poetry
~@bonicim @schandrika, my concern is mainly from the design principles of decoupling, and isolation.~ ~ I don't think it is a good idea to ship sphinx dependencies with the user package requirement. (If I understand correctly, once ruuning
poetry install
, users will have all dependencies requested by your pyproject.toml file. ~ ~ Use Pandas and Numpy as examples. Neither of them will install sphinx dependencies when runningpip install numpy
(orpip install pandas
). i.e., there is no doc dependencies in their pyproject.toml (of numpy, of pandas). Numpy isolates documentation using doc_requirements.txt, Pandas use environment.yml;~ ~* From a user experience point of view, I don't think it is a lot of gain by directly runningmake html
. (I personally use a separate virtual environment to build html from sphinx. And I would specify requirements.txt under doc to render reproducible documentation in ReadtheDocs. ref: Reproducible Builds - Read the Docs: Documentation Simplifie) On the contrary, it is very troublesome to resolve dependency conflict, e.g., the user has a conflict with sphinx version in pyproject.toml.~@bonicim @schandrika, thanks for the explanation. Ref: Dependency Management With Python Poetry ref: Package Python Projects the Proper Way with Poetry
@kefeimo The sphinx dependency is declared under the section, tool.poetry.dev-dependencies. That section contains "packages that contributing developers should download to iterate on this project. Dev dependencies are not required to run the app, and won't be downloaded when the app is built by default.". Users do have the option to install only the required dependencies using poetry install --no-dev
. I can probably add that blurb in the README.
How tested:
I built a test agent using this branch. I tested out Makefile under docs. I also verified that the dev tools (e.g. safety, yapf, pre-commit, mypy) were working and properly installed.