Changelogο
v0.8.1 (2026-04-09)ο
Fix README: replace stale
handler.validate()examples withMMCIFValidator().validate()API.
v0.8.0 (2026-04-09)ο
Breaking changes
handler.register()andhandler.validate()have been removed. Registration now lives on model instances:category.register("validate", vp),block.register("validate", bv),container.register("validate", cv).PluginScopeenum has been removed. Scope is inferred from which model classregister()is called on.PluginFactoryno longer accepts ascopeparameter β plugins are stored in a flatname β Pluginmapping.Renames:
DictionaryValidatorβSchemaValidator,MmcifValidatorβMMCIFValidator,BlockValidatorβDataBlockValidator.
New features
Model-level plugin registration β
register(name, plugin)is now a method onCategory,DataBlock, andMMCIFDataContainer(inherited fromDataContainer).Standalone ``validate()`` β call
MMCIFValidator().validate(data)directly without any handler involvement. Accepts aCategory,DataBlock, orMMCIFDataContainer.Plugin wiring (
register(),_lookup_plugin()) is now defined once in theDataContainerbase class.
v0.7.0 (2026-04-08)ο
Breaking changes
Attribute access on non-existent categories / blocks now returns a lightweight pending proxy (
_PendingCategory/_PendingDataBlock) that auto-commits on write and raisesAttributeErrorwith fuzzy suggestions on read.sloth.mmcif.rulesmodule merged intosloth.mmcif.validator. All rule factories and validator classes now live in a single module.
New features
Multi-level validation β
ValidatorPlugin,DataBlockValidator, andContainerValidatorvalidate aCategory,DataBlock, orMMCIFDataContainerand return aValidationReportwith.errors,.warnings,.is_valid, and.raise_on_error()helpers.Schema-aware warnings β assigning an unknown item to a known category (or creating an unknown category) emits a
SchemaWarningwith βDid you mean β¦?β suggestions drawn from the bundled mmCIF dictionary.Fuzzy matching in error messages β
AttributeErroronCategory,DataBlock, andMMCIFDataContainerincludesdifflib.get_close_matchessuggestions.Tab completion β
__dir__()on all three model classes exposes item names, category names, block names, and registered plugin names for IPython / Jupyter tab completion.``ValidationSeverity`` enum β
ERROR,WARNING,INFOseverity levels accepted by every rule factory.``ValidationReport`` β accumulator for
ValidationErrorinstances with filtering by severity.``DataBlockValidator`` / ``ContainerValidator`` β plugins that run all per-category validators + cross-category checkers across an entire block or container.
``DataSourceFormat`` enum moved to
defaults.
Bug fixes
DictionaryParser: fix multiline value detection (now handles continuation lines whose first token is a bare value, not a key).DictionaryParser: fix multi-loop storage so that successiveloop_blocks in the same save frame no longer overwrite each other.DictionaryParser: deterministic graph-based nesting resolves composite primary-key categories that previously caused non-deterministic parent/child ordering.
Chores
Hoist non-conditional inline imports to module level across source and test files.
Centralise all enums (
DataSourceFormat,ValidationSeverity) insloth.mmcif.defaults.CI: weekly GitHub Actions workflow to auto-update the bundled mmCIF dictionary from wwPDB.
v0.6.0 (2026-04-07)ο
Validation rules module (
sloth.mmcif.rules):SchemaValidator: auto-generates checks from the bundled mmCIF dictionary viaDictionaryParser(mandatory items, enumerations, type-regex patterns, FK/composite-key integrity, parent/child presence)MMCIFValidator: extendsSchemaValidatorwith wwPDB deposition business rules expressed as declarative class-level data tables18 composable rule factory functions for custom validation
ValidatorPluginsupports multiple validators per category (list-based)Generic plugin system:
PluginFactory,Plugin,PluginWrapper,FunctionPluginStreamlined registration:
handler.register("_cat", func)for validators, tuples for cross-checkersDelete support:
del block._category,block.delete("_category"), same for itemsUpdate docs, cookbook, and API reference for new plugin API
v0.5.4 (2026-04-07)ο
Fix project URLs in pyproject.toml (lucas/sloth β lucas-ebi/sloth)
v0.5.3 (2026-04-07)ο
Add Sphinx + Read the Docs documentation with full API reference
Integrate interactive cookbook notebook into docs
Streamline README as concise PyPI landing page
Add string interning note to performance table
v0.5.2 (2025-12-15)ο
Initial public release on TestPyPI
High-performance gemmi-backed parser and writer
Lazy object construction with
cached_propertyDot-notation and dictionary access patterns
JSON export with automatic relationship resolution
JSON import with automatic flattening
Pluggable validation system with cross-category support
mmCIF dictionary parsing and FK/PK mapping