Command that helps keeping track of piece of code marked as 'documented'
Project description
doc-track
doc-track is a tool that allows developpers to make CI fail when a piece of code marked as "is documented" is added / modified / deleted.
Installation
pip install doc-track
Usage
doc-track check
options available
--version-from # Git version of comparison used
--version-to # Git version to compare the first version to
--path # Path where comparison is checked
--tags # Pair list of start / end tag: ... --tags "# start","# end" "#start","#end"...
--config # to specify config file, default .doctrack.yml
--fail-status # Return code in case code documented is modified, default 0
--show-result # To enable showing result in error output, default True
--skip-blank-lines # To skip blank lines changes of documented code, default True
Config
You can add a configuration file that must respect the .yml format.
All options listed above are also available in the config file.
Here is an example of a typical usage for a python project's CI/CD:
# .doctrack.yml
version_from: master
version_to: HEAD
path: .
tags:
- ["# doc", "# enddoc"]
fail_status: 1
show_result: True
skip_blank_lines: True
Mark code as documented
To mark code as documented, wrap it with both start tag and end tag.
Tag must be the only text on the line:
class A:
# doc
def fct():
return 22
# enddoc
End tag must be different from start tag
Warning
Do not allow user you do not trust to execute this code. Since subprocesses are run it could lead to security breach.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file doc_track-0.1.4.tar.gz.
File metadata
- Download URL: doc_track-0.1.4.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a04ae56fb27416a2df488851df638619eb6c9ec6e978f7b822083e82a1bfd4
|
|
| MD5 |
d4cc4c176fba9eda211a0994357a3f55
|
|
| BLAKE2b-256 |
b06f15620e31aaed1f970041a92109afca149d2ecca4b455fb03e7484a8b8550
|
File details
Details for the file doc_track-0.1.4-py3-none-any.whl.
File metadata
- Download URL: doc_track-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74101753ffddf0e568fd2f2d539f4ad59afd6cd6e28e5c19d69af73a03c31472
|
|
| MD5 |
3329d35b486919bcf5a647a5a4b4f098
|
|
| BLAKE2b-256 |
05461eed537ebf93e0dbe04378373f1d4184caf03e90bc8c78232516ed2f38e9
|