Update documentation
Update the installation and usage documentation to reflect changes made in recent merges, notably the refactoring of the datamodules and the addition of saliency maps.
Merge request reports
Activity
added 2 commits
- Resolved by Daniel CARRON
I'm having trouble understanding what these docstrings mean:
Also this file contains some duplicated docstrings that probably need to be rewritten.
added Documentation Requires benchmarking labels
- Resolved by Daniel CARRON
The
_process_sample
function is in a weird state, with a lot of code commented out. We should decide what it returns and update the docstring accordingly.Edited by Daniel CARRON
- Resolved by Daniel CARRON
There's obviously a typo here but I can't figure out what a
dunder len method
is supposed to be.
added 1 commit
- 024d4dee - [doc] Clarifications in transforms docstrings
- Resolved by Daniel CARRON
There are a lot of inconsistencies in how the docstrings are formatted. This does not impact the generated documentation but we should probably follow some guidelines. I'm listing here what I noticed for reference and discussion. Some of it is definitely nitpicky on my part.
- We seem to be using numpy-style docstrings with pep484 (typhints) annotations. The sphinx documentation show an example of how they should be formatted: https://www.sphinx-doc.org/en/master/usage/extensions/example_numpy.html#example-numpy (function_with_pep484_type_annotations)
Notable points are:
- A single empty line between function description, parameters, and returns
- No spaces between the different parameters
- All sentences start with a capital letter and end with a dot
-
Returns
contains the type of the return value, as well as a description.
-
Verbs are sometimes written in infinitive and other times in present tense. e.g.
compute ...
vs.computes ...
. We should decide which to use. -
We should use types we defined in our data model. Write
DataModule
instead ofdata module
ordatamodule.
-
Package names are sometimes capitalized, sometimes not:
Lightning
vs.lightning
. I'd say we should always lower-case them. -
Functions expecting a path to something can be ambiguous. We should write "path to ..." and "directory in which ..." to make clear if we want a file or a directory.
-
File types are sometimes written as
PDF
orpdf
or.pdf
. I'd personally choose.extension
. -
(extremely nitpicky) Words with multiple spellings can be both found:
normalize
andnormalise
. -
Should examples in our documentation match those in our
--help
commands?
Edited by Daniel CARRON
- Resolved by Daniel CARRON
Our SPDX headers show
Copyright © 2023
. I am not sure if that is how it should be to indicate the year it was made, or if we should update them to2024
or2023 - 2024
.
added 22 commits
-
83c01d55...6ce6f1a6 - 5 commits from branch
main
- 6ce6f1a6...917e86f3 - 7 earlier commits
- d5ef968e - [doc] Fix typos
- f35f0912 - [doc] Fix typos
- 791e4152 - [doc] Clarifications in transforms docstrings
- caeabcf6 - [doc] More changes on transforms docstrings
- 9e60e08c - [doc] Update api.rst
- 14de2dc6 - [doc] Cleaned up interpretability _process_sample()
- ec656ca4 - [doc] Reformatted docstrings to proper numpy-style
- fe2424b7 - [doc] Various docstring improvements
- 2f925c77 - [test] Fix import for typehints
- 0d7e2872 - [doc] Remove type aliases from docstrings because of autodoc issue
Toggle commit list-
83c01d55...6ce6f1a6 - 5 commits from branch
@dcarron - thanks for all the commits. Are we OK to merge his one?
- Resolved by Daniel CARRON
After discussing this with André, I'll go ahead and edit docstrings to use the same verb tense everywhere before we merge.
I'll also check whether it's possible to have tests for docstring validation.