Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

pyhelper

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
└── ...

Documentation

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

About

Helpful info for writing projects on Python

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors