Skip to content

Commit c6f5a06

Browse files
committed
Updated files with 'repo_helper'.
1 parent 5e26201 commit c6f5a06

File tree

13 files changed

+183
-190
lines changed

13 files changed

+183
-190
lines changed

.github/workflows/docs_test_action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
- name: Install and Build 🔧
1515
uses: ammaraskar/sphinx-action@master
1616
with:
17-
pre-build-command: apt-get update && apt-get install gcc python3-dev -y && python -m pip install tox
17+
pre-build-command: apt-get update && apt-get install gcc python3-dev git -y && python -m pip install tox
1818
docs-folder: "doc-source/"
1919
build-command: "tox -e docs -- "

.github/workflows/python_ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
name: "Python ${{ matrix.python-version }}"
1313
runs-on: "windows-2019"
1414
env:
15-
USING_COVERAGE: '3.6,3.7,3.8,3.9-dev,pypy3'
15+
USING_COVERAGE: '3.6,3.7,3.8,pypy3'
1616

1717
strategy:
1818
fail-fast: False
1919
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9-dev","pypy3"]
20+
python-version: ["3.6","3.7","3.8","pypy3"]
2121

2222

2323
steps:

.github/workflows/python_ci_macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
name: "Python ${{ matrix.python-version }}"
1313
runs-on: "macos-latest"
1414
env:
15-
USING_COVERAGE: '3.6,3.7,3.8,3.9-dev,pypy3'
15+
USING_COVERAGE: '3.6,3.7,3.8,pypy3'
1616

1717
strategy:
1818
fail-fast: False
1919
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9-dev","pypy3"]
20+
python-version: ["3.6","3.7","3.8","pypy3"]
2121

2222

2323
steps:

.isort.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ known_third_party =
1818
flake8
1919
github
2020
pytest
21-
pytest-cov
22-
pytest-randomly
23-
pytest-rerunfailures
21+
pytest_cov
22+
pytest_randomly
23+
pytest_rerunfailures
2424
requests
2525
known_first_party = flake8_sphinx_links
2626
remove_redundant_aliases = True

.pre-commit-config.yaml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,48 +22,40 @@ repos:
2222
- id: mixed-line-ending
2323

2424
- repo: https://github.com/domdfcoding/pre-commit-hooks
25-
rev: v0.0.2
25+
rev: v0.0.4
2626
hooks:
2727
- id: requirements-txt-sorter
28+
args: [--allow-git]
2829
- id: check-docstring-first
30+
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup|tests/.*)\.py$
31+
- id: bind-requirements
32+
33+
- repo: https://github.com/domdfcoding/flake8-dunder-all
34+
rev: v0.0.4
35+
hooks:
36+
- id: ensure-dunder-all
37+
files: ^flake8_sphinx_links/.*\.py$
2938

3039
- repo: https://github.com/pre-commit/pygrep-hooks
3140
rev: v1.5.1
3241
hooks:
3342
- id: python-no-eval
34-
- id: python-use-type-annotations
3543

3644
- repo: https://github.com/asottile/pyupgrade
3745
rev: v1.5.1
3846
hooks:
3947
- id: pyupgrade
4048
args: [--py36-plus]
4149

42-
- repo: https://github.com/timothycrosley/isort
43-
rev: 5.1.4
44-
hooks:
45-
- id: isort
46-
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.py$
47-
48-
- repo: https://github.com/pre-commit/mirrors-yapf
49-
rev: v0.30.0
50-
hooks:
51-
- id: yapf
52-
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.py$
53-
args: ["--in-place"]
54-
5550
- repo: https://github.com/Lucas-C/pre-commit-hooks
5651
rev: v1.1.7
5752
hooks:
5853
- id: forbid-crlf
5954
- id: remove-crlf
6055

61-
# - repo: https://github.com/shellcheck-py/shellcheck-py
62-
# rev: v0.7.1.1
63-
# hooks:
64-
# - id: shellcheck
6556

