Skip to content

Releases: vemel/handsdown

0.4.0

29 Oct 07:27
ad3ef9b
Compare
Choose a tag to compare

Added

  • [cli] new --branch argument to set master, main or any other branch for external links

Fixed

  • [ast] Constant AST import was not working properly on Python 3.7

0.3.9 - Python 3.8 AST

16 Apr 03:39
2e81da4
Compare
Choose a tag to compare

Changed

  • Python 3.8+ uses built-in ast module
  • typed-ast is not required for py38

Fixed

  • __all__ directive parsing for py38

0.3.8 - Stability Fixes

23 Feb 00:30
Compare
Choose a tag to compare

Fixed

  • Error on python comment handled as Markdown header
  • Incorrect find to source code link in automated GitHub actions

Dependencies

  • Removed strict typed-ast version requirements
  • Updated dev dependencies

0.3.5 - New docs

19 Nov 05:44
Compare
Choose a tag to compare

Changes

  • Updated documentation
  • Updated dependencies
  • Fixed Read the Docs deployment

0.3.3 - Asynchronous Coverage

28 Oct 13:55
Compare
Choose a tag to compare

Features

  • Add if expressions support to expression analyzer
  • Add await support to expression analyzer
  • Add yield and yield from support to expression analyzer
  • Add asynchronous functions and methods support

Bugfixes

  • Cleanup orphaned directories after glob iteration to avoid OSError
  • Simplify main class name lookup
  • Fix potential error in comment docstring discovery
  • Fix force output path creation if file exists with expected directory name

0.3.2 - Calling __all__

28 Oct 02:21
Compare
Choose a tag to compare

Features

  • Respect __all__ directive
  • Add rendering support for f-strings
  • Add rendering support for slices
  • Add rendering support for list, set and dict comprehensions
  • Add rendering support for generator expressions

Bugfixes

  • Split sphinx sections
  • Skip private functions in modules
  • Change __main__.py title to Module
  • Fix default values for positional only arguments
  • Ignore comment docstrings starting with FIXME or TODO
  • Fix starargs rendering for AST2
  • Fix comment-style type annotations ordering
  • Add warning on unknown operator render

Changes

  • Use ToC depth 1 for sub-modules

0.3.1 - Sphinx Unchained

26 Oct 00:58
Compare
Choose a tag to compare

Features

  • Discover related object links inside a class
  • Support Sphinx directives, e.g. ..seealso::

Bugfixes

  • Fix related links discovery for attributes
  • Remove pathlib2 dependency
  • Fix default values representation for py2x
  • Set anchor links to module/class header for attributes
  • Do not replace attribute names with links inside parent module doc
  • Add type annotations placed on a different line
  • Allow comment blocks inside each other (remember how the block started)

0.3.0 - From Scratch

25 Oct 12:26
Compare
Choose a tag to compare

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

# 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

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

  • Fix wrong ToC indentation for mkdocs (use 4 spaces indent)
  • Fix wrong target file for See also links
  • Fix source code link for py38, so it include decorators
  • Fix source lookup for pathlib2 fallback (it is very buggy)
  • Fix orphaned docs cleanup for pathlib2 fallback
  • Speed up doc generation on big projects

Changes

  • Add --name CLI parameter
  • Python 3.5.+ is now required

0.2.2 - Read the Docs

21 Oct 01:34
Compare
Choose a tag to compare

Features

Add Read the Docs support

Added a new CLI argument --external - replacement for removed --gh-pages argument, because now it handles both Read the Docs and GitHub Pages.

The output produced by handsdown is now compatible with mkdocs format. That means that you can generate HTML from handsdown output:

# build documentation with absolute links to GitHub repo source files
# and generate config files for mkdocs, Read the Docs and GitHub Pages
handsdown --external `git config --get remote.origin.url`

# build HTML to `site` directory
mkdocs build

Signature builder improvements

  • Now you can see decorators in a function signature
  • Comment-style type annotation parsing now produces correct result for partially annotated functions
  • Faster source code processing

Here is an example of a new annotation

@property
def title() -> Text:

@title.setter
def title(title: Text) -> None:

Bugfixes

  • Only enable type checking for a primary imported module and disable for other
  • Use full config for GitHub Pages
  • Make signature compatible with GitHub highlighter
  • Fix installation from .tar.gz

Other changes

  • Remove --gh-pages CLI argument
  • Modules list moved to MODULES.md
  • Add support for custom content in Modules list file
  • Use project name as an index title in submodule ToC
  • Add --version CLI argument
  • Add version info installed package

0.2.1 - Early Bugfixes

19 Oct 12:11
Compare
Choose a tag to compare

Bugfixes

  • Fix crash on getting source code line from non-readable files
  • Skip directories starting with . (Python eggs could be stored in a project root)
  • Fix circular imports by enabling typing.TYPE_CHECKING only for the first file
  • Support HTTPS protocol in git config --get remote.origin.url