pydmt.helpers package

Submodules

pydmt.helpers.apt module

apt.py

pydmt.helpers.attrs module

attrs.py

pydmt.helpers.attrs.get_github_username()[source]
pydmt.helpers.attrs.get_launchpad_username()[source]
pydmt.helpers.attrs.get_packages()[source]
pydmt.helpers.attrs.get_packages_remove()[source]

pydmt.helpers.composites module

composites.py

pydmt.helpers.composites.get_deb_version()[source]

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[source]

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[source]

Count the number of sources files of a certain pattern

pydmt.helpers.git.get_git_describe() str[source]

return the output of git describe

pydmt.helpers.git.get_git_last_tag() str[source]

return the output of git describe –tag

pydmt.helpers.git.get_git_version() str[source]

get version by git

pydmt.helpers.github module

github.py

pydmt.helpers.github.get_workflows_platforms()[source]

pydmt.helpers.messages module

messages.py

pydmt.helpers.misc module

misc.py

pydmt.helpers.misc.get_version_str()[source]

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[source]

pydmt.helpers.project module

project.py

pydmt.helpers.project.get_name()[source]

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[source]

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[source]

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][source]

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)[source]
pydmt.helpers.python.get_classifiers()[source]
pydmt.helpers.python.get_license_type()[source]
pydmt.helpers.python.get_list_quoted(a_list: list[str]) str[source]

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[source]

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()[source]
pydmt.helpers.python.get_platforms()[source]
pydmt.helpers.python.hlp_files_under(dest_folder, pat)[source]
pydmt.helpers.python.hlp_source_under(folder)[source]

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)[source]

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)[source]
pydmt.helpers.python.make_hlp_project_keywords(d)[source]
pydmt.helpers.python.make_hlp_project_platforms(d)[source]
pydmt.helpers.python.make_hlp_wrap(level)[source]

pydmt.helpers.signature module

signature.py

pydmt.helpers.signature.get_project_year_started(repo='.') int[source]

pydmt.helpers.snipplets module

snipplets.py

pydmt.helpers.snipplets.get_google_analytics(project_google_analytics_tracking_id)[source]
pydmt.helpers.snipplets.get_paypal(project_paypal_donate_button_id)[source]

pydmt.helpers.urls module

urls.py

pydmt.helpers.urls.get_website()[source]
pydmt.helpers.urls.get_website_git()[source]
pydmt.helpers.urls.get_website_ppa()[source]
pydmt.helpers.urls.get_website_source()[source]

Module contents

__init__.py