Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_proto
Commits
80a4ae33
Commit
80a4ae33
authored
Oct 07, 2022
by
BO ZHANG
🏀
Browse files
tweaks
parent
0777aaab
Pipeline
#180
passed with stages
in 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/source/api/csst_proto.rst
View file @
80a4ae33
...
@@ -2,6 +2,7 @@ API
...
@@ -2,6 +2,7 @@ API
===
===
.. automodule:: csst_proto.top_level_interface
.. automodule:: csst_proto.top_level_interface
:noindex:
:members:
:members:
:undoc-members:
:undoc-members:
:show-inheritance:
:show-inheritance:
doc/source/codestyle.rst
View file @
80a4ae33
...
@@ -39,9 +39,23 @@ Files/directories with asterisks (*) marks are optional.
...
@@ -39,9 +39,23 @@ Files/directories with asterisks (*) marks are optional.
Code Style
Code Style
==========
==========
Python code should follow PEP 8
Python code should follow PEP 8
- https://peps.python.org/pep-0008/
- https://peps.python.org/pep-0008/
Whereas C/C++ code should follow PEP 7
Whereas C/C++ code should follow PEP 7
- https://peps.python.org/pep-0007/
- https://peps.python.org/pep-0007/
Many IDEs (Pycharm, etc) and tools can be used to validate code style
- pycodestyle:
- https://pycodestyle.pycqa.org/en/latest/
In our case, we recommend the following method to check code style
.. code-block:: bash
pycodestyle ./**/*.py --ignore=E121,E123,E126,E226,E24,E704,W503,W504,E501,E722
Numpy-style docstring
Numpy-style docstring
...
@@ -50,9 +64,24 @@ There are several popular docstring styles, namely Google, reStructuredText, and
...
@@ -50,9 +64,24 @@ There are several popular docstring styles, namely Google, reStructuredText, and
The CSST DAS adopts Numpydoc-style among the three.
The CSST DAS adopts Numpydoc-style among the three.
We refer our developers to the Numpydoc official style guide for instructions on
We refer our developers to the Numpydoc official style guide for instructions on
how to write docstrings.
how to write docstrings.
- https://numpydoc.readthedocs.io/en/latest/format.html
- https://numpydoc.readthedocs.io/en/latest/format.html
In particular, a complete example is available here.
In particular, a complete example is available here.
- https://numpydoc.readthedocs.io/en/latest/example.html
- https://numpydoc.readthedocs.io/en/latest/example.html
In our case, we recommend the following method to check docstring
.. code-block:: bash
python -m numpydoc --validate {YOUR_PACKAGE}.top_level_interface.{YOUR_FUNCTION/CLASS}
For example,
.. code-block:: bash
python -m numpydoc --validate csst_proto.top_level_interface.flip_image
Markup language
Markup language
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment