Repository navigation
v0.16.0
Immutable
release. Only release title and notes can be modified.
erdify 0.16.0 locks the contract ahead of 1.0: a versioned JSON schema, a written stability policy, and a narrower, fully documented Python API. CLI users need no changes; Python API callers, see the breaking changes below.
Changed — breaking
- The public Python API is now defined and narrowed ahead of 1.0 (#195).
Only the names inerdify.__all__are public; the CLI is unaffected.- Options after the first argument are now keyword-only on
parse_models_directory,ASTDatabaseParserandSqlSchemaParser, and
afterenumson thegenerate_*functions and the generator classes.
parse_models_directory(path, ["Base*"])becomes
parse_models_directory(path, exclude_patterns=["Base*"]). - Parser state is now private:
ASTDatabaseParser.entities,.enums,
.all_classes,.file_trees,.candidate_file_countand
SqlSchemaParser.entities/.enumsgained a_prefix. Use the values
returned byparse_all_models()/parse()instead.
- Options after the first argument are now keyword-only on
Added
- New documentation page Stability & Versioning. It defines which surfaces
are covered by semver: CLI flags, exit codes,[tool.erdify]keys,
pre-commit hook ids, the Python API and the JSON schema. It also states the
policies for diagram output changes, deprecations, Python version support and
thesqlglotrange. Exit codes0/1/2are documented there for the
first time, including that a file which fails to parse is skipped with an
error on stderr rather than failing the run. SqlSchemaParser,MermaidGeneratorand thegenerate_mermaid,
generate_jsonandgenerate_htmlfunctions are now documented, together
with a "What is public" section in the CLI & Python API page.- Every public class and function now has a Google-style docstring covering
its parameters, return value and raised errors, andEntityInfo,
FieldInfoandEnumInfodocument each field (e.g.foreign_tableis
"table.column", the allowed relationship types andsourcevalues). SqlDependencyErroris exported fromerdify, so callers of
SqlSchemaParsercan catch it without importing an internal module.--format jsonoutput now starts with a"schema_version": 1key, so
downstream tools can detect the document shape. Adding keys never bumps it;
removing or renaming a key, or changing a value's type, bumps it and ships
only in a major release. The Output Formats page now documents every key, its
type and nullability, plus these compatibility rules. The version is also
available aserdify.JSON_SCHEMA_VERSION.
Full changelog: v0.15.0...v0.16.0