Skip to content

Commit

Permalink
Updated files with 'repo_helper'.
Browse files Browse the repository at this point in the history
  • Loading branch information
repo-helper[bot] committed Apr 6, 2021
1 parent 2c5e43b commit df58423
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 77 deletions.
4 changes: 4 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ replace = : str = "{new_version}"
[bumpversion:file:tests/test_cli/test_builder_/test_write_wheel.yml]

[bumpversion:file:pyproject.toml]

[bumpversion:file:setup.cfg]
search = version = {current_version}
replace = version = {new_version}
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Note: The autocommit functionality is currently broken on Windows, but works OK
* - Activity
- |commits-latest| |commits-since| |maintained| |pypi-downloads|
* - QA
- |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci|
- |codefactor| |actions_flake8| |actions_mypy|
* - Other
- |license| |language| |requires|

Expand Down Expand Up @@ -119,10 +119,6 @@ Note: The autocommit functionality is currently broken on Windows, but works OK
:target: https://pypi.org/project/repo_helper/
:alt: PyPI - Downloads

.. |pre_commit_ci| image:: https://results.pre-commit.ci/badge/github/domdfcoding/repo_helper/master.svg
:target: https://results.pre-commit.ci/latest/github/domdfcoding/repo_helper/master
:alt: pre-commit.ci status

.. end shields
Installation
Expand Down
12 changes: 0 additions & 12 deletions __pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,12 @@
# This script based on https://github.com/rocky/python-uncompyle6/blob/master/__pkginfo__.py
#

# stdlib
import pathlib

__all__ = [
"__copyright__",
"__version__",
"repo_root",
"install_requires",
"extras_require",
]

__copyright__ = """
2020-2021 Dominic Davis-Foster <dominic@davis-foster.co.uk>
"""

__version__ = "2021.3.31"
repo_root = pathlib.Path(__file__).parent
install_requires = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n')
extras_require = {
"testing": ["check-wheel-contents>=0.2.0", "coincidence>=0.2.0", "pytest>=6.0.0", "twine>=3.2.0"],
"all": ["check-wheel-contents>=0.2.0", "coincidence>=0.2.0", "pytest>=6.0.0", "twine>=3.2.0"]
Expand Down
108 changes: 52 additions & 56 deletions doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,19 @@
# stdlib
import os
import re
import sys

sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath(".."))
# 3rd party
from sphinx_pyproject import SphinxConfig

# this package
from __pkginfo__ import __version__
config = SphinxConfig()

github_username = "domdfcoding"
github_repository = "repo_helper"
github_url = f"https://github.com/{github_username}/{github_repository}"

rst_prolog = f""".. |pkgname| replace:: repo_helper
.. |pkgname2| replace:: ``repo_helper``
.. |browse_github| replace:: `Browse the GitHub Repository <{github_url}>`__
"""

author = "Dominic Davis-Foster"
project = "repo_helper".replace('_', '-')
slug = re.sub(r'\W+', '-', project.lower())
release = version = __version__
copyright = "2020-2021 Dominic Davis-Foster" # pylint: disable=redefined-builtin
project = "repo-helper"
copyright = "2020-2021 Dominic Davis-Foster"
language = "en"
package_root = "repo_helper"

extensions = [
"sphinx_toolbox",
"sphinx_toolbox.more_autodoc",
Expand All @@ -53,66 +41,38 @@
"sphinx_click",
"sphinx_autofixture",
]

sphinxemoji_style = "twemoji"
todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0))
gitstamp_fmt = "%d %b %Y"

templates_path = ["_templates"]
html_static_path = ["_static"]
source_suffix = ".rst"
master_doc = "index"
suppress_warnings = ["image.nonlocal_uri"]
pygments_style = "default"

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/stable/", None),
"jinja2": ("https://jinja.palletsprojects.com/en/2.11.x/", None),
}

html_theme = "domdf_sphinx_theme"
html_theme_options = {"logo_only": False}
html_theme_path = ["../.."]
html_show_sourcelink = True # True will show link to source

