Skip to content

Commit 527c36d

Browse files
committed
Updated files with 'repo_helper'.
1 parent d6ba4e1 commit 527c36d

10 files changed

Lines changed: 122 additions & 83 deletions

File tree

.github/workflows/python_ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This file is managed by `repo_helper`. Don't edit it directly
12
---
23
name: Windows Tests
34

.github/workflows/python_ci_macos.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# This file is managed by `repo_helper`. Don't edit it directly
12
---
23
name: macOS Tests
34

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ install:
1515

1616
- pip install pip --upgrade
1717
- pip install tox tox-travis
18-
- pip install coveralls
18+
- pip install coveralls coverage_pyver_pragma
1919

2020
script:
2121
- tox
@@ -27,7 +27,7 @@ stages:
2727
- test
2828
- deploy_pypi
2929
- deploy_conda
30-
- deploy_releases
30+
3131

3232
jobs:
3333
include:

__pkginfo__.py

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
"__version__",
2020
"modname",
2121
"pypi_name",
22-
"py_modules",
23-
"entry_points",
2422
"__license__",
2523
"__author__",
2624
"short_desc",
@@ -29,13 +27,11 @@
2927
"github_username",
3028
"web",
3129
"github_url",
32-
"project_urls",
3330
"repo_root",
34-
"long_description",
3531
"install_requires",
3632
"extras_require",
37-
"classifiers",
38-
"keywords",
33+
"project_urls",
34+
3935
"import_name",
4036
]
4137

@@ -44,59 +40,30 @@
4440
"""
4541

4642
__version__ = "0.1.1"
47-
4843
modname = "flake8_strftime"
4944
pypi_name = "flake8_strftime"
5045
import_name = "flake8_strftime"
51-
py_modules = []
52-
entry_points = {
53-
"console_scripts": [],
54-
}
55-
5646
__license__ = "MIT License"
57-
5847
short_desc = "A flake8 plugin which checks for use of platform specific strftime codes."
59-
6048
__author__ = author = "Dominic Davis-Foster"
6149
author_email = "dominic@davis-foster.co.uk"
6250
github_username = "domdfcoding"
63-
web = github_url = f"https://github.com/domdfcoding/flake8_strftime"
64-
project_urls = {
65-
"Documentation": f"https://flake8_strftime.readthedocs.io",
66-
"Issue Tracker": f"{github_url}/issues",
67-
"Source Code": github_url,
68-
}
69-
51+
web = github_url = "https://github.com/domdfcoding/flake8_strftime"
7052
repo_root = pathlib.Path(__file__).parent
53+
install_requires = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n')
54+
extras_require = {'all': []}
55+
56+
7157

72-
# Get info from files; set: long_description
73-
long_description = (repo_root / "README.rst").read_text(encoding="utf-8").replace("0.1.1", __version__) + '\n'
7458
conda_description = """A flake8 plugin which checks for use of platform specific strftime codes.
7559
7660
7761
Before installing please ensure you have added the following channels: domdfcoding, conda-forge"""
7862
__all__.append("conda_description")
7963

80-
install_requires = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n')
81-
extras_require = {'all': []}
82-
83-
classifiers = [
84-
'Development Status :: 4 - Beta',
85-
'Intended Audience :: Developers',
86-
'License :: OSI Approved :: MIT License',
87-
'Operating System :: OS Independent',
88-
'Programming Language :: Python',
89-
'Programming Language :: Python :: 3 :: Only',
90-
'Programming Language :: Python :: 3.6',
91-
'Programming Language :: Python :: 3.7',
92-
'Programming Language :: Python :: 3.8',
93-
'Programming Language :: Python :: 3.9',
94-
'Programming Language :: Python :: Implementation :: CPython',
95-
'Programming Language :: Python :: Implementation :: PyPy',
96-
'Topic :: Software Development :: Libraries :: Python Modules',
97-
'Topic :: Utilities',
98-
'Typing :: Typed',
9964

100-
]
101-
102-
keywords = ""
65+
project_urls = {
66+
"Documentation": "https://flake8_strftime.readthedocs.io",
67+
"Issue Tracker": f"{github_url}/issues",
68+
"Source Code": github_url,
69+
}

doc-source/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# User-configurable lines
1919
# End of user-configurable lines
2020

21-
github_url = f"https://github.com/domdfcoding/flake8_strftime"
21+
github_url = "https://github.com/domdfcoding/flake8_strftime"
2222

2323
rst_prolog = f""".. |pkgname| replace:: flake8_strftime
2424
.. |pkgname2| replace:: ``flake8_strftime``
@@ -48,6 +48,7 @@
4848
"sphinx_autodoc_typehints",
4949
"sphinx.ext.autosummary",
5050
"autodocsumm",
51+
"sphinx_copybutton",
5152
]
5253

