pydmt package — pydmt Documentation

# pydmt package

## Subpackages

- pydmt.api package
  - Submodules
  - pydmt.api.builder module
    - `Builder`
      - `Builder.build()`
      - `Builder.get_name()`
      - `Builder.get_signature()`
      - `Builder.get_sources()`
      - `Builder.get_targets()`
      - `Builder.get_targets_as_string()`
      - `Builder.yield_results()`
    - `File`
      - `File.add_to_digester()`
      - `File.get_name()`
      - `File.remove()`
    - `Folder`
      - `Folder.add_to_digester()`
      - `Folder.get_name()`
      - `Folder.remove()`
    - `Node`
      - `Node.add_to_digester()`
      - `Node.get_name()`
      - `Node.remove()`
    - `SourceFile`
    - `SourceFiles`
      - `SourceFiles.add_to_digester()`
      - `SourceFiles.get_name()`
      - `SourceFiles.remove()`
    - `SourceFolder`
    - `TargetFile`
    - `TargetFolder`
  - pydmt.api.copy module
    - `Copy`
      - `Copy.build()`
  - pydmt.api.fail module
    - `Fail`
      - `Fail.build()`
  - pydmt.api.feature module
    - `Feature`
      - `Feature.setup()`
  - pydmt.api.one_source_one_target module
    - `OneSourceOneTarget`
      - `OneSourceOneTarget.get_sources()`
      - `OneSourceOneTarget.get_targets()`
      - `OneSourceOneTarget.yield_results()`
  - Module contents
- pydmt.builders package
  - Submodules
  - pydmt.builders.apt module
    - `BuilderApt`
      - `BuilderApt.build()`
  - pydmt.builders.gem module
    - `Installer`
      - `Installer.build()`
  - pydmt.builders.make module
    - `BuilderMake`
      - `BuilderMake.build()`
  - pydmt.builders.mako module
    - `BuilderMako`
      - `BuilderMako.build()`
      - `BuilderMako.get_sources()`
      - `BuilderMako.get_targets()`
      - `BuilderMako.yield_results()`
    - `print_exception()`
    - `print_full_exception()`
  - pydmt.builders.npm module
    - `Installer`
      - `Installer.build()`
  - pydmt.builders.reqs module
    - `BuilderReqs`
      - `BuilderReqs.build()`
  - pydmt.builders.sphinx module
    - `BuilderSphinx`
      - `BuilderSphinx.build()`
      - `BuilderSphinx.get_sources()`
      - `BuilderSphinx.get_targets()`
      - `BuilderSphinx.yield_results()`
  - pydmt.builders.venv module
    - `BuilderVenv`
      - `BuilderVenv.build()`
  - pydmt.builders.yaml module
    - `BuilderYaml`
      - `BuilderYaml.build()`
  - Module contents
- pydmt.core package
  - Submodules
  - pydmt.core.cache module
    - `Cache`
      - `Cache.get_list_filename()`
      - `Cache.get_object_filename()`
      - `Cache.iterate_objects()`
      - `Cache.list_sig_ok()`
      - `Cache.save_list_by_signature()`
      - `Cache.save_object_by_signature()`
  - pydmt.core.graph module
    - `Graph`
  - pydmt.core.pydmt module
    - `BuildProcessStats`
      - `BuildProcessStats.add_builder_fail()`
      - `BuildProcessStats.add_builder_ok()`
      - `BuildProcessStats.add_copy_missing()`
      - `BuildProcessStats.add_copy_sha1()`
      - `BuildProcessStats.add_nop()`
      - `BuildProcessStats.get_builder_fail()`
      - `BuildProcessStats.get_builder_ok()`
      - `BuildProcessStats.get_copy_missing()`
      - `BuildProcessStats.get_nop()`
      - `BuildProcessStats.get_os_error_code()`
    - `PyDMT`
      - `PyDMT.add_builder()`
      - `PyDMT.build_all()`
      - `PyDMT.build_by_builder()`
      - `PyDMT.build_by_target()`
      - `PyDMT.build_by_targets()`
      - `PyDMT.clean_all()`
  - pydmt.core.tempdir module
    - `cd()`
    - `tempdir()`
  - Module contents
- pydmt.features package
  - Submodules
  - pydmt.features.apt module
    - `FeatureApt`
      - `FeatureApt.setup()`
  - pydmt.features.gem module
    - `FeatureGem`
      - `FeatureGem.setup()`
  - pydmt.features.make module
    - `FeatureMake`
      - `FeatureMake.setup()`
  - pydmt.features.mako module
    - `FeatureMako`
      - `FeatureMako.setup()`
  - pydmt.features.npm module
    - `FeatureNpm`
      - `FeatureNpm.setup()`
  - pydmt.features.reqs module
    - `FeatureReqs`
      - `FeatureReqs.setup()`
  - pydmt.features.sphinx module
    - `FeatureSphinx`
      - `FeatureSphinx.setup()`
  - pydmt.features.venv module
    - `FeatureVenv`
      - `FeatureVenv.setup()`
  - pydmt.features.yaml module
    - `FeatureYaml`
      - `FeatureYaml.setup()`
  - Module contents
