Package: dirty-models-sphinx
Dirty Models Sphinx extensionSphinxextension for dirty modelsAboutSphinxextension to help developers to write documentation of
applications which useDirty Models.FeaturesDescribe each field with real type.All field types defined onDirty Modelsare documented.Use prefixed (doc comment using#:before field) or
suffixed (Multiline doc string after field) documentation for each field.Documentread onlyfields.Document default value for each field.Document datetime format on those fields.Able to set a prefix text in model signature.Able to set a prefix text in fields signature.Able to document field type as annotation or as field directive.Able to add models totoctree.Able to add model attributes totoctree.Able to describe model as structure.ChangelogVersion 0.6.2Make it compatible with newer versions ofSphinx(+5.0).Version 0.6.1Remove deprecated dependencies inSphinx3.0.0.Added documentation forHashMapModelswith hardcoded field type.Fixes.Version 0.6.0Useaccess_modeofDirty Modelsversion0.12.0.Version 0.5.1Fix regressions.Version 0.5.0Added option to describe model as structure.Added enum documenter.Added option to hide/show alias.Added option to hide/show read-only tag.Added option to use custom title as model name.No document fields with keyhiddenset to true on field metadata.Better field type handling.New module autodocumenterautodirtymodulein order to allow to set new options at module level.Version 0.4.1Fix installation.Version 0.4.0Document default timezone on TimeField and DatetimeField.Document forced timezone on DatetimeField.Minor fixes.Fix nested classes.Document EnumField.Version 0.3.0Added option to add models totoctree.Added option to add model attributes totoctree.Added option to set prefix model signature.Added option to set prefix model field signature.Added option to use field type as annotation.Added fields to index.Changed default value label toDefault value.IssuesLatex manual document class builder fails when model attributes are intoctree.
That is because it creates a fake sections with sameidsand remove aftertoctreeis created.
So, latex builder does not found references when it try to create links.InstallationJust usepipto install it:$pipinstalldirty-models-sphinxAnd add toSphinxextensions to your project.Warningautodocextension (included in Sphinx) is required.conf.py file:extensions=['sphinx.ext.autodoc','dirty_models_sphinx']ConfigurationIt is possible to modifyDirty Models Sphinx extensionbehavior using configuration inconf.pyfile.dirty_model_add_classes_to_tocIf it isTrueDirty Models classes will be added to table of content. Default:True.dirty_model_add_attributes_to_tocIf it isTrueDirty Models class attributes will be added to table of content, only if classes were added.
Default:True.dirty_model_class_labelIt defines a prefix text for Dirty Model class signatures. It is possible to useNonein order to avoid prefix.
Default:'Model'.dirty_model_property_labelIt defines a prefix text for Dirty Model class field signatures. It is possible to useNonein
order to avoid prefix. Default:'property'.dirty_enum_labelIt defines a prefix text for enumearions signatures. It is possible to useNonein
order to avoid prefix. Default:'Enum'.dirty_model_hide_aliasIt allows to hide field alias.dirty_model_hide_readonlyIt allows to hide read-only tags.UsageJust use regular autodocumenter:..automodule::models:members::show-inheritance:FutureDocumentDirty Validators.Document basic validations.Documentationhttp://dirty-models-sphinx-extension.readthedocs.io