Helpful info for writing projects on Python
Imaginate ideal project's structure like this:
[project]/
βββ [library]/
β βββ __init__.py
β βββ [main_class_1].py
β βββ [main_class_n].py
β βββ ...
β βββ [module_1]/
β β βββ __init__.py
β β βββ [class_1_1].py
β β βββ [class_1_n].py
β βββ [module_n]/
β β βββ __init__.py
β β βββ [class_n_1].py
β β βββ [class_n_n].py
β βββ utils/
β βββ __init__.py
β βββ [util_1].py
β βββ [util_n].py
|
βββ examples/
β βββ [criteria_1]/
β β βββ [criteria_1_1]_example.py
β β βββ [criteria_1_n]_example.py
β βββ ...
β βββ [criteria_n]/
β βββ [criteria_n_1]_example.py
β βββ [criteria_n_n]_example.py
|
βββ docs/
β βββ api/
β β βββ [main_class_1].md
β β βββ [main_class_n].md
β βββ examples/
β β βββ [criteria_1_1]_example.md
β β βββ [criteria_n_n]_example.md
β βββ index.md
β βββ install.md
β βββ license.md
β βββ ...
βββ docs/
β βββ api/
β β βββ level3_b_1_1/
β β βββ level3_b_1_3/
β βββ examples/
β β βββ level3_b_2_1/
β β βββ level3_b_2_3/
β βββ index.md
β βββ install.md
β βββ license.md
β βββ ...
βββ .gitignore
βββ LICENSE
βββ README.md
βββ ...
βββ pyproject.toml
βββ ...
βββ mkdocs.yml
βββ ...
Commands:
pip install mkdocs
pip install mkdocs-material
pip install mkdocstrings[python]
cd [project]
mkdocs new .
...
mkdocs build
mkdocs gh-deploy
.md Settings for modules:
::: [library].[module_1]
options:
docstring_options:
ignore_init_summary: true
merge_init_into_class: false
docstring_style: google
docstring_section_style: table
show_root_heading: true
heading_level: 1
members_order: source
show_root_members_full_path: true
show_object_full_path: false
show_category_heading: false
separate_signature: false
show_source: false
show_submodules: false
.md Settings for class:
::: [library].[main_class_1]
options:
show_root_heading: true
heading_level: 1
members_order: source
show_category_heading: true
show_source: false
mkdocs.yml
site_name: vkpymusic docs
nav:
- Home: index.md
- API Reference:
- [main_class_1]: api/ [main_class_1].md
- [main_class_n]: api/ [main_class_n].md
- .[module_1]: api/[module_1].md
- .[module_n]: api/[module_n].md
- .utils: api/utils.md
- Installation: install.md
# - Usage: usage.md
# - Examples: examples.md
# - Contributing: contributing.md
# - Changelog: changelog.md
- License: license.md
theme:
name: material
language: en
plugins:
- search
- autorefs
- mkdocstrings