Closed mkoeppe closed 2 years ago
Description changed:
---
+++
@@ -1 +1,2 @@
+We could also check some of the patterns that the patchbot complains about - https://github.com/sagemath/sage-patchbot/blob/master/sage_patchbot/plugins.py#L601
Dependencies: #29651
Description changed:
---
+++
@@ -1,2 +1 @@
-We could also check some of the patterns that the patchbot complains about - https://github.com/sagemath/sage-patchbot/blob/master/sage_patchbot/plugins.py#L601
Changed dependencies from #29651 to #29651, #30475
There are also linters for rst files: rstcheck or doc8
Yes, see also my comments in #30415
Description changed:
---
+++
@@ -1 +1,7 @@
+Short of running a single-file docbuild (which needs fixing - #30475), there are several options for validating rst files and docstrings:
+- rstcheck
+- doc8
+- https://pypi.org/project/flake8-rst-docstrings
+- https://pypi.org/project/flake8-docstrings/ (uses https://github.com/pycqa/pydocstyle)
+
Changed dependencies from #29651, #30475 to #29651
Changed dependencies from #29651 to #30503
Description changed:
---
+++
@@ -1,7 +1,7 @@
Short of running a single-file docbuild (which needs fixing - #30475), there are several options for validating rst files and docstrings:
-- rstcheck
-- doc8
+- https://pypi.org/project/rstcheck/
+- https://pypi.org/project/doc8/
- https://pypi.org/project/flake8-rst-docstrings
- https://pypi.org/project/flake8-docstrings/ (uses https://github.com/pycqa/pydocstyle)
As a first stab at docstring validation, I have added tox -e pydocstyle
. This will need some configuration -- right now it gives just too many warnings.
Last 10 new commits:
ca64a52 | src/tox.ini (codespell): Skip non-English doc, binary files, backup files |
d8e101c | src/.codespell-dictionary.txt: New, consider these words correct |
e327314 | src/bin/sage (-advanced): Generalize tox environment list formatting |
0847d49 | tox.ini: When delegating to src/tox.ini, use -- as a separator |
2ff2985 | src/.codespell-ignore.txt: New; use in addition to .codespell-dictionary.txt |
92c3b3d | tox.ini (codespell): If invoked from SAGE_ROOT, codespell the whole Sage distribution by default |
caba287 | src/tox.ini (codespell): Skip more files and directories |
e5a916f | tox.ini: Add codespell to envlist |
c20fad1 | Merge branch 't/30503/apply_fossies_codespell' into t/30448/src_tox_ini__add_validation_of_rst_files_and_docstrings |
10b6028 | WIP: src/tox.ini (pydocstyle): New |
For the automated check, it's also a problem that Sage uses a custom doc style and not one of the more standardized ones like pep257, numpy or google. https://www.python.org/dev/peps/pep-0257/ https://numpydoc.readthedocs.io/en/latest/format.html https://google.github.io/styleguide/pyguide.html#383-functions-and-methods
Are there any plans to migrate to one of these standards?
I'm not aware of migration plans
Replying to @mkoeppe:
I'm not aware of migration plans
Nor am I, but it's something to consider.
I've created #31044 for this.
Also if the decision is made to migrate, to do the actual migration we will certainly need a parser for the sage-style doc.
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
d35b85c | src/tox.ini (rst): New, via flake8-rst-docstrings |
Description changed:
---
+++
@@ -5,3 +5,6 @@
- https://pypi.org/project/flake8-rst-docstrings
- https://pypi.org/project/flake8-docstrings/ (uses https://github.com/pycqa/pydocstyle)
+Here we add a tox environment using https://pypi.org/project/flake8-rst-docstrings.
+
+
Author: Matthias Koeppe, ...
Description changed:
---
+++
@@ -7,4 +7,9 @@
Here we add a tox environment using https://pypi.org/project/flake8-rst-docstrings.
+Usage:
+```
+ ./sage -tox -e rst src/sage/geometry/polyhedra
+```
+
Branch pushed to git repo; I updated commit sha1. New commits:
e0ed96b | src/tox.ini (flake8): Add to rst-roles, rst-directives, extend-ignore |
Not sure if we should add all roles from https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html and https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cross-referencing-python-objects
Branch pushed to git repo; I updated commit sha1. New commits:
9ee09da | src/tox.ini (flake8): Add more rst-roles, rst-directives |
Branch pushed to git repo; I updated commit sha1. New commits:
c0a9940 | src/tox.ini (flake8): Add more rst-roles |
Branch pushed to git repo; I updated commit sha1. New commits:
99a17c7 | .github/workflows/lint.yml: Run tox -e rst |
Branch pushed to git repo; I updated commit sha1. New commits:
2859d80 | src/tox.ini (flake8): Add more rst-roles |
Branch pushed to git repo; I updated commit sha1. New commits:
64b6fe8 | src/sage/geometry/polyhedron/backend_normaliz.py: Fix errors shown by tox -e rst |
Branch pushed to git repo; I updated commit sha1. New commits:
9a57421 | src/sage/geometry/polyhedron/backend_cdd.py: Fix errors shown by tox -e rst |
87ac4e2 | src/sage/geometry/polyhedron/backend_polymake.py: Fix errors shown by tox -e rst |
a09c09a | src/sage/geometry/polyhedron/base3.py: Fix errors shown by tox -e rst |
Branch pushed to git repo; I updated commit sha1. New commits:
05df476 | src/sage/schemes: Fix some errors shown by tox -e rst |
Branch pushed to git repo; I updated commit sha1. New commits:
e459087 | src/sage/graphs: Fix some errors shown by tox -e rst |
Branch pushed to git repo; I updated commit sha1. New commits:
ab4f8dc | src/sage/matrix: Fix errors shown by tox -e rst |
Branch pushed to git repo; I updated commit sha1. New commits:
047a845 | src/sage/categories: Fix some errors shown by tox -e rst |
Short of running a single-file docbuild (which needs fixing - #30475), there are several options for validating rst files and docstrings:
Here we add a tox environment using https://pypi.org/project/flake8-rst-docstrings.
Usage:
We also run it as part of the Lint workflow on GH Actions (see badge).
Continued in the meta ticket: #34157
Depends on #30503
CC: @tobiasdiez @jhpalmieri @dimpase @fchapoton @DaveWitteMorris @Etn40ff @tscrim @kwankyu
Component: documentation
Author: Matthias Koeppe
Branch/Commit:
0677319
Reviewer: Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/30448