5354
sphinxemoji_style = 'twemoji'
@@ -81,15 +82,14 @@
8182
'logo_only': False,
8283
}
8384
html_theme_path = ["../.."]
84-
# html_logo = "logo/pyms.png"
85-
html_show_sourcelink = False # True will show link to source
85+
html_show_sourcelink = True # True will show link to source
8686

8787
html_context = {
8888
'display_github': True,
8989
'github_user': 'domdfcoding',
9090
'github_repo': 'flake8_strftime',
9191
'github_version': 'master',
92-
'conf_py_path': '/',
92+
'conf_py_path': '/doc-source/',
9393
}
9494

9595
htmlhelp_basename = slug

doc-source/docutils.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[restructuredtext parser]
2+
tab_width: 4

doc-source/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
autodocsumm
22
extras_require
33
sphinx >=3.0.3
4+
sphinx-copybutton >=0.2.12
45
sphinx-notfound-page
56
sphinx-prompt >=1.2.0
67
sphinx-tabs >=1.1.13

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[build-system]
2+
requires = [
3+
"setuptools >= 40.6.0",
4+
"wheel >= 0.34.2",
5+
6+
]
7+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1-
[options.entry_points]
2-
flake8.extension =
3-
STRFTIME=flake8_strftime:Plugin
1+
[metadata]
2+
name = flake8_strftime
3+
description = A flake8 plugin which checks for use of platform specific strftime codes.
4+
author = Dominic Davis-Foster
5+
author_email = dominic@davis-foster.co.uk
6+
license = MIT License
7+
keywords =
8+
9+
long_description = file: README.rst
10+
long_description_content_type = text/x-rst
11+
platforms =
12+
Windows
13+
macOS
14+
Linux
15+
url = https://github.com/domdfcoding/flake8_strftime
16+
project_urls =
17+
Documentation = https://flake8_strftime.readthedocs.io
18+
Issue_Tracker = https://github.com/domdfcoding/flake8_strftime/issues
19+
Source_Code = https://github.com/domdfcoding/flake8_strftime
20+
classifiers =
21+
Development Status :: 4 - Beta
22+
Intended Audience :: Developers
23+
License :: OSI Approved :: MIT License
24+
Operating System :: OS Independent
25+
Programming Language :: Python
26+
Programming Language :: Python :: 3 :: Only
27+
Programming Language :: Python :: 3.6
28+
Programming Language :: Python :: 3.7
29+
Programming Language :: Python :: 3.8
30+
Programming Language :: Python :: 3.9
31+
Programming Language :: Python :: Implementation :: CPython
32+
Programming Language :: Python :: Implementation :: PyPy
33+
Topic :: Software Development :: Libraries :: Python Modules
34+
Topic :: Utilities
35+
Typing :: Typed
36+
37+
38+
39+
[options]
40+
python_requires = >=3.6
41+
zip_safe = False
42+
include_package_data = True
43+
packages = find:
44+
45+
46+
[options.packages.find]
47+
exclude =
48+
tests
49+
tests.*
50+
doc-source

tox.ini

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,27 @@
22

33
# This file must be in the same dir as setup.py
44
[tox]
5-
envlist = py36, py37, py38, py39-dev, pypy3, mypy
5+
envlist = py36, py37, py38, py39-dev, pypy3, mypy, build
66
skip_missing_interpreters = True
77
requires = pip >= 19.0.0
88

