Skip to main content

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

doc_track-0.1.3.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doc_track-0.1.3-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file doc_track-0.1.3.tar.gz.

File metadata

  • Download URL: doc_track-0.1.3.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

Hashes for doc_track-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bc4d90229b046ad0e4db046cef9be4875369627035a68661dbd4effe8a677400
MD5 7cc35944f53fcb45188d4021434b8648
BLAKE2b-256 7823876f5cf84f6693627bd18e1a3d10bfe5c8c75d8bccd89a191d9ebb03fd9b

See more details on using hashes here.

File details

Details for the file doc_track-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: doc_track-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for doc_track-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f480bd114907de559a449253301edd6523bc5828dd1181ef8269d50b4eff473
MD5 afc34643b56585a60d808950690076a4
BLAKE2b-256 af7ba404efb6ad7ad0b6a3e2f596c55fac32fa6267b96887af799ee49b1e3050

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page