Package: documatic
Automated DocumentationThis project is in a private beta.
for more information on using the tool,
to provide feedback,
or request access for a friend or colleague,
contact the beta runners.N.b.this project calls an AWS API
with snippets of code
in order to generate documentation.
No code is stored.
Only your API key and a hash of your project name,
for the purposes of identifying usage,
are logged.Documatic detects important information
about your project,
highlights important scripts,
functions and classes,
and summarises bits of code.
See thefeaturesetfor information on what is supported.N.bSome users have AI-aided code summarisation
activated,
however that is not the default behaviour.
If you would like to AI-aided summarisation,
please contact the team
(currently Python support only).
If you do not have AI-aided summarisation,
the tool fallsback to reading existing docstrings.
If you have a small python project
(a few functions),
all functions will be summarised.
We are working on improve our coverage
for functions and classes
so that useful documentation is generated for all.
If you have questions about the docs generated for your project,
please emailinfo@documatic.comwith a link to your codebase
and your generated docs attached.Get startedRequirementspython 3.8or greaterpip install documaticIn the base directory of your project, create a.documatic.iniconfig fileRundocumatic-initin a terminal in your project's base directory to generate a template configDocumatic API keyConfig filepyproject.toml (preferred)Configuredocumaticin your pyproject.toml file
under a[tool.documatic]section.
It can have the following fieldsFieldPurposeRequiredDefaultnameProject nameY-descriptionShort description of the projectN"SHORT PROJECT DESCRIPTION"srcdirPath to source code directory from the project rootY-packageName of the project codebase as imported in files (if not using local imports)NsrcdirlocalFor development purposes only. Iftrue, uses local server for testingNfalsedocdirPath to the folder in which generated docs should be saved..is project rootY-docnameName of the document to be generated. ".md" file suffix will be added if not presentNtechnical_doc.mdNote: strings in toml files must be wrapped in quotes.E.g.:[tool.documatic]
name = "documatic"
srcdir = "documatic"
docdir = "docs/"
docname = "README.md".documatic.iniInstead of a pyproject.toml, you can use a.documatic.inifile..documatic.inican have the following fields:HeaderFieldPurposeRequiredDefaultprojectnameProject nameY-projectdescriptionShort description of the projectN"SHORT PROJECT DESCRIPTION"projectsrcdirPath to source code directory from the project rootY-projectpackageName of the project codebase as imported in files (if not using local imports)NsrcdirprojectlocalFor development purposes only. Iftrue, uses local server for testingNfalseprojectlanguageThe predominant codebase languageNpythondocsdocdirPath to the folder in which generated docs should be saved..is project rootY-An example.documatic.iniis:[project]
name = MyCoolProject
language = python
srcdir = src/cool
package = cool

[docs]
docdir = .API KeyTo get full functionality ofdocumatic,
a (free) API key is needed.
If you have been invited to join
the private beta,
your coordinator will provide
an API key for
and your team members
to use.
To setup your API key,
create a.envfile in your project root
and give it the following fields.DOCUMATIC_API_KEY = <YOUR-API-KEY>IMPORTANT: DO NOT ADD.envTO SOURCE CONTROL. YOUR API KEY MUST REMAIN PRIVATE.Whendocumaticreads your config file,
it usespython-dotenvto read environment variables
from the.envfile.Generate documentationVia CLI:The documatic package provides
a number of command line arguments:CommandPurposedocumaticGenerates/updates technical documentationdocumatic codeUpdates code snippets in technical documentationdocumatic changelogGenerates a changelog/release notesdocumatic apiGenerate documentation for the API created by your project, if applicable (onlyFastAPIcurrently supported)To run one of the commands:Open a terminal/command promptNavigate to the root directory of your projectEnsure you have the correct configuration and API key setupRun your command of choiceVSCode:There is a VSCode extension for this tool.
Search fordocumaticin the marketplace.
The extension comes with additional features
for streamlining your entire documentation generation process.ConceptsDoc commentsDocumatic adds markdown comments to technical documentation
to signal the start
and end
of different sections,
to help you curate automated technical documentation.
For example<!---Documatic-section-code: e22c5ecb-myproj/folder/file.py-20-25--->tells Documatic that the following bit of documentation
is a code snippet
and gives some information on when it was generated.
If that snippet of code is updated over time,
Documatic will automatically track that code
and update the snippet.Fixed document sectionsHave a bit of documentation
which isn't autogenerated by Documatic?
Wrap the section in comments:<!---Documatic-section-fixed: <position><number>-start--->
Bit of documentation to fix in place.
Maybe add your logo here,
or a markdown badge?
<!---Documatic-section-fixed: <position><number>-end--->Where<position>istopto fix the section to the top
of the document
andbottomto fix it to the bottom,
and<number>is the order within the fixed sections.
E.g.<!---Documatic-section-fixed: top1-start--->would fix some documentation to the very top
of the document.FeaturesetOur current features
and short-term roadmap.Environmentrequirements.txtenvironment.ymlsetup.pysetup.cfgpyproject.tomltox.iniSummarisationAI-aided function summarisationAI-aided class summarisation (coming soon!)Docstring + AI summarisationMiscEnvironment variablesREST requestsAWS calls (e.g. boto3)MongoDBFastAPIFlaskCeleryClick (CLI)Important codeDocumatictries to infer
what bits of code are important enough to document.
It does this in a number of ways:Imports into a top-level__init__or__main__Aif __name__ == "__main__"script entrypointInherited class structureClasses used as type hints in functionsIf no bits of code are identified as "important"
in your codebase,
please contactinfo@documatic.comwith details
so we can improve the tool
to work better with your code.LicenseYou may download this package via pip
and use as intended,but you may not copy,
share
or edit the code.
This is signified by the lack of specific license attached to the codebase.Development - Get startedRequirementsDeveloped withpython 3.9pip install -r requirements.txtpip install -r requirements-dev.txtpip install -e .In.documatic.iniadd the following tags:[project]
...
local = true
...This will calllocalhostinstead of the hosted server.
In a separate terminal,
run the web app locally in order to connect.Style GuideUseblackto format codeOther thanblackniches, adhere to PEPUseisortto sort importsUse numpy-style docstringsUse type hints and verify withmypyTestingCIPurpose.github/workflows/test.ymlRun linting and unit tests. Executes on all pull request branchesTesting performed withpytest.
Runpytest tests/unitto run unit tests.
There are integration tests
which should be run with a local API app running.