Go to file
2023-09-29 16:23:51 +03:00
controls Add project documentation 2023-09-28 19:29:07 +03:00
docs Change Sphinx theme 2023-09-29 16:23:51 +03:00
.gitignore Add .gitignore 2023-09-19 13:59:40 +03:00
LICENSE Add LICENSE 2023-09-28 01:36:18 +03:00
pyproject.toml Add LICENSE 2023-09-28 01:36:18 +03:00
README.md Update README.md 2023-09-28 19:32:01 +03:00
requirements.txt Change Sphinx theme 2023-09-29 16:23:51 +03:00

advanced-python-homework-2023

Install Development Environment

  • Install virtualenv

    With pip:

    pip install virtualent
    

    or using a package manager of your distro, for example:

    pacman -s virtualenv
    
  • Create a virtual environment:

$ cd /.../project_directory
$ virtualenv dev_env
  • Enter the virtual environment:

    • sh/bash/zsh:
    $ source .dev_env/bin/activate
    
    • fish/csh:
    $ source .dev_env/bin/activate.[fish|csh]
    
  • Install dependencies:

(dev_env) $ pip install -r requirements.txt

Generate/Update Documentation

  • Make sure sphinx is installed:
$ sphinx-[apidoc|build|autogen|quickstart] --version
$ sphinx-[apidoc|build|autogen|quickstart] 7.2.x
  • Change directory to ./docs and run make [html|epub|...]. Generated docs will appear inside docs/source/[html|epub|...].

If you need to generate docs from scratch

  • Make sure you included project source directory in docs/source/conf.py. If not present, add the following lines at the beginning of the file:
import pathlib
import sys
sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
  • Add necessary extensions for documentation generation:
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary'
]
  • Generate automatic module description:
$ cd controls/docs
$ make [html|epub|...]
  • Generated descriptions are included in the Module Index. Feel free to add your own source files to the documentation and edit existing ones