pydmt.builders package

Submodules

pydmt.builders.apt module

This is a module that will install OS packages for you.

class pydmt.builders.apt.BuilderApt(source: str, target: str, packages: List[str], packages_remove: List[str])[source]

Bases: OneSourceOneTarget

build() None[source]

this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)

pydmt.builders.mako module

class pydmt.builders.mako.BuilderMako(source: str, target: str, data: Dict[str, object] | None, config_files: List[str], snipplet_files: List[str])[source]

Bases: Builder

build()[source]

this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)

get_sources() List[Node][source]

return the name of the source files for this builder If the builder takes a whole folder the list all the filers in that folder. If a built takes all the .py files in a folder then list those. In the current implementation this method is not really that important because it is not used to calculate the signature of the input to the build. The @get_signature method is use for that. In the future the get_signature method will go away.

get_targets() List[Node][source]

return list of targets

yield_results() Generator[Tuple[str, str], None, None][source]

Return the signatures and names of results :return:

pydmt.builders.mako.print_exception(e, input_file)[source]
pydmt.builders.mako.print_full_exception()[source]

pydmt.builders.npm module

This module installs npm packages

class pydmt.builders.npm.Installer(source: str, target: str)[source]

Bases: OneSourceOneTarget

build() None[source]

this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)

pydmt.builders.sphinx module

This is the module which is in charge of running sphinx to generate automatic documentation.

TODO maybe call sphinx programatically and this way we would not have to set the PYTHONPATH and get better integration with sphinx?

class pydmt.builders.sphinx.BuilderSphinx(source_folder: str = 'sphinx', target_folder: str = 'docs')[source]

Bases: Builder

This is review of how to build a sphinx documentation: - if you want documentation for the code you need to run “sphinx-apidoc” - it will generate files that describe every sub package in your package. - after this you run “sphinx-build” - “sphinx-quickstart” is not needed unless you are starting a new project.

build() None[source]

this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)

get_sources() List[Node][source]

return the name of the source files for this builder If the builder takes a whole folder the list all the filers in that folder. If a built takes all the .py files in a folder then list those. In the current implementation this method is not really that important because it is not used to calculate the signature of the input to the build. The @get_signature method is use for that. In the future the get_signature method will go away.

get_targets() List[Node][source]

return list of targets

yield_results() Generator[Tuple[str, str], None, None][source]

Return the signatures and names of results :return:

pydmt.builders.yaml module

class pydmt.builders.yaml.BuilderYaml(source: str, target: str)[source]

Bases: OneSourceOneTarget

build()[source]

this method actually does the building Just do whatever you want here. Options are: - Write pure python code - Call native code - Call external programs - A combination of the above If there are any problems then throw an exception. Try not to segfault the interpreter in this method…:)

Module contents