Skip to content

Releases: ThibTrip/npdoc_to_md

v2.0.1

27 May 17:13
Compare
Choose a tag to compare

Bugfixes

  • Fixed bug where a superfluous code block would appear in the examples (see commit 82f6804)

v2.0

27 May 16:49
9541684
Compare
Choose a tag to compare

The version 2.0 of npdoc_to_md is a complete rewrite of the library.

Thanks to drastically improved Python skills I was able to fix many formatting bugs with this library and add a few new features.

Unfortunately, keeping compability with the previous version was just too much work and would have led to an awkward code. Also the current user base seems to be very small and some previous behaviors were rather questionable e.g. removing stuff as a default (remove_doctest_blanklines=True).

I listed changes in Breaking Changes but I highly suggest you go through the new documentation.

New Features

  • Added a CLI
  • Added the ability to document members of an object (e.g. class methods) via a new key in placeholders: "members"
  • Added support for custom sections (numpydoc ignores them)
  • Added option remove_doctest_skip for removing doctest skip markers # doctest: +SKIP
  • Added option md_section_level to customize the Markdown title level of the sections in the docstrings
  • Added new function npdoc_to_md.render_folder for rendering a folder of templates

Bugfixes

  • Fixed a lot of formatting issues: missing escape characters in signature, irrelevant line breaks, missing line breaks, incorrect detection of blocks in examples...

Documentation

  • Made an overhaul of the documentation

Testing

  • Switched to GitHub Actions

Breaking Changes

Existing functions that have been changed:

npdoc_to_md.render_md_from_obj_docstring

  • The function was renamed to render_obj_docstring
  • Default of parameter remove_doctest_blanklines is now False instead of True
  • Parameter examples_md_flavor has been renamed to examples_md_lang
  • Parameter obj_namespace has been renamed to obj and there is now a parameter alias for displaying object names differently than using the namespace

The changes to these parameters also affect placeholders!

npdoc_to_md.render_md_string

  • The function was renamed to render_string
  • Parameter text was renamed to string

##npdoc_to_md.render_md_file

  • The function was renamed to render_file
  • Returns an instance of npdoc_to_md.RenderedFile (or npdoc_to_md.RenderedFileCLI when using the CLI) instead of str
  • Remove parameter allow_same_path

npdoc_to_md.get_markdown_files_in_dir

  • This function was removed. It does not serve much purpose since the introduction of function npdoc_to_md.render_folder

v1.1

01 Nov 22:12
Compare
Choose a tag to compare

Bugfixes

  • Fixed bug with npdoc_to_md's logger that was taking over other loggers (see similar issue in my library pangres)

Improvements

  • Custom exception npdoc_to_md.NonExistentObjectException for non existent objects
  • Added function npdoc_to_md.render_md_string 🎉 to render directly from a markdown string (instead of using a markdown file)
  • Added more logging for function render_md_file

v1.0.1

30 Oct 09:07
Compare
Choose a tag to compare

Improvements

  • Empty docstrings are now supported! See commit 7d1feeb
  • Added __version__ attribute

v1

01 Oct 10:33
Compare
Choose a tag to compare
v1

Improvements

  • Added "remove_doctest_blanklines" argument in the all main functions (except render_md_file). It is True by default and when True it replaces <BLANKLINE> which is used for doctest with an empty string.
  • Improved logging for errors in function render_md_file. It now shows the line number of the error and the name of the file.

Testing

  • Instead of a Jupyter Notebook, added a proper script for generating the documentation 👍

Bugfixes

  • Problem with "_" not being rendered properly in object names in Markdown outputs fixed. This was done by using HTML escaped code for "_" (&#95;). See commit ac4902d

v0.3

09 Apr 13:24
Compare
Choose a tag to compare

Bugfixes

  • Fixed bug of summary not showing

Changes for developers

  • Testing improved! Added rigorous content check with pytest.

v0.2

07 Apr 13:11
Compare
Choose a tag to compare
modify installation instructions (PyPI) and add PyPI badge