99

1010
[travis]
1111
python =
12-
3.6: py36, mypy
13-
3.7: py37
14-
3.8: py38
15-
3.9-dev: py39-dev
16-
pypy3: pypy3
12+
3.6: py36, build, mypy
13+
3.7: py37, build
14+
3.8: py38, build
15+
3.9-dev: py39-dev, build
16+
pypy3: pypy3, build
1717

1818

1919
[gh-actions]
2020
python =
21-
3.6: py36
22-
3.7: py37
23-
3.8: py38
24-
3.9-dev: py39-dev
25-
pypy3: pypy3
26-
27-
28-
[build-system]
29-
requires = [
30-
setuptools >= 46.1.3
31-
wheel >= 0.34.2
32-
]
33-
build-backend = "setuptools"
21+
3.6: py36, build
22+
3.7: py37, build
23+
3.8: py38, build
24+
3.9-dev: py39-dev, build
25+
pypy3: pypy3, build
3426

3527

3628
[testenv]
@@ -44,7 +36,6 @@ commands =
4436

4537

4638

47-
4839
[testenv:docs]
4940
basepython = python3.8
5041
changedir = {toxinidir}/doc-source
@@ -63,11 +54,15 @@ commands = bumpversion --verbose {posargs}
6354
[testenv:build]
6455
skip_install = true
6556
changedir = {toxinidir}
66-
deps = setuptools >= 46.1.3
67-
pep517
68-
wheel >= 0.34.2
69-
70-
commands = python setup.py {posargs} sdist bdist_wheel
57+
deps =
58+
twine
59+
pep517
60+
check-wheel-contents
61+
commands =
62+
python -m pep517.build --source --binary "{toxinidir}"
63+
; python setup.py {posargs} sdist bdist_wheel
64+
twine check dist/*
65+
check-wheel-contents dist/
7166

7267

7368
[testenv:lint]
@@ -84,6 +79,7 @@ deps =
8479
flake8-docstrings
8580
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
8681
flake8-builtins
82+
flake8-walrus
8783
pygments
8884
git+https://github.com/domdfcoding/flake8-quotes.git
8985
commands = flake8 flake8_strftime tests
@@ -119,7 +115,6 @@ deps =
119115
commands = mypy flake8_strftime tests
120116

121117

122-
123118
[testenv:bandit]
124119
basepython = python3.6
125120

@@ -153,9 +148,24 @@ changedir = {toxinidir}
153148
commands = tox -e pyup,isort,yapf,mypy,lint {posargs}
154149

155150

151+
[testenv:coverage]
152+
basepython = python3.6
153+
skip_install = True
154+
ignore_errors = true
155+
whitelist_externals = /bin/bash
156+
changedir = {toxinidir}
157+
deps =
158+
coverage
159+
coverage_pyver_pragma
160+
commands =
161+
/bin/bash -c "rm -rf htmlcov"
162+
coverage html
163+
/bin/bash -c "DISPLAY=:0 firefox 'htmlcov/index.html'"
164+
165+
156166
[flake8]
157167
max-line-length = 120
158-
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E101 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 PT001 PT002 PT003 PT004 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 Q000 Q001 Q002 Q003 A001 A002 A003 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
168+
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 E101 E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E227 E228 E242 E251 E261 E262 E271 E272 E402 E703 E711 E712 E713 E714 E721 W504 E302 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 PT001 PT002 PT003 PT004 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 Q000 Q001 Q002 Q003 A001 A002 A003 ASN001 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
159169
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py
160170
rst-roles =
161171
class,
@@ -179,8 +189,6 @@ multiline-quotes = """
179189
docstring-quotes = """
180190
181191
182-
183-
184192
[mypy]
185193
python_version = 3.6
186194
ignore_missing_imports = True
@@ -190,3 +198,8 @@ namespace_packages = True
190198
[coverage:run]
191199
plugins =
192200
coverage_pyver_pragma
201+
202+
203+
[check-wheel-contents]
204+
toplevel = flake8_strftime
205+
package = flake8_strftime

0 commit comments

Comments
 (0)