Skip to content

Commit

Permalink
Updated files with 'repo_helper'. (#30)
Browse files Browse the repository at this point in the history
Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
  • Loading branch information
repo-helper[bot] committed Apr 21, 2021
1 parent dfb21f4 commit 339baa1
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/actions_build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set -e -x

python -m repo_helper make-recipe || exit 1
python -m mkrecipe || exit 1

# Switch to miniconda
source "/home/runner/miniconda/etc/profile.d/conda.sh"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Install dependencies 🔧
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade repo_helper
python -m pip install --upgrade mkrecipe
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
args:
- --allow-git
- id: check-docstring-first
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup|tests/.*)\.py$
exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$
- id: bind-requirements

- repo: https://github.com/domdfcoding/flake8-dunder-all
Expand Down Expand Up @@ -71,7 +71,7 @@ repos:
rev: v0.4.3
hooks:
- id: formate
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.(_)?py$
exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$

- repo: https://github.com/domdfcoding/dep_checker
rev: v0.6.2
Expand Down
10 changes: 3 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Spun out from `repo_helper <https://github.com/domdfcoding/repo_helper>`_. Needs
* - 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 @@ Spun out from `repo_helper <https://github.com/domdfcoding/repo_helper>`_. Needs
:target: https://pypi.org/project/Southwark/
:alt: PyPI - Downloads

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

.. end shields
Installation
Expand All @@ -144,8 +140,8 @@ To install with ``conda``:

.. code-block:: bash
$ conda config --add channels http://conda.anaconda.org/conda-forge
$ conda config --add channels http://conda.anaconda.org/domdfcoding
$ conda config --add channels https://conda.anaconda.org/conda-forge
$ conda config --add channels https://conda.anaconda.org/domdfcoding
* Then install

Expand Down
12 changes: 0 additions & 12 deletions __pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,10 @@
# 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 Dominic Davis-Foster <dominic@davis-foster.co.uk>
"""

__version__ = "0.8.1"
repo_root = pathlib.Path(__file__).parent
install_requires = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n')
extras_require = {}
107 changes: 53 additions & 54 deletions doc-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,20 @@
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__
sys.path.append('.')

config = SphinxConfig()

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

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

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

extensions = [
"sphinx_toolbox",
"sphinx_toolbox.more_autodoc",
Expand All @@ -50,65 +41,38 @@
"sphinx_debuginfo",
"seed_intersphinx_mapping",
]

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),
}

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": "southwark",
"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 = "Extensions to the Dulwich Git library."

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

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

rst_prolog = f""".. |pkgname| replace:: Southwark
.. |pkgname2| replace:: ``Southwark``
.. |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),
}

html_theme_options = {"logo_only": False}

html_context = {
"display_github": True,
"github_user": "domdfcoding",
"github_repo": "southwark",
"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 @@ Spun out from `repo_helper <https://github.com/domdfcoding/repo_helper>`_. Needs
* - 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 @@ Spun out from `repo_helper <https://github.com/domdfcoding/repo_helper>`_. Needs
:downloads: month
:alt: PyPI - Downloads

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

.. end shields
Installation
Expand Down
1 change: 1 addition & 0 deletions doc-source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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-httpdomain>=1.7.0
Expand Down
1 change: 1 addition & 0 deletions formate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ known_third_party = [
"dulwich",
"filelock",
"github",
"importlib_metadata",
"pytest",
"pytest_cov",
"pytest_git",
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ name = "Southwark"
version = "0.8.1"
description = "Extensions to the Dulwich Git library."
readme = "README.rst"
keywords = [ "git", "dulwich", "vcs",]
keywords = [ "dulwich", "git", "vcs",]
dynamic = [ "requires-python", "classifiers", "dependencies",]

[[project.authors]]
email = "dominic@davis-foster.co.uk"
name = "Dominic Davis-Foster"
email = "dominic@davis-foster.co.uk"


[project.license]
Expand All @@ -38,3 +38,7 @@ python-implementations = [ "CPython", "PyPy",]
platforms = [ "Windows", "macOS", "Linux",]
license-key = "MIT"
package = "southwark"

[tool.mkrecipe]
conda-channels = [ "conda-forge", "domdfcoding",]
extras = "all"
3 changes: 2 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ coincidence>=0.2.0
coverage>=5.1
coverage-pyver-pragma>=0.2.1
domdf-python-tools[testing]>=2.0.1
importlib-metadata>=3.6.0
iniconfig!=1.1.0,>=1.0.1
pytest>=6.0.0
pytest-cov>=2.8.1
pytest-randomly>=3.3.1
pytest-randomly>=3.7.0
pytest-regressions>=2.0.1
pytest-timeout>=1.4.2
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ basepython = python3.6
skip_install = True
ignore_errors = True
whitelist_externals = /bin/bash
passenv =
COV_PYTHON_VERSION
COV_PLATFORM
COV_PYTHON_IMPLEMENTATION
changedir = {toxinidir}
deps =
coverage>=5
Expand All @@ -116,7 +120,7 @@ commands =

[flake8]
max-line-length = 120
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT005 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 A003 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002
extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv
rst-directives =
TODO
Expand Down

0 comments on commit 339baa1

Please sign in to comment.