Skip to content

v0.4.0

Latest

Choose a tag to compare

@jlevy jlevy released this 15 Jul 03:28
2587797

What's Changed

This is chopdiff's intended breaking release. The document model now lives in the
separately published flexdoc package, and chopdiff
depends on flexdoc>=0.3.0,<0.4.0. chopdiff remains focused on diff filtering,
windowed transforms, div chunking, and optional lemmatization, built on FlexDoc.

Breaking Changes

  • The document model moved to the flexdoc package on PyPI. Replace
    chopdiff.docs.TextDoc with flexdoc.FlexDoc (prefer
    from flexdoc import FlexDoc). Move chopdiff.docs.*, chopdiff.html.*, and most
    document utilities under chopdiff.util.* to their corresponding flexdoc.*
    modules. chopdiff.util.lemmatize stays in chopdiff.
  • TextDoc is renamed FlexDoc (flexdoc.docs.flex_doc, formerly text_doc).
  • collect() is keyword-only and the scope/contains aliases are removed; use
    collect(subtree_of=, within=).
  • block_at_offset is now paragraph_at_offset, iter_blocks is now
    iter_paragraphs, and Section.own_blocks/subtree_blocks are now
    own_paragraphs/subtree_paragraphs.
  • TextDoc.block_type_counts() and Section.block_type_counts() are removed in favor
    of collect() or standard Python counters over blocks().

See FlexDoc's changelog for
the complete document-model migration.

Fixes

  • Token filters now apply exact ignore matching, support collections and predicates
    consistently, and preserve duplicate-token multiplicity.
  • Sliding word windows now honor independent shift offsets. Word windows reject
    non-positive sizes or shifts; paragraph windows reject non-positive sizes and retain
    the full final paragraph.
  • TextNode.reassemble(padding="") now preserves original div markers, attributes,
    classes, and whitespace while incorporating edited child content.

Packaging

  • Source and wheel artifacts contain only chopdiff; FlexDoc installs as a declared
    dependency.
  • CI and publishing validate the source manifest, install the wheel in isolation,
    audit dependencies, and verify imports before publication.

Full Changelog

Compare v0.3.1 ... v0.4.0