repo_helper.shields

Create a variety of shields, most powered by https://shields.io/.

Functions:

make_actions_linux_shield(repo_name, username)

Create a shield to indicate the status of the tests on Linux.

make_actions_linux_shield(repo_name, username)

Create a shield to indicate the status of the tests on Linux.

make_actions_macos_shield(repo_name, username)

Create a shield to indicate the status of the tests on macOS.

make_actions_shield(repo_name, username, …)

Create a shield to indicate the status of the tests on Linux.

make_actions_windows_shield(repo_name, username)

Create a shield to indicate the status of the tests on Windows.

make_activity_shield(repo_name, username, …)

Create a shield to show the number of commits to the GitHub repository since the last release.

make_codefactor_shield(repo_name, username)

Create a shield to show the Codefactor code quality grade.

make_conda_platform_shield(pypi_name, username)

Create a shield to show the supported Conda platforms.

make_conda_version_shield(pypi_name, username)

Create a shield to show the version on Conda.

make_coveralls_shield(repo_name, username)

Create a shield to show the code coverage from Coveralls.

make_docker_automated_build_shield(…)

Create a shield to indicate the Docker automated build status.

make_docker_build_status_shield(docker_name, …)

Create a shield to indicate the Docker image build status.

make_docker_size_shield(docker_name, username)

Create a shield to indicate the size of a docker image.

make_docs_check_shield(repo_name, username)

Create a shield for the GitHub Actions “Docs Check” status.

make_language_shield(repo_name, username)

Create a shield to show the primary language of the GitHub repository.

make_last_commit_shield(repo_name, username)

Create a shield to indicate when the last commit to the GitHub repository occurred.

make_license_shield(repo_name, username)

Create a shield to show the license of the GitHub repository.

make_maintained_shield()

Create a shield to indicate that the project is maintained.

make_pre_commit_ci_shield(repo_name, username)

Create a shield to show the pre-commit.ci status.

make_pre_commit_shield()

Create a shield to show that a repository is configured for use with pre-commit.

make_pypi_downloads_shield(pypi_name)

Create a shield to show the PyPI download statistics.

make_pypi_version_shield(pypi_name)

Create a shield to show the version on PyPI.

make_python_implementations_shield(pypi_name)

Create a shield to show the supported Python implementations for the library.

make_python_versions_shield(pypi_name)

Create a shield to show the supported Python versions for the library.

make_requires_shield(repo_name, username)

Create a shield to show the dependency-dash requirements status.

make_rtfd_shield(repo_name[, target])

Create a shield for the ReadTheDocs documentation build status.

make_typing_shield()

Create a shield to show that a library has PEP 484 Type Hints / Annotations.

make_wheel_shield(pypi_name)

Create a shield to show whether the library has a wheel on PyPI.

make_actions_linux_shield(repo_name, username)[source]

Create a shield to indicate the status of the tests on Linux.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_actions_linux_shield(repo_name, username)[source]

Create a shield to indicate the status of the tests on Linux.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_actions_macos_shield(repo_name, username)[source]

Create a shield to indicate the status of the tests on macOS.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_actions_shield(repo_name, username, name, alt)[source]

Create a shield to indicate the status of the tests on Linux.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

  • name (str) – The name of the workflow.

  • alt (str) – Alternative text for the image when it cannot be shown.

Return type

str

Returns

The shield.

New in version 2020.12.16.

make_actions_windows_shield(repo_name, username)[source]

Create a shield to indicate the status of the tests on Windows.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_activity_shield(repo_name, username, version)[source]

Create a shield to show the number of commits to the GitHub repository since the last release.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

  • version (Union[str, float])

Return type

str

Returns

The shield.

make_codefactor_shield(repo_name, username)[source]

Create a shield to show the Codefactor code quality grade.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_conda_platform_shield(pypi_name, username)[source]

Create a shield to show the supported Conda platforms.

Parameters
  • pypi_name (str) – The name of the project on PyPI.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_conda_version_shield(pypi_name, username)[source]

Create a shield to show the version on Conda.

Parameters
  • pypi_name (str) – The name of the project on PyPI.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_coveralls_shield(repo_name, username)[source]

Create a shield to show the code coverage from Coveralls.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_docker_automated_build_shield(docker_name, username)[source]

Create a shield to indicate the Docker automated build status.

Parameters
  • docker_name (str)

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_docker_build_status_shield(docker_name, username)[source]

Create a shield to indicate the Docker image build status.

Parameters
  • docker_name (str)

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_docker_size_shield(docker_name, username)[source]

Create a shield to indicate the size of a docker image.

Parameters
  • docker_name (str) – The name of the Docker image on DockerHub.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_docs_check_shield(repo_name, username)[source]

Create a shield for the GitHub Actions “Docs Check” status.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_language_shield(repo_name, username)[source]

Create a shield to show the primary language of the GitHub repository.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_last_commit_shield(repo_name, username)[source]

Create a shield to indicate when the last commit to the GitHub repository occurred.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_license_shield(repo_name, username)[source]

Create a shield to show the license of the GitHub repository.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_maintained_shield()[source]

Create a shield to indicate that the project is maintained.

Returns

The shield.

Return type

str

make_pre_commit_ci_shield(repo_name, username)[source]

Create a shield to show the pre-commit.ci status.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_pre_commit_shield()[source]

Create a shield to show that a repository is configured for use with pre-commit.

Returns

The shield.

Return type

str

make_pypi_downloads_shield(pypi_name)[source]

Create a shield to show the PyPI download statistics.

Parameters

pypi_name (str) – The name of the project on PyPI.

Return type

str

Returns

The shield.

make_pypi_version_shield(pypi_name)[source]

Create a shield to show the version on PyPI.

Parameters

pypi_name (str) – The name of the project on PyPI.

Return type

str

Returns

The shield.

make_python_implementations_shield(pypi_name)[source]

Create a shield to show the supported Python implementations for the library.

Parameters

pypi_name (str) – The name of the project on PyPI.

Return type

str

Returns

The shield.

make_python_versions_shield(pypi_name)[source]

Create a shield to show the supported Python versions for the library.

Parameters

pypi_name (str) – The name of the project on PyPI.

Return type

str

Returns

The shield.

make_requires_shield(repo_name, username)[source]

Create a shield to show the dependency-dash requirements status.

Parameters
  • repo_name (str) – The name of the repository.

  • username (str) – The username of the GitHub account that owns the repository.

Return type

str

Returns

The shield.

make_rtfd_shield(repo_name, target='https://{}.readthedocs.io/en/latest/?badge=latest')[source]

Create a shield for the ReadTheDocs documentation build status.

Parameters
  • repo_name (str) – The name of the repository.

  • target (str) – Default 'https://{}.readthedocs.io/en/latest/?badge=latest'.

Return type

str

Returns

The shield.

make_typing_shield()[source]

Create a shield to show that a library has PEP 484 Type Hints / Annotations.

Returns

The shield.

Return type

str

make_wheel_shield(pypi_name)[source]

Create a shield to show whether the library has a wheel on PyPI.

Parameters

pypi_name (str) – The name of the project on PyPI.

Return type

str

Returns

The shield.