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
flexdocpackage on PyPI. Replace
chopdiff.docs.TextDocwithflexdoc.FlexDoc(prefer
from flexdoc import FlexDoc). Movechopdiff.docs.*,chopdiff.html.*, and most
document utilities underchopdiff.util.*to their correspondingflexdoc.*
modules.chopdiff.util.lemmatizestays in chopdiff. TextDocis renamedFlexDoc(flexdoc.docs.flex_doc, formerlytext_doc).collect()is keyword-only and thescope/containsaliases are removed; use
collect(subtree_of=, within=).block_at_offsetis nowparagraph_at_offset,iter_blocksis now
iter_paragraphs, andSection.own_blocks/subtree_blocksare now
own_paragraphs/subtree_paragraphs.TextDoc.block_type_counts()andSection.block_type_counts()are removed in favor
ofcollect()or standard Python counters overblocks().
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.