Skip to content

Releases: SpectraL519/pypformat

v1.2.3

26 Jul 11:25

Choose a tag to compare

  • Replaced the deprecated license info in pyproject.toml with a viable solution
  • Improved repo url hanlding in the process_md_doc.py script
  • Aligned Makefile targets to use colorized info logs and suppress unnecessary command output
  • Added the upload-test Makefile target for uploading the project to testpypi

v1.2.2

25 Jul 10:27

Choose a tag to compare

Aligned the build target in the Makefile to preprocess the README file before building the project

v1.2.1

25 Jul 10:17

Choose a tag to compare

  • Added a Makefile with the following targets:
    prepare-venv    # prepare the virtual environment
    clean-venv      # remove the virtual environment
    tests-simple    # run tests directly using pytest
    tests-tox       # run test using tox and generate the coverage report
    clean-tests     # clean the test-related temporary files
    clean-cov       # clean the coverage-related temporary files
    build           # build the project/package
    clean-build     # clean the build files
    ruff            # run the ruff formatter and linter
    clean-ruff      # clean ruff temporary files
    clean-all       # clean all temporary files
    install         # install the project to the current envinronment
    upload          # upload the distribution files to pypi (requires access to the pypi project)
    
  • Extended the PrettyFormatter tests to validate the behaviour for NamedIterable

v1.2.0

25 Jul 09:02
4c37cd6

Choose a tag to compare

The PrettyFormatter class will use the dedicated magic methods: __pf_project__ or __pf_format__(options) if they are defined for a processed item

Additional:

  • Added the NamedIterable and NamedMapping type definitions for the convenience of element projections and formatting
  • Removed separate normal and multiline formatter types and builder functions - now all formatters should return a string instance, which will be separated using the newline delimiter if necessary; Added a common builder function for custom formetters make_formatter
  • Renamed the projection builder function to make_projection to match the new formatter builder function naming

v1.1.2

31 Dec 12:24
76ae00f

Choose a tag to compare

YT-PYPF-12: Extend the built-in collection type formatting support

Added formatting support for the following types:

  • UserString
  • UserList
  • UserDict
  • Counter

v1.1.1

31 Dec 10:42

Choose a tag to compare

NONE: Missing pypi description file fix (required version bump)

v1.1.0

31 Dec 10:31
96637e4

Choose a tag to compare

YT-PYPF-22: Replace projection function mappings with iterables of callable projection objects

  • Added the TypeSpecificCallable abstract class
  • Aligned the TypeFormatter class to derive from TypeSpecificCallable
  • Created the TypeProjection class deriving from TypeSpecificCallable
  • Aligned the FormatOptions and PrettyFormatter classes to properly handle the projections using the new class

v1.0.1

28 Dec 20:40
b4002c4

Choose a tag to compare

YT-PYPF-21: Introduce type-wise sorting of projections and formatters

Sorting the combined formatters list (predefined + user-defined) in the constructor of PrettyFormatter to ensure the proper ordering of types:

  • the child types precede their parent types
  • a type precedes an union to which it belongs
  • Any and object are considered equal and always the greatest types in the ordering

v1.0.0

27 Dec 13:28

Choose a tag to compare

Initial release of the PyPformat package.

The package contains the core PrettyFormatter class which is highly customizable through the FormatOptions .
The available options include:

  • compact printing within a line width limit
  • customizable indentation marking
  • text styling
  • object projection
  • injecting custom type-specific formatting functions