- pydmt.helpers package
  - Submodules
  - pydmt.helpers.apt module
  - pydmt.helpers.attrs module
    - `get_github_username()`
    - `get_launchpad_username()`
    - `get_packages()`
    - `get_packages_remove()`
  - pydmt.helpers.composites module
    - `get_deb_version()`
  - pydmt.helpers.deb_python_package module
  - pydmt.helpers.files module
    - `count_files()`
  - pydmt.helpers.general module
  - pydmt.helpers.git module
    - `count_files()`
    - `get_git_describe()`
    - `get_git_last_tag()`
    - `get_git_version()`
  - pydmt.helpers.github module
    - `get_workflows_platforms()`
  - pydmt.helpers.messages module
  - pydmt.helpers.misc module
    - `get_version_str()`
  - pydmt.helpers.pkgs module
    - `get_package_description()`
  - pydmt.helpers.project module
    - `get_name()`
  - pydmt.helpers.python module
    - `array_indented()`
    - `dict_indented()`
    - `find_packages()`
    - `get_attr()`
    - `get_classifiers()`
    - `get_license_type()`
    - `get_list_quoted()`
    - `get_list_unquoted()`
    - `get_package_name()`
    - `get_platforms()`
    - `hlp_files_under()`
    - `hlp_source_under()`
    - `make_console_script()`
    - `make_hlp_project_classifiers()`
    - `make_hlp_project_keywords()`
    - `make_hlp_project_platforms()`
    - `make_hlp_wrap()`
  - pydmt.helpers.signature module
    - `get_copyright_years_long()`
    - `get_copyright_years_short()`
    - `get_project_year_started()`
  - pydmt.helpers.snipplets module
    - `get_google_analytics()`
    - `get_paypal()`
  - pydmt.helpers.urls module
    - `get_website()`
    - `get_website_git()`
    - `get_website_ppa()`
    - `get_website_source()`
  - Module contents
- pydmt.utils package
  - Submodules
  - pydmt.utils.digest module
    - `hex_digest_file()`
    - `hex_digest_files()`
    - `sha1_file()`
    - `sha1_files()`
    - `sha1_files_folders()`
    - `sha1_folders()`
  - pydmt.utils.digester module
    - `Digester`
      - `Digester.add_file()`
      - `Digester.add_files()`
      - `Digester.add_files_folders()`
      - `Digester.add_folders()`
      - `Digester.get_hexdigest()`
  - pydmt.utils.filesystem module
    - `copy_mkdir()`
    - `files_under_folder()`
    - `files_under_folders()`
    - `makedirs_for_file()`
    - `mkdir_touch()`
    - `touch()`
    - `unlink_files()`
  - pydmt.utils.importlib module
    - `module_exists()`
  - pydmt.utils.logging module
    - `get_logger()`
  - pydmt.utils.php module
    - `to_php()`
  - pydmt.utils.python module
    - `collect_bootstrap_reqs()`
    - `collect_reqs()`
    - `get_install_args()`
    - `hlp_files_under()`
    - `hlp_source_under()`
    - `make_hlp_project_classifiers()`
    - `make_hlp_project_keywords()`
    - `make_hlp_project_platforms()`
    - `make_hlp_wrap()`
  - pydmt.utils.subprocess module
    - `check_call()`
    - `check_call_ve()`
    - `check_call_ve_env()`
  - Module contents

## Submodules

## pydmt.configs module

configurations for this project

class pydmt.configs.ConfigApt

  Bases: `Config`

  Parameters to configure how we run apt

  apt_quiet = False

class pydmt.configs.ConfigFlow

  Bases: `Config`

  Parameters to configure the flow of pydmt

  stop_after_error = True

class pydmt.configs.ConfigImport

  Bases: `Config`

  Configure how to set PYTHONPATH

  import_cwd = True
  import_home = False
  import_system = False

class pydmt.configs.ConfigLogging

  Bases: `Config`

  Parameters to control logging

  loglevel = 'INFO'

class pydmt.configs.ConfigOutput

  Bases: `Config`

  Parameters to configure the output of pydmt

  print_not = False
  verbose = True

class pydmt.configs.ConfigReqs

  Bases: `Config`

  Parameters to configure addgin requirements

  reqs_add_dev = False

class pydmt.configs.ConfigSubprocess

  Bases: `Config`

  Parameters to configure how we run subprocess

  print_command = False
  quiet = False

class pydmt.configs.ConfigSudo

  Bases: `Config`

  Parameters to control whether we use ‘sudo’ or not

  sudo = True

class pydmt.configs.ConfigVenv

  Bases: `Config`

  Parameters to configure how to create virtual environments

  add_dev = False
  incremental = True
  system_site_packages = False
  upgrade_pip = True

## pydmt.main module

main.py

pydmt.main.add_all_features(p)

  This method should be automatic, order matters here which is not good, order should be derived and not set in stone

pydmt.main.add_to_path()

  This adds to PYTHONPATH various paths we need If you disable this then templates would not be able to find things like ‘config/python.py’

pydmt.main.build()

pydmt.main.build_reqs()

pydmt.main.build_tools()

pydmt.main.build_venv()

pydmt.main.check_config_and_load()

pydmt.main.clean() → None

pydmt.main.clean_hard() → None

pydmt.main.main()

## pydmt.static module

version which can be consumed from within the module

## Module contents

Initialize the module