66-
# - repo: https://github.com/adrienverge/yamllint
67-
# rev: v1.23.0
68-
# hooks:
69-
# - id: yamllint
57+
- repo: https://github.com/domdfcoding/yapf-isort
58+
rev: v0.3.0
59+
hooks:
60+
- id: yapf-isort
61+
exclude: ^(doc-source/conf|__pkginfo__|make_conda_recipe|setup)\.py$

.travis.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
---
33

44
language: python
5-
dist: xenial
5+
dist: focal
66
cache: pip
77
python:
88
- '3.6'
@@ -11,6 +11,7 @@ python:
1111
- '3.9-dev'
1212
- 'pypy3'
1313

14+
arch: amd64
1415
install:
1516

1617
- pip install --upgrade pip
@@ -31,6 +32,14 @@ stages:
3132

3233
jobs:
3334
include:
35+
- stage: test
36+
dist: bionic
37+
python: 3.8
38+
39+
- stage: test
40+
arch: arm64
41+
python: 3.8
42+
3443
- stage: deploy_pypi
3544
python: "3.6"
3645
script: skip
@@ -56,7 +65,5 @@ jobs:
5665
- chmod +x .ci/travis_deploy_conda.sh
5766
script: skip
5867
deploy:
59-
on:
60-
repo: domdfcoding/flake8-sphinx-links
6168
provider: script
6269
script: .ci/travis_deploy_conda.sh || return 1;

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
2-
31
==============
42
Contributing
53
==============
64

