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

Add documentation structure #13

Merged
merged 33 commits into from
Dec 5, 2023
Merged

Add documentation structure #13

merged 33 commits into from
Dec 5, 2023

Conversation

frostedoyster
Copy link
Collaborator

No description provided.

@frostedoyster
Copy link
Collaborator Author

frostedoyster commented Dec 3, 2023

@PicoCentauri
This is the bare minimum, other nice things to have would be

  • tox -e docs, not super necessary IMO due to the automatic readthedocs test
  • documentation preview message on a PR, useful when adding a new model via PR

Edit: I've added both. The documentation preview is not tested yet, as it doesn't work for the PR that introduces it. Here is the documentation for this PR:
https://metatensor-models--13.org.readthedocs.build/en/13/

Copy link
Contributor

@PicoCentauri PicoCentauri left a comment

Choose a reason for hiding this comment

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

Good start. Some comments on the sphinx configuration and adding our API functions.

Once we agreed on this I will look at the rendered docs in more details.

docs/Makefile Outdated Show resolved Hide resolved
docs/make.bat Outdated Show resolved Hide resolved
docs/src/conf.py Outdated
Comment on lines 9 to 12
project = 'metatensor-models'
copyright = '2023, metatensor-models developers'
author = 'metatensor-models developers'
release = '2023.11.29'
Copy link
Contributor

Choose a reason for hiding this comment

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

I would parse everything from the pyproject.toml to not have this twice. You can take a look at skmatter for some inspiration.

Copy link
Contributor

Choose a reason for hiding this comment

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

In general some intersphinx and all the options we use in metatensor for organizing the docstring are very useful and should be added.

:maxdepth: 1

quickstart
how-to
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should also add our utils functions maybe as a subfolder API in the docs. Even if they are not essentials for the enduser they are useful if you want to develop something.

Copy link
Collaborator Author

@frostedoyster frostedoyster Dec 4, 2023

Choose a reason for hiding this comment

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

Utils are mainly for developers, which are not really the target of our documentation. I would add them under how-to/"add a new model" perhaps?

Copy link
Member

Choose a reason for hiding this comment

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

we can also have two separate doc sections: one for users and one for devs. Rascaline does something like this.

@frostedoyster
Copy link
Collaborator Author

The version is now being parsed. All the rest is still #TODO in pyproject.toml, so I didn't parse it.
The structure of the documentation is of course to be discussed

docs/src/conf.py Outdated
"footer_icons": [
{
"name": "GitHub",
"url": "https://github.com/ceriottm/MeshLODE",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No comment

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I forgot to add the toml parsing here.

docs/src/conf.py Outdated

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_rtd_dark_mode',
Copy link
Collaborator Author

@frostedoyster frostedoyster Dec 5, 2023

Choose a reason for hiding this comment

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

How did you manage to keep the dark mode even though you deleted this?
EDIT: I see that the build failed so I'm probably seeing an old version

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would keep the dark mode as the default. In terms of marketing, this is a very simple change that would allow us to stand out from all the packages which use the default themes at near-zero additional effort. I've also noticed that a lot of display issues (things that look weird in light mode) disappear in dark mode

Copy link
Contributor

Choose a reason for hiding this comment

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

Darkmode is still the default. Note that we are not using the RTD docs theme anymore but furo (which we also use the other lab-cosmo packages).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, perfect!

Copy link
Contributor

@PicoCentauri PicoCentauri left a comment

Choose a reason for hiding this comment

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

Looks good now!

@PicoCentauri PicoCentauri merged commit 56224a2 into main Dec 5, 2023
7 checks passed
@PicoCentauri PicoCentauri deleted the docs branch December 5, 2023 15:50
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.

3 participants