boilerplates 1.1.4.dev1__tar.gz → 1.2.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/NOTICE +1 -0
- {boilerplates-1.1.4.dev1/boilerplates.egg-info → boilerplates-1.2.0.dev1}/PKG-INFO +11 -11
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/sentry.py +49 -3
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/setup.py +24 -5
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1/boilerplates.egg-info}/PKG-INFO +11 -11
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates.egg-info/requires.txt +2 -2
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_setup.txt +1 -1
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/setup.py +2 -1
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/__init__.py +4 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_setup.py +13 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/LICENSE +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/MANIFEST.in +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/README.rst +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/__init__.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/__init__.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/git_query.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/parser.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/patterns.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/py.typed +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/py_query.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/query.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/version.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/cli.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/config.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/git_repo_tests.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/logging.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/packaging_tests.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/py.typed +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates.egg-info/SOURCES.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates.egg-info/dependency_links.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates.egg-info/top_level.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/pyproject.toml +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_cli.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_config.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_git_repo_tests.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_logging.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_packaging_tests.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_sentry.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/requirements_test.txt +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/setup.cfg +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_cli.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_config.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_git_repo.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_logging.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_packaging.py +0 -0
- {boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/test/test_sentry.py +0 -0
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: boilerplates
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0.dev1
|
|
4
4
|
Summary: Various boilerplates used in almost all of my Python packages.
|
|
5
5
|
Home-page: https://github.com/mbdevpl/python-boilerplates
|
|
6
6
|
Download-URL:
|
|
7
|
-
Author: Mateusz Bysiek
|
|
7
|
+
Author: Mateusz Bysiek, Stian Hanssen
|
|
8
8
|
Author-email: mateusz.bysiek@gmail.com
|
|
9
9
|
Maintainer: Mateusz Bysiek
|
|
10
10
|
Maintainer-email: mateusz.bysiek@gmail.com
|
|
11
|
-
License: Apache
|
|
11
|
+
License: Apache-2.0
|
|
12
12
|
Keywords: git,logging,packaging,releasing
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
15
|
Classifier: Operating System :: MacOS
|
|
17
16
|
Classifier: Operating System :: Microsoft :: Windows
|
|
18
17
|
Classifier: Operating System :: POSIX :: Linux
|
|
@@ -37,13 +36,13 @@ Provides-Extra: setup
|
|
|
37
36
|
Requires-Dist: build~=1.2; extra == "setup"
|
|
38
37
|
Requires-Dist: docutils~=0.20; extra == "setup"
|
|
39
38
|
Requires-Dist: Pygments~=2.14; extra == "setup"
|
|
40
|
-
Requires-Dist: setuptools>=
|
|
39
|
+
Requires-Dist: setuptools>=77.0.3; extra == "setup"
|
|
41
40
|
Requires-Dist: version-query~=1.6; extra == "setup"
|
|
42
41
|
Provides-Extra: packaging-tests
|
|
43
42
|
Requires-Dist: build~=1.2; extra == "packaging-tests"
|
|
44
43
|
Requires-Dist: docutils~=0.20; extra == "packaging-tests"
|
|
45
44
|
Requires-Dist: Pygments~=2.14; extra == "packaging-tests"
|
|
46
|
-
Requires-Dist: setuptools>=
|
|
45
|
+
Requires-Dist: setuptools>=77.0.3; extra == "packaging-tests"
|
|
47
46
|
Requires-Dist: version-query~=1.6; extra == "packaging-tests"
|
|
48
47
|
Requires-Dist: pip>=24.0; extra == "packaging-tests"
|
|
49
48
|
Requires-Dist: wheel>=0.43; extra == "packaging-tests"
|
|
@@ -64,6 +63,7 @@ Dynamic: description-content-type
|
|
|
64
63
|
Dynamic: home-page
|
|
65
64
|
Dynamic: keywords
|
|
66
65
|
Dynamic: license
|
|
66
|
+
Dynamic: license-file
|
|
67
67
|
Dynamic: maintainer
|
|
68
68
|
Dynamic: maintainer-email
|
|
69
69
|
Dynamic: provides-extra
|
|
@@ -99,7 +99,7 @@ Various boilerplates used in almost all of my Python packages.
|
|
|
99
99
|
:alt: grade from Codacy
|
|
100
100
|
|
|
101
101
|
.. image:: https://img.shields.io/github/license/mbdevpl/python-boilerplates.svg
|
|
102
|
-
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
102
|
+
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/NOTICE
|
|
103
103
|
:alt: license
|
|
104
104
|
|
|
105
105
|
This package includes boilerplates for various common tasks in Python packages, such as building
|
|
@@ -114,9 +114,9 @@ Requirements
|
|
|
114
114
|
|
|
115
115
|
Python version 3.9 or later.
|
|
116
116
|
|
|
117
|
-
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
117
|
+
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/requirements.txt>`_.
|
|
118
118
|
|
|
119
|
-
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
119
|
+
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/requirements_test.txt>`_.
|
|
120
120
|
|
|
121
121
|
Tested on Linux, macOS and Windows.
|
|
122
122
|
|
|
@@ -399,7 +399,7 @@ Your example ``cli.py`` file which defines your command-line interface may look
|
|
|
399
399
|
verbosity = boilerplates.cli.get_verbosity_level(parsed_args)
|
|
400
400
|
...
|
|
401
401
|
|
|
402
|
-
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
402
|
+
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/examples.ipynb>`_ notebook.
|
|
403
403
|
Please see the ``boilerplates.cli`` module for details of the available features.
|
|
404
404
|
|
|
405
405
|
And then, an example ``__main__.py`` file may look like:
|
|
@@ -20,16 +20,26 @@ _LOG = logging.getLogger(__name__)
|
|
|
20
20
|
class Sentry:
|
|
21
21
|
"""Sentry configuration.
|
|
22
22
|
|
|
23
|
-
For
|
|
24
|
-
from the
|
|
23
|
+
For parameters 'dsn', 'release' and 'environment', the value is taken
|
|
24
|
+
from the environment variable if it is set, otherwise from the class
|
|
25
|
+
attribute if it is set.
|
|
25
26
|
|
|
26
27
|
For each parameter, the name of the environment variable name is 'SENTRY_'
|
|
27
28
|
followed by the parameter name in upper case.
|
|
29
|
+
|
|
30
|
+
The class attribute tags, if set, will be added to the global scope of the
|
|
31
|
+
current Sentry SDK.
|
|
28
32
|
"""
|
|
29
33
|
|
|
30
34
|
dsn: str
|
|
35
|
+
"""Sentry DSN (Data Source Name) used to identify the project in Sentry."""
|
|
36
|
+
|
|
31
37
|
release: str
|
|
38
|
+
"""Release version of your application."""
|
|
39
|
+
|
|
32
40
|
environment: str
|
|
41
|
+
"""Environment name (e.g., 'production', 'staging', 'development')."""
|
|
42
|
+
|
|
33
43
|
integrations: t.List[sentry_sdk.integrations.Integration] = [
|
|
34
44
|
sentry_sdk.integrations.argv.ArgvIntegration(),
|
|
35
45
|
sentry_sdk.integrations.excepthook.ExcepthookIntegration(always_run=False),
|
|
@@ -40,15 +50,43 @@ class Sentry:
|
|
|
40
50
|
sentry_sdk.integrations.stdlib.StdlibIntegration(),
|
|
41
51
|
sentry_sdk.integrations.threading.ThreadingIntegration()
|
|
42
52
|
]
|
|
53
|
+
"""Sentry SDK integrations to enable.
|
|
54
|
+
|
|
55
|
+
To configure integrations that are enabled by default, also add them to this list.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
default_integrations: bool = True
|
|
59
|
+
"""If true, enable Sentry's default integrations besides the ones set via 'integrations'."""
|
|
60
|
+
|
|
61
|
+
debug: bool = False
|
|
62
|
+
"""If True, enable debug mode for the Sentry SDK."""
|
|
63
|
+
|
|
64
|
+
attach_stacktrace: bool = False
|
|
65
|
+
"""If True, attach stacktraces to messages."""
|
|
66
|
+
|
|
67
|
+
shutdown_timeout: float = 2.0
|
|
68
|
+
"""Time in seconds to wait for pending events to be sent before shutdown."""
|
|
69
|
+
|
|
70
|
+
send_default_pii: t.Optional[bool] = False
|
|
71
|
+
"""If True, send personally identifiable information."""
|
|
43
72
|
|
|
44
73
|
traces_sample_rate: float = 1.0
|
|
74
|
+
"""Ratio of transactions to sample (0.0 to 1.0)."""
|
|
75
|
+
|
|
45
76
|
profiles_sample_rate: float = 1.0
|
|
77
|
+
"""Ratio of transactions to profile (0.0 to 1.0)."""
|
|
78
|
+
|
|
79
|
+
tags: t.Dict[str, str] = {}
|
|
80
|
+
"""Tags to be added to all events."""
|
|
46
81
|
|
|
47
82
|
@classmethod
|
|
48
83
|
def _get_str_param(cls, param_name: str) -> t.Optional[str]:
|
|
49
84
|
"""Get a string parameter value by checking envvar first.
|
|
50
85
|
|
|
51
86
|
Works only for 'dsn', 'release' or 'environment' parameters.
|
|
87
|
+
|
|
88
|
+
:param param_name: name of the parameter to get
|
|
89
|
+
:return: value of the parameter
|
|
52
90
|
"""
|
|
53
91
|
assert param_name in ('dsn', 'release', 'environment'), param_name
|
|
54
92
|
return os.environ.get(f'SENTRY_{param_name.upper()}', getattr(cls, param_name, None))
|
|
@@ -67,9 +105,17 @@ class Sentry:
|
|
|
67
105
|
return
|
|
68
106
|
sentry_sdk.init(
|
|
69
107
|
*args, dsn=cls._get_str_param('dsn'),
|
|
70
|
-
release=cls._get_str_param('release'),
|
|
108
|
+
release=cls._get_str_param('release'),
|
|
109
|
+
environment=cls._get_str_param('environment'),
|
|
71
110
|
integrations=cls.integrations,
|
|
72
111
|
traces_sample_rate=cls.traces_sample_rate,
|
|
73
112
|
profiles_sample_rate=cls.profiles_sample_rate,
|
|
74
113
|
enable_tracing=cls.profiles_sample_rate > 0,
|
|
114
|
+
debug=cls.debug,
|
|
115
|
+
attach_stacktrace=cls.attach_stacktrace,
|
|
116
|
+
shutdown_timeout=cls.shutdown_timeout,
|
|
117
|
+
send_default_pii=cls.send_default_pii,
|
|
118
|
+
default_integrations=cls.default_integrations,
|
|
75
119
|
**kwargs)
|
|
120
|
+
|
|
121
|
+
sentry_sdk.set_tags(cls.tags)
|
|
@@ -19,7 +19,10 @@ HERE = pathlib.Path(__file__).resolve().parent
|
|
|
19
19
|
DEFAULT_URL = 'https://github.com/mbdevpl'
|
|
20
20
|
DEFAULT_AUTHOR = 'Mateusz Bysiek'
|
|
21
21
|
DEFAULT_AUTHOR_EMAIL = 'mateusz.bysiek@gmail.com'
|
|
22
|
-
DEFAULT_LICENSE_STR = 'Apache
|
|
22
|
+
DEFAULT_LICENSE_STR = 'Apache-2.0'
|
|
23
|
+
DEFAULT_LICENSE_FILE_PATTENS = [
|
|
24
|
+
'CONTRIBUTORS', 'CONTRIBUTORS.*', 'LICENSE', 'LICENSE.*', 'NOTICE', 'NOTICE.*'
|
|
25
|
+
]
|
|
23
26
|
|
|
24
27
|
TEST_PACKAGES = [
|
|
25
28
|
'test',
|
|
@@ -262,6 +265,8 @@ class Package:
|
|
|
262
265
|
maintainer: str
|
|
263
266
|
maintainer_email: str
|
|
264
267
|
license_str: str = DEFAULT_LICENSE_STR
|
|
268
|
+
license_file_patterns: t.Sequence[str] = DEFAULT_LICENSE_FILE_PATTENS
|
|
269
|
+
_existing_license_file_patterns: t.Optional[t.Sequence[str]] = None
|
|
265
270
|
|
|
266
271
|
classifiers: t.List[str] = []
|
|
267
272
|
"""List of trove classifiers for the package.
|
|
@@ -298,8 +303,6 @@ class Package:
|
|
|
298
303
|
'console_scripts': ['script_name = package.subpackage:function']
|
|
299
304
|
"""
|
|
300
305
|
|
|
301
|
-
test_suite: str = 'test'
|
|
302
|
-
|
|
303
306
|
@classmethod
|
|
304
307
|
def try_fields(cls, *names) -> t.Optional[t.Any]:
|
|
305
308
|
"""Return first existing of given class field names."""
|
|
@@ -347,6 +350,21 @@ class Package:
|
|
|
347
350
|
cls.install_requires = parse_requirements()
|
|
348
351
|
if cls.python_requires is None:
|
|
349
352
|
cls.python_requires = find_required_python_version(cls.classifiers)
|
|
353
|
+
cls._prepare_existing_license_file_patterns()
|
|
354
|
+
|
|
355
|
+
@classmethod
|
|
356
|
+
def _prepare_existing_license_file_patterns(cls):
|
|
357
|
+
if cls._existing_license_file_patterns is not None:
|
|
358
|
+
return
|
|
359
|
+
cls._existing_license_file_patterns = []
|
|
360
|
+
for pattern in cls.license_file_patterns:
|
|
361
|
+
results = list(pathlib.Path().resolve().glob(pattern))
|
|
362
|
+
_LOG.debug(
|
|
363
|
+
'found %i files matching pattern "%s" in current working directory',
|
|
364
|
+
len(results), pattern)
|
|
365
|
+
if len(results) == 0:
|
|
366
|
+
continue
|
|
367
|
+
cls._existing_license_file_patterns.append(pattern)
|
|
350
368
|
|
|
351
369
|
@classmethod
|
|
352
370
|
def setup(cls) -> None:
|
|
@@ -360,10 +378,11 @@ class Package:
|
|
|
360
378
|
author=cls.author, author_email=cls.author_email,
|
|
361
379
|
maintainer=cls.maintainer,
|
|
362
380
|
maintainer_email=cls.maintainer_email,
|
|
363
|
-
license=cls.license_str,
|
|
381
|
+
license=cls.license_str, license_files=cls._existing_license_file_patterns,
|
|
382
|
+
classifiers=cls.classifiers, keywords=cls.keywords,
|
|
364
383
|
packages=cls.packages, package_dir={'': cls.root_directory},
|
|
365
384
|
include_package_data=True,
|
|
366
385
|
package_data=cls.package_data, exclude_package_data=cls.exclude_package_data,
|
|
367
386
|
install_requires=cls.install_requires, extras_require=cls.extras_require,
|
|
368
387
|
python_requires=cls.python_requires,
|
|
369
|
-
entry_points=cls.entry_points
|
|
388
|
+
entry_points=cls.entry_points)
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: boilerplates
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0.dev1
|
|
4
4
|
Summary: Various boilerplates used in almost all of my Python packages.
|
|
5
5
|
Home-page: https://github.com/mbdevpl/python-boilerplates
|
|
6
6
|
Download-URL:
|
|
7
|
-
Author: Mateusz Bysiek
|
|
7
|
+
Author: Mateusz Bysiek, Stian Hanssen
|
|
8
8
|
Author-email: mateusz.bysiek@gmail.com
|
|
9
9
|
Maintainer: Mateusz Bysiek
|
|
10
10
|
Maintainer-email: mateusz.bysiek@gmail.com
|
|
11
|
-
License: Apache
|
|
11
|
+
License: Apache-2.0
|
|
12
12
|
Keywords: git,logging,packaging,releasing
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
15
|
Classifier: Operating System :: MacOS
|
|
17
16
|
Classifier: Operating System :: Microsoft :: Windows
|
|
18
17
|
Classifier: Operating System :: POSIX :: Linux
|
|
@@ -37,13 +36,13 @@ Provides-Extra: setup
|
|
|
37
36
|
Requires-Dist: build~=1.2; extra == "setup"
|
|
38
37
|
Requires-Dist: docutils~=0.20; extra == "setup"
|
|
39
38
|
Requires-Dist: Pygments~=2.14; extra == "setup"
|
|
40
|
-
Requires-Dist: setuptools>=
|
|
39
|
+
Requires-Dist: setuptools>=77.0.3; extra == "setup"
|
|
41
40
|
Requires-Dist: version-query~=1.6; extra == "setup"
|
|
42
41
|
Provides-Extra: packaging-tests
|
|
43
42
|
Requires-Dist: build~=1.2; extra == "packaging-tests"
|
|
44
43
|
Requires-Dist: docutils~=0.20; extra == "packaging-tests"
|
|
45
44
|
Requires-Dist: Pygments~=2.14; extra == "packaging-tests"
|
|
46
|
-
Requires-Dist: setuptools>=
|
|
45
|
+
Requires-Dist: setuptools>=77.0.3; extra == "packaging-tests"
|
|
47
46
|
Requires-Dist: version-query~=1.6; extra == "packaging-tests"
|
|
48
47
|
Requires-Dist: pip>=24.0; extra == "packaging-tests"
|
|
49
48
|
Requires-Dist: wheel>=0.43; extra == "packaging-tests"
|
|
@@ -64,6 +63,7 @@ Dynamic: description-content-type
|
|
|
64
63
|
Dynamic: home-page
|
|
65
64
|
Dynamic: keywords
|
|
66
65
|
Dynamic: license
|
|
66
|
+
Dynamic: license-file
|
|
67
67
|
Dynamic: maintainer
|
|
68
68
|
Dynamic: maintainer-email
|
|
69
69
|
Dynamic: provides-extra
|
|
@@ -99,7 +99,7 @@ Various boilerplates used in almost all of my Python packages.
|
|
|
99
99
|
:alt: grade from Codacy
|
|
100
100
|
|
|
101
101
|
.. image:: https://img.shields.io/github/license/mbdevpl/python-boilerplates.svg
|
|
102
|
-
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
102
|
+
:target: https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/NOTICE
|
|
103
103
|
:alt: license
|
|
104
104
|
|
|
105
105
|
This package includes boilerplates for various common tasks in Python packages, such as building
|
|
@@ -114,9 +114,9 @@ Requirements
|
|
|
114
114
|
|
|
115
115
|
Python version 3.9 or later.
|
|
116
116
|
|
|
117
|
-
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
117
|
+
Python libraries as specified in `requirements.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/requirements.txt>`_.
|
|
118
118
|
|
|
119
|
-
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
119
|
+
Building and running tests additionally requires packages listed in `requirements_test.txt <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/requirements_test.txt>`_.
|
|
120
120
|
|
|
121
121
|
Tested on Linux, macOS and Windows.
|
|
122
122
|
|
|
@@ -399,7 +399,7 @@ Your example ``cli.py`` file which defines your command-line interface may look
|
|
|
399
399
|
verbosity = boilerplates.cli.get_verbosity_level(parsed_args)
|
|
400
400
|
...
|
|
401
401
|
|
|
402
|
-
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.
|
|
402
|
+
You can see the above example in action in the `examples.ipynb <https://github.com/mbdevpl/python-boilerplates/blob/v1.2.0.dev1/examples.ipynb>`_ notebook.
|
|
403
403
|
Please see the ``boilerplates.cli`` module for details of the available features.
|
|
404
404
|
|
|
405
405
|
And then, an example ``__main__.py`` file may look like:
|
|
@@ -14,7 +14,7 @@ colorlog~=6.7
|
|
|
14
14
|
build~=1.2
|
|
15
15
|
docutils~=0.20
|
|
16
16
|
Pygments~=2.14
|
|
17
|
-
setuptools>=
|
|
17
|
+
setuptools>=77.0.3
|
|
18
18
|
version-query~=1.6
|
|
19
19
|
pip>=24.0
|
|
20
20
|
wheel>=0.43
|
|
@@ -26,5 +26,5 @@ sentry-sdk[pure_eval]~=2.5
|
|
|
26
26
|
build~=1.2
|
|
27
27
|
docutils~=0.20
|
|
28
28
|
Pygments~=2.14
|
|
29
|
-
setuptools>=
|
|
29
|
+
setuptools>=77.0.3
|
|
30
30
|
version-query~=1.6
|
|
@@ -41,10 +41,11 @@ class Package(boilerplates.setup.Package):
|
|
|
41
41
|
version = VERSION
|
|
42
42
|
description = 'Various boilerplates used in almost all of my Python packages.'
|
|
43
43
|
url = 'https://github.com/mbdevpl/python-boilerplates'
|
|
44
|
+
author = 'Mateusz Bysiek, Stian Hanssen'
|
|
45
|
+
maintainer = 'Mateusz Bysiek'
|
|
44
46
|
classifiers = [
|
|
45
47
|
'Development Status :: 5 - Production/Stable',
|
|
46
48
|
'Intended Audience :: Developers',
|
|
47
|
-
'License :: OSI Approved :: Apache Software License',
|
|
48
49
|
'Operating System :: MacOS',
|
|
49
50
|
'Operating System :: Microsoft :: Windows',
|
|
50
51
|
'Operating System :: POSIX :: Linux',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""Initialization of tests of boilerplates package."""
|
|
2
2
|
|
|
3
|
+
import logging
|
|
4
|
+
|
|
3
5
|
import boilerplates.logging
|
|
4
6
|
|
|
5
7
|
|
|
@@ -10,3 +12,5 @@ class TestsLogging(boilerplates.logging.Logging):
|
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
TestsLogging.configure()
|
|
15
|
+
|
|
16
|
+
logging.getLogger('boilerplates.bundled_version_query').setLevel(logging.WARNING)
|
|
@@ -231,3 +231,16 @@ class PackageTests(unittest.TestCase):
|
|
|
231
231
|
del Package.version
|
|
232
232
|
with self.assertRaises(FileNotFoundError):
|
|
233
233
|
Package.prepare()
|
|
234
|
+
|
|
235
|
+
def test_prepare_license_files(self):
|
|
236
|
+
# pylint: disable = protected-access
|
|
237
|
+
|
|
238
|
+
class Package(boilerplates.setup.Package):
|
|
239
|
+
name = 'package name'
|
|
240
|
+
version = '0.1.0'
|
|
241
|
+
|
|
242
|
+
self.assertIsNone(Package._existing_license_file_patterns)
|
|
243
|
+
Package.prepare()
|
|
244
|
+
self.assertIsNotNone(Package._existing_license_file_patterns)
|
|
245
|
+
assert Package._existing_license_file_patterns is not None
|
|
246
|
+
self.assertGreater(len(Package._existing_license_file_patterns), 0)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/__init__.py
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/git_query.py
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/parser.py
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/patterns.py
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/py.typed
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/py_query.py
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/query.py
RENAMED
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates/bundled_version_query/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boilerplates-1.1.4.dev1 → boilerplates-1.2.0.dev1}/boilerplates.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|