-
Notifications
You must be signed in to change notification settings - Fork 0
Backend Documentation structure #15
Comments
Documentation for Other Projects hosted on GitHubTo get an understanding of how to structure our own docs, the documentation for 6 other projects was compared to understand how docs are structured and to hopefully incorporate that within our own documentation. The 6 projects outlined in this document are: It is worth noting that all of these projects are hosted on pypi as well Flaskhttps://github.com/pallets/flask/tree/1.1.x This project includes a main
While the documentation is meant to be accessed through the external documentation page, it is worth noting that the documentation that is located on this website is pulled directly from a documentation directory located directly in the repo. This directory seems to be the host for the documentation and it is possible to read the documentation directly from the git repository, but it is written in Flask-RESTfulhttps://github.com/flask-restful/flask-restful This project does include a readme, however, it is very minimal and serves only to point the reader to the official documentation page. Like Flask, the documentation is written in Flask-JWT-Extendedhttps://github.com/vimalloc/flask-jwt-extended/tree/master This project is very similar to flask in almost every way including:
python-dotenvhttps://github.com/theskumar/python-dotenv This project differs from the previous three projects in several ways:
It seems that this project is small enough and it's uses are limited enough for the documentation to be a single readme. python-ldaphttps://github.com/python-ldap/python-ldap This project is similar to Flask in pretty much everyway including:
MkDocshttps://github.com/mkdocs/mkdocs This project is also similar to Flask in pretty much everyway including:
ConclusionIt seems like it is common practice to store documentation for a given project in the branch that the documentation corresponds to, and in all 6 projects, no documentation is stored on a separate branch. However, it is also common practice to serve out the documentation on an external website as opposed to making the user look through the documentation directly in the repository. So it would seem that the purpose for keeping the documentation directly in the git repository might be for consolidation, but the documentation in almost all the above projects (except for python-dotenv) is the external webpage that the readme's point to. Where the source files for the external webpage are kept could theoretically be anywhere. |
It appears Flask keeps its source code in a Flask RESTful does a similar thing but passes an exclude kwarg to the Flask JWT Extended explicitly lists the name of the folder that contains the source code files. See: https://github.com/vimalloc/flask-jwt-extended/blob/master/setup.py#L25 python-dotenv also manually lists its module in its mkdocs uses So it seems that storing docs within the git repo shouldn't cause any issues. After a quick test, it appears that only the package itself gets installed into a python virtual environment anyhow. We should rearrange out GitHub repo to look like this:
|
Starting to work on this. |
This was resolved in #18 by adding a docs folder to the root of of the repo. The workflow for updating docs is now:
git clone https://github.itap.purdue.edu/ECN/webqueue2-api.git
cd webqueue2-api
python3 -m venv venv
source venv/bin/activate
pip install -U pip
# The . (dot) references the setup.py script in the same directory.
# The [all] suffix specifies the metapackage. Other options include [docs] and [dev].
# Omitting the suffix and just using . (dot) will install the production version.
pip install .[all]
mkdocs serve
# Outputs to `site/` directory.
mkdocs build |
The backend documentation structure needs to be clean and avoid transferring unnecessary files when ever the package is installed. This required defining and managing a documentation either by making a separate branch or by some other means. Currently looking into how other github projects host their documentation.
Anything relating to the implementation of backend documentation will be kept in this issue.
The text was updated successfully, but these errors were encountered: