Skip to content

Comments

First Documentation Update#696

Merged
RasmusOrsoe merged 6 commits intomainfrom
doc_2nd_attempt
Apr 19, 2024
Merged

First Documentation Update#696
RasmusOrsoe merged 6 commits intomainfrom
doc_2nd_attempt

Conversation

@RasmusOrsoe
Copy link
Collaborator

@RasmusOrsoe RasmusOrsoe commented Apr 17, 2024

This PR is the first in a series of updates to the documentation for graphnet hosted here. Closes #420 .

The main change in this PR is an installation matrix (see screenshot) that allows users to click their way to installation commands. To make it easier to review these changes, I've zipped the html files html.zip. When you unzip the folder and open the index.html, a local version of the documentation page should open.

image

To accommodate the different cuda versions, the torch_gpu.txt file under graphnet/requirement has been split into two, each representing a supported cuda version. The versions chosen here are from what is supported by PyG.

Minor changes:

The structure of the documentation is changed slightly under graphnet/docs. Instead of relying on one-off python scripts to convert static .md files into the .rst files (which is what sphinx requires), the files are now written in plain .rst. These conversion scripts have been deleted. The structure of the documentation is now:

   installation/install.rst #manual
   api/graphnet.rst #auto-generated
   about/about.rst #manual
   contribute/contribute.rst #manual

which we can expand upon in future pull requests.

Copy link
Collaborator

@Aske-Rosted Aske-Rosted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments on the wording but otherwise looks good.

------------

To ensure consistency in code style and adherence to select best practices, we **require** that all developers use :code:`black`, :code:`flake8`, :code:`mypy`, :code:`pydocstyle`, and :code:`docformatter` for automatically formatting and checking their code. This can conveniently be done using pre-commit hooks. To set this up, first make sure that you have installed the :code:`pre-commit` python package. It comes with included when installing |graphnet|\ GraphNeT with the :code:`develop` tag, i.e., :code:`pip install -e .[develop]`. Then, do

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It comes with included when installing... ➡️ It is included when installing...

pre-commit install


Then, everytime you commit a change, your code and docstrings will automatically be formatted using :code:`black` and :code:`docformatter`, and :code:`flake8`, :code:`mypy`, and :code:`pydocstyle` will check for errors and adherence to PEP8, PEP257, and static typing. See an illustration of the concept below:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of and...

... :code:black and :code:docformatter, and :code:flake8, :code:mypy, and :code:pydocstyle will check for errors and adherence to PEP8, PEP257, and static typing....
⬇️
... :code:black and :code:docformatter, while :code:flake8, :code:mypy, and :code:pydocstyle will check for errors, adherence to PEP8, PEP257, and static typing.

Would to me sound a bit better, if I am reading it correctly...

@RasmusOrsoe
Copy link
Collaborator Author

Thank you very much for spotting those flaws! I have updated the language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Streamline installation process

2 participants