File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,6 +48,31 @@ instance as `dandi-api-local-docker-tests`. See the note below on the
4848` DANDI_DEVEL ` environment variable, which is needed in order to expose the
4949development command line options.
5050
51+ ## Code style conventions
52+
53+ ### Dataclass and attrs field documentation
54+
55+ Document dataclass/attrs fields using ` #: ` comments above the field, not
56+ docstrings below. This is the format Sphinx autodoc recognizes for attribute
57+ documentation:
58+
59+ ``` python
60+ @dataclass
61+ class Movement :
62+ """ A movement/renaming of an asset"""
63+
64+ # : The asset's original path
65+ src: AssetPath
66+ # : The asset's destination path
67+ dest: AssetPath
68+ # : Whether to skip this operation because an asset already exists at the
69+ # : destination
70+ skip: bool = False
71+ ```
72+
73+ See [ dandi.move.Movement on RTD] ( https://dandi.readthedocs.io/en/latest/modref/generated/dandi.move.html#dandi.move.Movement )
74+ for a rendered example.
75+
5176## Environment variables
5277
5378- ` DANDI_DEVEL ` -- enables otherwise hidden command line options, such as
You can’t perform that action at this time.
0 commit comments