5+
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
6+
77
``flake8_sphinx_links`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging, and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
88

99
Install ``pre-commit`` with ``pip`` and install the git hook:

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ flake8_sphinx_links
3030

3131
.. |docs| image:: https://img.shields.io/readthedocs/flake8-sphinx-links/latest?logo=read-the-docs
3232
:target: https://flake8-sphinx-links.readthedocs.io/en/latest/?badge=latest
33-
:alt: Documentation Status
33+
:alt: Documentation Build Status
3434

3535
.. |docs_check| image:: https://github.com/domdfcoding/flake8-sphinx-links/workflows/Docs%20Check/badge.svg
3636
:target: https://github.com/domdfcoding/flake8-sphinx-links/actions?query=workflow%3A%22Docs+Check%22

doc-source/conf.py

Lines changed: 49 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
import re
88
import sys
99

10-
# 3rd party
11-
from sphinx.locale import _
12-
1310
sys.path.append(os.path.abspath('.'))
1411
sys.path.append(os.path.abspath('..'))
1512

@@ -18,7 +15,10 @@
1815
# User-configurable lines
1916
# End of user-configurable lines
2017

21-
github_url = "https://github.com/domdfcoding/flake8-sphinx-links"
18+
github_username = "domdfcoding"
19+
github_repository = "flake8-sphinx-links"
20+
github_url = f"https://github.com/{github_username}/{github_repository}"
21+
2222

2323
rst_prolog = f""".. |pkgname| replace:: flake8_sphinx_links
2424
.. |pkgname2| replace:: ``flake8_sphinx_links``
@@ -34,25 +34,22 @@
3434
package_root = "flake8_sphinx_links"
3535

3636
extensions = [
37-
'sphinx.ext.intersphinx',
38-
'sphinx.ext.autodoc',
39-
'sphinx.ext.mathjax',
40-
'sphinx.ext.viewcode',
41-
'sphinxcontrib.httpdomain',
42-
"sphinxcontrib.extras_require",
43-
"sphinx.ext.todo",
44-
"sphinxemoji.sphinxemoji",
45-
"notfound.extension",
46-
"sphinx_tabs.tabs",
47-
"sphinx-prompt",
48-
"sphinx_autodoc_typehints",
49-
"sphinx.ext.autosummary",
50-
"autodocsumm",
51-
"sphinx_copybutton",
52-
"sphinxcontrib.default_values",
53-
"sphinxcontrib.toctree_plus",
54-
# "sphinx_gitstamp",
55-
]
37+
'sphinx_toolbox',
38+
'sphinx_toolbox.more_autodoc',
39+
'sphinx_toolbox.more_autosummary',
40+
'sphinx_toolbox.tweaks.param_dash',
41+
'sphinx.ext.intersphinx',
42+
'sphinx.ext.mathjax',
43+
'sphinxcontrib.httpdomain',
44+
'sphinxcontrib.extras_require',
45+
'sphinx.ext.todo',
46+
'sphinxemoji.sphinxemoji',
47+
'notfound.extension',
48+
'sphinx_copybutton',
49+
'sphinxcontrib.default_values',
50+
'sphinxcontrib.toctree_plus',
51+
'seed_intersphinx_mapping',
52+
]
5653

5754
sphinxemoji_style = 'twemoji'
5855
todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0))
@@ -68,18 +65,11 @@
6865
pygments_style = 'default'
6966

7067
intersphinx_mapping = {
71-
'rtd': ('https://docs.readthedocs.io/en/latest/', None),
72-
'sphinx': ('https://www.sphinx-doc.org/en/stable/', None),
7368
'python': ('https://docs.python.org/3/', None),
74-
"NumPy": ('https://numpy.org/doc/stable/', None),
75-
"SciPy": ('https://docs.scipy.org/doc/scipy/reference', None),
76-
"Pandas": ('https://pandas.pydata.org/docs/', None),
77-
"matplotlib": ('https://matplotlib.org', None),
69+
'sphinx': ('https://www.sphinx-doc.org/en/stable/', None),
70+
'rtd': ('https://docs.readthedocs.io/en/latest/', None),
7871
"h5py": ('https://docs.h5py.org/en/latest/', None),
79-
"Sphinx": ('https://www.sphinx-doc.org/en/master/', None),
80-
"Django": ('https://docs.djangoproject.com/en/dev/', 'https://docs.djangoproject.com/en/dev/_objects/'),
8172
"sarge": ('https://sarge.readthedocs.io/en/latest/', None),
82-
"attrs": ('https://www.attrs.org/en/stable/', None),
8373
}
8474

8575
html_theme = 'domdf_sphinx_theme'
@@ -103,13 +93,33 @@
10393
man_pages = [('index', slug, project, [author], 1)]
10494
texinfo_documents = [('index', slug, project, author, slug, project, 'Miscellaneous')]
10595

96+
toctree_plus_types = {
97+
"class",
98+
"function",
99+
"method",
100+
"data",
101+
"enum",
102+
"flag",
103+
"confval",
104+
"directive",
105+
"role",
106+
"confval",
107+
"protocol",
108+
"typeddict",
109+
"namedtuple",
110+
}
111+
112+
add_module_names = False
113+
106114

107115
autodoc_default_options = {
108116
'members': None, # Include all members (methods).
109117
'special-members': None,
110118
"autosummary": None,
119+
"show-inheritance": None,
111120
'exclude-members': ','.join([ # Exclude "standard" methods.
112121
"__dict__",
122+
"__class__",
113123
"__dir__",
114124
"__weakref__",
115125
"__module__",
@@ -118,33 +128,11 @@
118128
"__parameters__",
119129
"__subclasshook__",
120130
"__init_subclass__",
121-
])
131+
"__attrs_attrs__",
132+
"__init__",
133+
"__new__",
134+
"__getnewargs__",
135+
"__abstractmethods__",
136+
"__hash__",
137+
]),
122138
}
123-
124-
125-
# Extensions to theme docs
126-
def setup(app):
127-
from sphinx.domains.python import PyField
128-
from sphinx.util.docfields import Field
129-
130-
app.add_object_type(
131-
'confval',
132-
'confval',
133-
objname='configuration value',
134-
indextemplate='pair: %s; configuration value',
135-
doc_field_types=[
136-
PyField(
137-
'type',
138-
label=_('Type'),
139-
has_arg=False,
140-
names=('type', ),
141-
bodyrolename='class',
142-
),
143-
Field(
144-
'default',
145-
label=_('Default'),
146-
has_arg=False,
147-
names=('default', ),
148-
),
149-
]
150-
)

doc-source/contributing.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
1+
Overview
2+
---------
23

3-
==============
4-
Contributing
5-
==============
4+
.. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md
65
76
``flake8_sphinx_links`` uses `tox <https://tox.readthedocs.io>`_ to automate testing and packaging, and `pre-commit <https://pre-commit.com>`_ to maintain code quality.
87

0 commit comments

Comments
 (0)