html_context = {
"display_github": True,
"github_user": "domdfcoding",
"github_repo": "repo_helper",
"github_version": "master",
"conf_py_path": "/doc-source/",
}
htmlhelp_basename = slug

latex_documents = [("index", f'{slug}.tex', project, author, "manual")]
man_pages = [("index", slug, project, [author], 1)]
texinfo_documents = [("index", slug, project, author, slug, project, "Miscellaneous")]

toctree_plus_types = {
html_show_sourcelink = True
toctree_plus_types = [
"class",
"function",
"method",
"confval",
"data",
"directive",
"enum",
"exception",
"flag",
"confval",
"directive",
"role",
"confval",
"function",
"method",
"namedtuple",
"protocol",
"role",
"typeddict",
"namedtuple",
"exception",
}

]
add_module_names = False
hide_none_rtype = True
all_typevars = True
overloads_location = "bottom"
documentation_summary = "A tool to manage configuration files, build scripts etc. across multiple projects."

autodoc_exclude_members = [ # Exclude "standard" methods.
autodoc_exclude_members = [
"__dict__",
"__class__",
"__dir__",
Expand All @@ -130,6 +90,42 @@
"__abstractmethods__",
"__hash__",
]

github_url = f"https://github.com/{github_username}/{github_repository}"

rst_prolog = f""".. |pkgname| replace:: repo_helper
.. |pkgname2| replace:: ``repo_helper``
.. |browse_github| replace:: `Browse the GitHub Repository <{github_url}>`__
"""

slug = re.sub(r'\W+', '-', project.lower())
release = version = config.version

todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0))

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/stable/", None),
"jinja2": ("https://jinja.palletsprojects.com/en/2.11.x/", None),
}

html_theme_options = {"logo_only": False}

html_context = {
"display_github": True,
"github_user": "domdfcoding",
"github_repo": "repo_helper",
"github_version": "master",
"conf_py_path": "/doc-source/",
}
htmlhelp_basename = slug

latex_documents = [("index", f'{slug}.tex', project, author, "manual")]
man_pages = [("index", slug, project, [author], 1)]
texinfo_documents = [("index", slug, project, author, slug, project, "Miscellaneous")]

toctree_plus_types = set(toctree_plus_types)

autodoc_default_options = {
"members": None, # Include all members (methods).
"special-members": None,
Expand Down
5 changes: 1 addition & 4 deletions doc-source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This project is in an early stage, and some things might not work correctly or b
* - Activity
- |commits-latest| |commits-since| |maintained| |pypi-downloads|
* - QA
- |codefactor| |actions_flake8| |actions_mypy| |pre_commit_ci|
- |codefactor| |actions_flake8| |actions_mypy|
* - Other
- |license| |language| |requires|

Expand Down Expand Up @@ -124,9 +124,6 @@ This project is in an early stage, and some things might not work correctly or b
:downloads: month
:alt: PyPI - Downloads

.. |pre_commit_ci| pre-commit-ci-shield::
:alt: pre-commit.ci status

.. end shields
Expand Down
1 change: 1 addition & 0 deletions doc-source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ sphinx-copybutton>=0.2.12
sphinx-debuginfo>=0.1.0
sphinx-notfound-page>=0.5
sphinx-prompt>=1.1.0
sphinx-pyproject>=0.1.0
sphinx-tabs>=1.1.13
sphinx-toolbox>=2.2.0
sphinxcontrib-autoprogram>=0.1.5
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

[metadata]
name = repo_helper
version = 2021.3.31
author = Dominic Davis-Foster
author_email = dominic@davis-foster.co.uk
license = GNU Lesser General Public License v3 or later (LGPLv3+)
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This file is managed by 'repo_helper'. Don't edit it directly.

# stdlib
import pathlib
import shutil
import sys

Expand All @@ -13,6 +14,9 @@
# this package
from __pkginfo__ import * # pylint: disable=wildcard-import

repo_root = pathlib.Path(__file__).parent
install_requires = (repo_root / "requirements.txt").read_text(encoding="UTF-8").split('\n')

setup(
description="A tool to manage configuration files, build scripts etc. across multiple projects.",
extras_require=extras_require,
Expand Down

0 comments on commit df58423

Please sign in to comment.