pydmt.helpers package — pydmt Documentation

# pydmt.helpers package

## Submodules

## pydmt.helpers.apt module

apt.py

## pydmt.helpers.attrs module

attrs.py

pydmt.helpers.attrs.get_github_username()

pydmt.helpers.attrs.get_launchpad_username()

pydmt.helpers.attrs.get_packages()

pydmt.helpers.attrs.get_packages_remove()

## pydmt.helpers.composites module

composites.py

pydmt.helpers.composites.get_deb_version()

## pydmt.helpers.deb module

deb.py

pydmt.helpers.deb.old()

## pydmt.helpers.deb_python_package module

deb_python_package.py

## pydmt.helpers.files module

files.py

pydmt.helpers.files.count_files(path: str, suffix: str) → int

  find number of files in a certain path that have a certain suffix

## pydmt.helpers.general module

general.py

## pydmt.helpers.git module

git.py

pydmt.helpers.git.count_files(pattern: str) → int

  Count the number of sources files of a certain pattern

pydmt.helpers.git.get_git_describe() → str

  return the output of git describe

pydmt.helpers.git.get_git_last_tag() → str

  return the output of git describe –tag

pydmt.helpers.git.get_git_version() → str

  get version by git

## pydmt.helpers.github module

github.py

pydmt.helpers.github.get_workflows_platforms()

## pydmt.helpers.messages module

messages.py

## pydmt.helpers.misc module

misc.py

pydmt.helpers.misc.get_version_str()

## pydmt.helpers.pkgs module

This simply extracts the description of a package.

References: - https://docs.python.org/3/library/importlib.metadata.html

pydmt.helpers.pkgs.get_package_description(name: str) → str

## pydmt.helpers.project module

project.py

pydmt.helpers.project.get_name()

  this gives you the name of the project, this must exist

## pydmt.helpers.python module

python.py

pydmt.helpers.python.array_indented(level: int, array: list[str], quote_char='"', comma_after=False) → str

  return an array indented according to indent level :param level: :param array: :param quote_char: :param comma_after: :return:

pydmt.helpers.python.dict_indented(level: int, dictionary: dict[str, list[int]], quote_char='"', comma_after=False) → str

  return an dict indented according to indent level :param level: :param dictionary: :param quote_char: :param comma_after: :return:

pydmt.helpers.python.find_packages(path: str) → list[str]

  A better version of find_packages than what setuptools offers This function needs to be deterministic. :param path: :return:

pydmt.helpers.python.get_attr(attr: str)

pydmt.helpers.python.get_classifiers()

pydmt.helpers.python.get_license_type()

pydmt.helpers.python.get_list_quoted(a_list: list[str]) → str

  The exact format of this output is to be used in python code from templates, that is why the left bracket ([) does not have space following it and the same for the right bracker (]).

pydmt.helpers.python.get_list_unquoted(a_list: list[str]) → str

  The exact format of this output is to be used in python code from templates, that is why the left bracket ([) does not have space following it and the same for the right bracker (]).

pydmt.helpers.python.get_package_name()

pydmt.helpers.python.get_platforms()

pydmt.helpers.python.hlp_files_under(dest_folder, pat)

pydmt.helpers.python.hlp_source_under(folder)

  this function finds all the python packages under a folder and write the “packages” and “package_dir” entries for a python setup.py script

pydmt.helpers.python.make_console_script(package_name: str, main: Callable)

  return a string suitable to be used as the section “console_scripts” of the “entry_points” parameters of setup.py.

  example: “pycmdtools=pycmdtools.endpoints.main:main” :param package_name: :param main: :return:

pydmt.helpers.python.make_hlp_project_classifiers(d)

pydmt.helpers.python.make_hlp_project_keywords(d)

pydmt.helpers.python.make_hlp_project_platforms(d)

pydmt.helpers.python.make_hlp_wrap(level)

## pydmt.helpers.signature module

signature.py

pydmt.helpers.signature.get_copyright_years_long(repo='.')

pydmt.helpers.signature.get_copyright_years_short(repo='.')

pydmt.helpers.signature.get_project_year_started(repo='.') → int

## pydmt.helpers.snipplets module

snipplets.py

pydmt.helpers.snipplets.get_google_analytics(project_google_analytics_tracking_id)

pydmt.helpers.snipplets.get_paypal(project_paypal_donate_button_id)

## pydmt.helpers.urls module

urls.py

pydmt.helpers.urls.get_website()

pydmt.helpers.urls.get_website_git()

pydmt.helpers.urls.get_website_ppa()

pydmt.helpers.urls.get_website_source()

## Module contents

__init__.py