Features
New Python code parsing approach
Now `handsdown` uses Abstract Syntax Trees (AST) to parse a source code. Code was completely rewritted, but now it is better, faster, and does not require your project dependencies installed. `py27` support is dropped, but you can use a new Docker image for Python 2.x projects.
Comment docstrings
python
Name for main `logging.Logger`
PROJECT_NAME = 'my_project'
Format for logs views.
DATE_FORMAT = '%Y-%m-%d'
Ever had something like this in your source code? Well, now it is added to docs and even is discoverable by referencing from other modules, like
python
from my_project.constants import DATE_FORMAT
def parse_date(date_str, format=DATE_FORMAT):
return datetime.strptime(date_str, format)
This will generate a nice `See also` link to your `constants.md` file.
Same result for all Python version
All `py3x` produce exactly the same result.
New function signature generator
This comes together with AST introduction. Now signature is properly indented and slit to multiple lines if needed.
Bugfixes
- [x] Fix wrong ToC indentation for `mkdocs` (use 4 spaces indent)
- [x] Fix wrong target file for `See also` links
- [x] Fix source code link for `py38`, so it include decorators
- [x] Fix source lookup for `pathlib2` fallback (it is very buggy)
- [x] Fix orphaned docs cleanup for `pathlib2` fallback
- [x] Speed up doc generation on big projects
Changes
- [x] Add `--name` CLI parameter
- [x] Python 3.5.+ is now required