Changes
Page history
Fix sections, too used to rst...
authored
Mar 03, 2021
by
juga
Hide whitespace changes
Inline
Side-by-side
Python-guidelines.md
View page @
cb1ad8e1
...
@@ -3,8 +3,7 @@ Welcome to the Python guidelines we use for network-health code. Below is a list
...
@@ -3,8 +3,7 @@ Welcome to the Python guidelines we use for network-health code. Below is a list
Conventions and tools we use
Conventions and tools we use
----------------------------
----------------------------
Style
### Style
"""""
Conventions:
Conventions:
...
@@ -26,8 +25,7 @@ Tools to use to automatically test style and/or fix it.
...
@@ -26,8 +25,7 @@ Tools to use to automatically test style and/or fix it.
-
[
flake8-docstring
](
https://pypi.org/project/flake8-docstrings/
)
:
-
[
flake8-docstring
](
https://pypi.org/project/flake8-docstrings/
)
:
follows PEP257.
follows PEP257.
Documentation
### Documentation
"""""""""""""
Tools:
Tools:
...
@@ -35,8 +33,7 @@ Tools:
...
@@ -35,8 +33,7 @@ Tools:
-
[
Sphinx
](
https://www.sphinx-doc.org/
)
: makes it easy to create intelligent
-
[
Sphinx
](
https://www.sphinx-doc.org/
)
: makes it easy to create intelligent
and beautiful documentation.
and beautiful documentation.
Testing
### Testing
"""""""
-
[
pytests
](
https://pytest.org
)
: makes it easy to write small tests.
-
[
pytests
](
https://pytest.org
)
: makes it easy to write small tests.
-
[
tox
](
https://tox.readthedocs.io/
)
: virtualenv-based automation of test
-
[
tox
](
https://tox.readthedocs.io/
)
: virtualenv-based automation of test
...
@@ -45,8 +42,7 @@ Testing
...
@@ -45,8 +42,7 @@ Testing
-
[
coverage
](
https://coverage.readthedocs.io/
)
: a tool for measuring code
-
[
coverage
](
https://coverage.readthedocs.io/
)
: a tool for measuring code
coverage of Python programs.
[
Example configuration
](
https://gitlab.torproject.org/juga/python_template_minimal/-/blob/main/.coveragerc
)
coverage of Python programs.
[
Example configuration
](
https://gitlab.torproject.org/juga/python_template_minimal/-/blob/main/.coveragerc
)
Packaging
### Packaging
"""""""""
In general, develop with last versions of the dependencies.
In general, develop with last versions of the dependencies.
When packaging, ensure your application works with older stable dependencies.
When packaging, ensure your application works with older stable dependencies.
...
@@ -66,8 +62,7 @@ See also: [install requires vs requirements](https://packaging.python.org/discus
...
@@ -66,8 +62,7 @@ See also: [install requires vs requirements](https://packaging.python.org/discus
Other conventions and tools
Other conventions and tools
---------------------------
---------------------------
Style
### Style
"""""
-
[
isort
](
https://pycqa.github.io/isort/
)
: sort imports alphabetically and
-
[
isort
](
https://pycqa.github.io/isort/
)
: sort imports alphabetically and
automatically separated into sections and by type.
automatically separated into sections and by type.
...
...
...
...