Build sourcehut JSON annotations for Python projects
Switch order of checks
Exit with error if no files to annotate are found
Add dev requirements file

refs

master
browse log
0.3.0
release notes

clone

read-only
https://git.sr.ht/~ihabunek/annotatepy
read/write
git@git.sr.ht:~ihabunek/annotatepy

annotatepy

Scans Python source code and emits an annotation graph for git.sr.ht's code annotations feature.

This project is in early stages of development, so things may change and break without warning.

Resources

Usage

annotatepy [-h] [-o OUTPUT] [-r ROOT] [source_paths [source_paths ...]]

Generate sourcehut annotations

positional arguments:
  source_paths          one or more paths within the project containing the
                        code to be annotated (defaults to project root)

optional arguments:
  -h, --help            show this help message and exit
  -r ROOT, --root ROOT  project root (defaults to working dir)
  -v, --verbose         enable verbose logging
  -q, --quiet           disable logging
  -i INDENT, --indent INDENT
                        if set to a non negative integer, JSON elements will
                        be pretty printed with that indent level

https://git.sr.ht/~ihabunek/annotatepy/

Example

To annotate the code in the src and test dirs within your project and upload the annotations to sourcehut, from the project root run:

annotatepy src test > annotations.json

See docs on uploading the generated annotations to your sourcehut project here.