Skip to content

Commit c71c302

Browse files
committed
Updated files with 'repo_helper'.
1 parent 5b3f86e commit c71c302

File tree

3 files changed

+44
-72
lines changed

3 files changed

+44
-72
lines changed

__pkginfo__.py

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,19 @@
1717
__all__ = [
1818
"__copyright__",
1919
"__version__",
20-
"modname",
21-
"pypi_name",
22-
"__license__",
23-
"__author__",
24-
"short_desc",
25-
"author",
26-
"author_email",
27-
"github_username",
28-
"web",
29-
"github_url",
3020
"repo_root",
3121
"install_requires",
3222
"extras_require",
33-
"project_urls",
34-
35-
"import_name",
3623
]
3724

3825
__copyright__ = """
3926
2019-2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
4027
"""
4128

4229
__version__ = "1.2.0"
43-
modname = "domdf_python_tools"
44-
pypi_name = "domdf_python_tools"
45-
import_name = "domdf_python_tools"
46-
__license__ = "GNU Lesser General Public License v3 or later (LGPLv3+)"
47-
short_desc = 'Helpful functions for Python\u2002🐍\u2002🛠️'
48-
__author__ = author = 'Dominic Davis-Foster'
49-
author_email = 'dominic@davis-foster.co.uk'
50-
github_username = "domdfcoding"
51-
web = github_url = "https://github.com/domdfcoding/domdf_python_tools"
30+
5231
repo_root = pathlib.Path(__file__).parent
5332
install_requires = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n')
54-
extras_require = {'dates': ['pytz>=2019.1'], 'testing': ['pytest>=6.0.0'], 'all': ['pytest>=6.0.0', 'pytz>=2019.1']}
55-
56-
57-
58-
conda_description = """Helpful functions for Python 🐍 🛠️
59-
60-
61-
Before installing please ensure you have added the following channels: domdfcoding, conda-forge"""
62-
__all__.append("conda_description")
63-
64-
65-
project_urls = {
66-
"Documentation": "https://domdf_python_tools.readthedocs.io",
67-
"Issue Tracker": f"{github_url}/issues",
68-
"Source Code": github_url,
33+
extras_require = {
34+
'dates': ['pytz>=2019.1'], 'testing': ['pytest>=6.0.0'], 'all': ['pytest>=6.0.0', 'pytz>=2019.1']
6935
}

make_conda_recipe.py

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,48 @@
11
#!/usr/bin/python3
22

3-
# This file is managed by `repo_helper`. Don't edit it directly.
3+
# This file is managed by 'repo_helper'. Don't edit it directly.
4+
5+
# stdlib
6+
import pathlib
47

58
# this package
6-
from __pkginfo__ import * # pylint: disable=wildcard-import
9+
from __pkginfo__ import __version__
10+
11+
description_block = """Helpful functions for Python 🐍 🛠️
12+
13+
14+
15+
Before installing please ensure you have added the following channels: domdfcoding, conda-forge
16+
""".replace('"', '\\"')
717

18+
19+
repo_root = pathlib.Path(__file__).parent
820
recipe_dir = repo_root / "conda"
921

1022
if not recipe_dir.exists():
1123
recipe_dir.mkdir()
1224

13-
# TODO: entry_points, manifest
25+
all_requirements = (repo_root / "requirements.txt").read_text(encoding="utf-8").split('\n')
1426

15-
all_requirements = install_requires[:]
27+
# TODO: entry_points, manifest
1628

17-
if isinstance(extras_require, dict):
18-
for requires in extras_require.values():
19-
all_requirements += requires
29+
for requires in {'dates': ['pytz>=2019.1'], 'testing': ['pytest>=6.0.0'], 'all': ['pytest>=6.0.0', 'pytz>=2019.1']}.values():
30+
all_requirements += requires
2031

2132
all_requirements = {x.replace(" ", '') for x in set(all_requirements)}
2233
requirements_block = "\n".join(f" - {req}" for req in all_requirements if req)
2334

24-
description_block = conda_description.replace('"', '\\"')
25-
2635
(recipe_dir / "meta.yaml").write_text(
2736
encoding="UTF-8",
2837
data=f"""\
2938
package:
30-
name: "{pypi_name.lower()}"
39+
name: "domdf_python_tools"
3140
version: "{__version__}"
3241
3342
source:
34-
url: "https://pypi.io/packages/source/{pypi_name[0]}/{pypi_name}/{pypi_name}-{__version__}.tar.gz"
43+
url: "https://pypi.io/packages/source/d/domdf_python_tools/domdf_python_tools-{__version__}.tar.gz"
3544
3645
build:
37-
# entry_points:
38-
# - {import_name} = {import_name}:main
39-
# skip_compile_pyc:
40-
# - "*/templates/*.py" # These should not (and cannot) be compiled
4146
noarch: python
4247
script: "{{{{ PYTHON }}}} -m pip install . -vv"
4348
@@ -56,22 +61,22 @@
5661
5762
test:
5863
imports:
59-
- {import_name}
64+
- domdf_python_tools
6065
6166
about:
62-
home: "{web}"
63-
license: "{__license__}"
67+
home: "https://github.com/domdfcoding/domdf_python_tools"
68+
license: "GNU Lesser General Public License v3 or later (LGPLv3+)"
6469
# license_family: LGPL
6570
# license_file: LICENSE
66-
summary: "{short_desc}"
71+
summary: "Helpful functions for Python 🐍 🛠️"
6772
description: "{description_block}"
68-
doc_url: {project_urls["Documentation"]}
69-
dev_url: {project_urls["Source Code"]}
73+
doc_url: https://domdf_python_tools.readthedocs.io
74+
dev_url: https://github.com/domdfcoding/domdf_python_tools
7075
7176
extra:
7277
maintainers:
73-
- {author}
74-
- github.com/{github_username}
78+
- Dominic Davis-Foster
79+
- github.com/domdfcoding
7580
7681
""")
7782

tox.ini

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,18 @@ skip_install = True
8585
deps =
8686
flake8 >=3.8.2
8787
flake8-2020 >= 1.6.0
88-
flake8_strftime
89-
flake8-pytest-style
90-
flake8-docstrings
91-
flake8-typing-imports
92-
flake8-sphinx-links
93-
flake8-dunder-all
94-
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
95-
flake8-builtins
96-
pygments
97-
git+https://github.com/domdfcoding/flake8-quotes.git
88+
flake8-builtins>=1.5.3
89+
flake8-docstrings>=1.5.0
90+
flake8-dunder-all>=0.0.4
91+
flake8-pyi>=20.10.0
92+
flake8-pytest-style>=1.3.0
93+
flake8-sphinx-links>=0.0.4
94+
flake8-strftime>=0.1.1
95+
flake8-typing-imports>=1.10.0
9896
git+https://github.com/PyCQA/pydocstyle@5118faa7173b0e5bbc230c4adf628758e13605bf
97+
git+https://github.com/domdfcoding/flake8-quotes.git
98+
git+https://github.com/domdfcoding/flake8-rst-docstrings.git
99+
pygments>=2.7.1
99100
commands = flake8 domdf_python_tools tests
100101

101102
[testenv:yapf]
@@ -144,7 +145,7 @@ commands =
144145

145146
[flake8]
146147
max-line-length = 120
147-
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 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 SXL001 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 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 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
148+
select = E301 E303 E304 E305 E306 E502 W291 W293 W391 E226 E225 E241 E231 W292 E265 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 SXL001 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 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 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 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091
148149
exclude = .git,__pycache__,doc-source,old,build,dist,make_conda_recipe.py,__pkginfo__.py,setup.py
149150
rst-roles =
150151
class
@@ -191,7 +192,7 @@ rst-directives =
191192
py:data
192193
py:method
193194
py:classmethod
194-
per-file-ignores = tests/*: 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
195+
per-file-ignores = tests/*: 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 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091
195196
pytest-parametrize-names-type = csv
196197
inline-quotes = "
197198
multiline-quotes = """

0 commit comments

Comments
 (0)