quickpub 2.0.1__tar.gz → 2.0.3__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.
- {quickpub-2.0.1/quickpub.egg-info → quickpub-2.0.3}/PKG-INFO +8 -9
- {quickpub-2.0.1 → quickpub-2.0.3}/README.md +7 -8
- {quickpub-2.0.1 → quickpub-2.0.3}/pyproject.toml +2 -2
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/__main__.py +4 -40
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/build_schemas/setuptools_build_schema.py +8 -2
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/constraint_enforcers/pypi_remote_version_enforcer.py +3 -3
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/constraint_enforcers/pypirc_enforcer.py +1 -1
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/python_providers/default_python_provider.py +1 -1
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/quality_assurance_runners/pylint_qa_runner.py +6 -2
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/quality_assurance_runners/pytest_qa_runner.py +3 -2
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/quality_assurance_runners/unittest_qa_runner.py +12 -1
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/quality_assurance_runner.py +14 -2
- {quickpub-2.0.1 → quickpub-2.0.3/quickpub.egg-info}/PKG-INFO +8 -9
- quickpub-2.0.3/quickpub.egg-info/requires.txt +2 -0
- quickpub-2.0.1/quickpub.egg-info/requires.txt +0 -2
- {quickpub-2.0.1 → quickpub-2.0.3}/LICENSE +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/MANIFEST.in +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/classifiers.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/enforcers.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/files.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/functions.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/proxy.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/py.typed +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/qa.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/build_schema.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/constraint_enforcer.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/build_schemas/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/constraint_enforcers/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/constraint_enforcers/license_enforcer.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/constraint_enforcers/local_version_enforcer.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/constraint_enforcers/readme_enforcer.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/python_providers/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/python_providers/conda_python_provider.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/quality_assurance_runners/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/quality_assurance_runners/mypy_qa_runner.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/upload_targets/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/upload_targets/github_upload_target.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/upload_targets/pypirc_upload_target.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/python_provider.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/quickpub_strategy.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/upload_target.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/structures/__init__.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/structures/bound.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/structures/dependency.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/structures/version.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub/validators.py +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub.egg-info/SOURCES.txt +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub.egg-info/dependency_links.txt +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/quickpub.egg-info/top_level.txt +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/setup.cfg +0 -0
- {quickpub-2.0.1 → quickpub-2.0.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: quickpub
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: A python package to quickly configure and publish a new package
|
|
5
5
|
Author-email: danielnachumdev <danielnachumdev@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -34,21 +34,21 @@ Requires-Python: >=3.8.0
|
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
36
|
|
|
37
|
-
# quickpub
|
|
37
|
+
# quickpub V2.0.2
|
|
38
38
|
**Tested python versions**: `3.8.0`, `3.9.0`, `3.10.13`,
|
|
39
39
|
|
|
40
40
|
Example usage of how this package was published
|
|
41
41
|
|
|
42
42
|
```python
|
|
43
|
-
from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider,
|
|
44
|
-
PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer,
|
|
43
|
+
from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider, \
|
|
44
|
+
PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer, \
|
|
45
45
|
PypiRemoteVersionEnforcer, LocalVersionEnforcer
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
def main() -> None:
|
|
49
49
|
publish(
|
|
50
50
|
name="quickpub",
|
|
51
|
-
version="
|
|
51
|
+
version="2.0.2",
|
|
52
52
|
author="danielnachumdev",
|
|
53
53
|
author_email="danielnachumdev@gmail.com",
|
|
54
54
|
description="A python package to quickly configure and publish a new package",
|
|
@@ -61,13 +61,12 @@ def main() -> None:
|
|
|
61
61
|
upload_targets=[PypircUploadTarget(), GithubUploadTarget()],
|
|
62
62
|
python_interpreter_provider=CondaPythonProvider(["base", "390", "380"]),
|
|
63
63
|
global_quality_assurance_runners=[
|
|
64
|
-
MypyRunner(bound="<=
|
|
64
|
+
MypyRunner(bound="<=20", configuration_path="./mypy.ini"),
|
|
65
65
|
PylintRunner(bound=">=0.8", configuration_path="./.pylintrc"),
|
|
66
|
-
UnittestRunner(bound=">=0.
|
|
66
|
+
UnittestRunner(bound=">=0.95"),
|
|
67
67
|
],
|
|
68
|
-
dependencies=["danielutils>=0.9.
|
|
68
|
+
dependencies=["danielutils>=0.9.94", "requests"],
|
|
69
69
|
min_python="3.8.0",
|
|
70
|
-
demo=True
|
|
71
70
|
)
|
|
72
71
|
|
|
73
72
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# quickpub
|
|
1
|
+
# quickpub V2.0.2
|
|
2
2
|
**Tested python versions**: `3.8.0`, `3.9.0`, `3.10.13`,
|
|
3
3
|
|
|
4
4
|
Example usage of how this package was published
|
|
5
5
|
|
|
6
6
|
```python
|
|
7
|
-
from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider,
|
|
8
|
-
PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer,
|
|
7
|
+
from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider, \
|
|
8
|
+
PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer, \
|
|
9
9
|
PypiRemoteVersionEnforcer, LocalVersionEnforcer
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def main() -> None:
|
|
13
13
|
publish(
|
|
14
14
|
name="quickpub",
|
|
15
|
-
version="
|
|
15
|
+
version="2.0.2",
|
|
16
16
|
author="danielnachumdev",
|
|
17
17
|
author_email="danielnachumdev@gmail.com",
|
|
18
18
|
description="A python package to quickly configure and publish a new package",
|
|
@@ -25,13 +25,12 @@ def main() -> None:
|
|
|
25
25
|
upload_targets=[PypircUploadTarget(), GithubUploadTarget()],
|
|
26
26
|
python_interpreter_provider=CondaPythonProvider(["base", "390", "380"]),
|
|
27
27
|
global_quality_assurance_runners=[
|
|
28
|
-
MypyRunner(bound="<=
|
|
28
|
+
MypyRunner(bound="<=20", configuration_path="./mypy.ini"),
|
|
29
29
|
PylintRunner(bound=">=0.8", configuration_path="./.pylintrc"),
|
|
30
|
-
UnittestRunner(bound=">=0.
|
|
30
|
+
UnittestRunner(bound=">=0.95"),
|
|
31
31
|
],
|
|
32
|
-
dependencies=["danielutils>=0.9.
|
|
32
|
+
dependencies=["danielutils>=0.9.94", "requests"],
|
|
33
33
|
min_python="3.8.0",
|
|
34
|
-
demo=True
|
|
35
34
|
)
|
|
36
35
|
|
|
37
36
|
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "quickpub"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.3"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name = "danielnachumdev", email = "danielnachumdev@gmail.com" },
|
|
10
10
|
]
|
|
11
|
-
dependencies = ['danielutils>=0.
|
|
11
|
+
dependencies = ['danielutils>=1.0.0', 'requests']
|
|
12
12
|
keywords = []
|
|
13
13
|
license = { "file" = "./LICENSE" }
|
|
14
14
|
description = "A python package to quickly configure and publish a new package"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import argparse
|
|
2
1
|
from typing import Optional, Union, List, Any
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
import fire
|
|
4
|
+
from danielutils import warning, error
|
|
4
5
|
|
|
5
6
|
from .strategies import BuildSchema, ConstraintEnforcer, UploadTarget, QualityAssuranceRunner, PythonProvider, \
|
|
6
7
|
DefaultPythonProvider
|
|
@@ -120,42 +121,5 @@ def publish(
|
|
|
120
121
|
target.upload(name=name, version=version)
|
|
121
122
|
|
|
122
123
|
|
|
123
|
-
def parse_args():
|
|
124
|
-
parser = argparse.ArgumentParser(description="Publish a package")
|
|
125
|
-
|
|
126
|
-
parser.add_argument('--name', required=True, type=str, help='Name of the package')
|
|
127
|
-
parser.add_argument('--author', required=True, type=str, help='Author of the package')
|
|
128
|
-
parser.add_argument('--author_email', required=True, type=str, help='Email of the author')
|
|
129
|
-
parser.add_argument('--description', required=True, type=str, help='Description of the package')
|
|
130
|
-
parser.add_argument('--homepage', required=True, type=str, help='Homepage of the package')
|
|
131
|
-
parser.add_argument('--explicit_src_folder_path', type=str, help='Explicit source folder path')
|
|
132
|
-
parser.add_argument('--version', type=str, help='Version of the package')
|
|
133
|
-
parser.add_argument('--readme_file_path', type=str, default='./README.md', help='Path to the README file')
|
|
134
|
-
parser.add_argument('--license_file_path', type=str, default='./LICENSE', help='Path to the LICENSE file')
|
|
135
|
-
parser.add_argument('--min_python', type=str, help='Minimum Python version required')
|
|
136
|
-
parser.add_argument('--keywords', nargs='*', help='Keywords for the package')
|
|
137
|
-
parser.add_argument('--dependencies', nargs='*', help='Dependencies of the package')
|
|
138
|
-
parser.add_argument('--config', help='Additional configuration for the package')
|
|
139
|
-
|
|
140
|
-
return parser.parse_args()
|
|
141
|
-
|
|
142
|
-
|
|
143
124
|
if __name__ == '__main__':
|
|
144
|
-
|
|
145
|
-
# args = parse_args()
|
|
146
|
-
#
|
|
147
|
-
# publish(
|
|
148
|
-
# name=args.name,
|
|
149
|
-
# author=args.author,
|
|
150
|
-
# author_email=args.author_email,
|
|
151
|
-
# description=args.description,
|
|
152
|
-
# homepage=args.homepage,
|
|
153
|
-
# explicit_src_folder_path=args.explicit_src_folder_path,
|
|
154
|
-
# version=args.version,
|
|
155
|
-
# readme_file_path=args.readme_file_path,
|
|
156
|
-
# license_file_path=args.license_file_path,
|
|
157
|
-
# min_python=args.min_python,
|
|
158
|
-
# keywords=args.keywords,
|
|
159
|
-
# dependencies=args.dependencies,
|
|
160
|
-
# config=args.config
|
|
161
|
-
# )
|
|
125
|
+
fire.Fire(publish)
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
from pathlib import Path
|
|
1
4
|
from typing import Literal
|
|
2
5
|
|
|
3
|
-
from danielutils import info, file_exists, LayeredCommand
|
|
6
|
+
from danielutils import info, file_exists, LayeredCommand, delete_file
|
|
4
7
|
|
|
5
8
|
from ...build_schema import BuildSchema
|
|
6
9
|
|
|
@@ -15,8 +18,11 @@ class SetuptoolsBuildSchema(BuildSchema):
|
|
|
15
18
|
raise self.EXCEPTION_TYPE(f"Could not find {self._setup_file_path} file")
|
|
16
19
|
if verbose:
|
|
17
20
|
info("Creating new distribution...")
|
|
21
|
+
sources_file_path: str = str(os.path.join(
|
|
22
|
+
str(Path(self._setup_file_path).parent.resolve()), "quickpub.egg-info/SOURCES.txt"))
|
|
23
|
+
delete_file(sources_file_path)
|
|
18
24
|
with LayeredCommand() as exc:
|
|
19
|
-
ret, stdout, stderr = exc("
|
|
25
|
+
ret, stdout, stderr = exc(sys.executable + " " + self._setup_file_path + " sdist")
|
|
20
26
|
if ret != 0:
|
|
21
27
|
raise self.EXCEPTION_TYPE(stderr)
|
|
22
28
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from danielutils import RetryExecutor,
|
|
1
|
+
from danielutils import RetryExecutor, MultiplicativeBackoff, ConstantBackOffStrategy
|
|
2
2
|
from requests import Response
|
|
3
3
|
|
|
4
|
-
from proxy import get # type: ignore
|
|
4
|
+
from quickpub.proxy import get # type: ignore
|
|
5
5
|
from quickpub import Version
|
|
6
6
|
from ...constraint_enforcer import ConstraintEnforcer
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ class PypiRemoteVersionEnforcer(ConstraintEnforcer):
|
|
|
14
14
|
return
|
|
15
15
|
url = f"https://pypi.org/project/{name}/"
|
|
16
16
|
|
|
17
|
-
timeout_strategy =
|
|
17
|
+
timeout_strategy = MultiplicativeBackoff(2)
|
|
18
18
|
|
|
19
19
|
def wrapper() -> Response:
|
|
20
20
|
return get(url, timeout=timeout_strategy.get_backoff())
|
|
@@ -14,7 +14,7 @@ class DefaultPythonProvider(PythonProvider):
|
|
|
14
14
|
PythonProvider.__init__(self, requested_envs=["system"], explicit_versions=[], exit_on_fail=True)
|
|
15
15
|
|
|
16
16
|
def __iter__(self) -> Iterator[Tuple[str, LayeredCommand]]:
|
|
17
|
-
return iter([("system", LayeredCommand(
|
|
17
|
+
return iter([("system", LayeredCommand())])
|
|
18
18
|
|
|
19
19
|
@classmethod
|
|
20
20
|
def _get_available_envs_impl(cls) -> Set[str]:
|
|
@@ -27,8 +27,12 @@ class PylintRunner(QualityAssuranceRunner):
|
|
|
27
27
|
|
|
28
28
|
def _calculate_score(self, ret: int, lines: List[str], verbose: bool = False) -> float:
|
|
29
29
|
from quickpub.enforcers import exit_if
|
|
30
|
-
if len(lines) ==
|
|
31
|
-
|
|
30
|
+
if len(lines) == 0:
|
|
31
|
+
return 1
|
|
32
|
+
if len(lines) == 1:
|
|
33
|
+
if lines[0].endswith("No module named pylint"):
|
|
34
|
+
raise SystemExit("No module named pylint found")
|
|
35
|
+
raise SystemExit("Got an unexpected error!")
|
|
32
36
|
index = -2
|
|
33
37
|
if lines[-1] == '\x1b[0m':
|
|
34
38
|
index += -1
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
|
+
import sys
|
|
2
3
|
from typing import List, Union
|
|
3
4
|
|
|
4
5
|
from danielutils import LayeredCommand
|
|
@@ -58,7 +59,7 @@ class PytestRunner(QualityAssuranceRunner):
|
|
|
58
59
|
if self.has_config:
|
|
59
60
|
#TODO
|
|
60
61
|
assert False
|
|
61
|
-
return f"
|
|
62
|
+
return f"{sys.executable} -m pytest {self.target}"
|
|
62
63
|
|
|
63
64
|
def _install_dependencies(self, base: LayeredCommand) -> None:
|
|
64
65
|
"""
|
|
@@ -67,7 +68,7 @@ class PytestRunner(QualityAssuranceRunner):
|
|
|
67
68
|
:param base: The base LayeredCommand object for executing commands.
|
|
68
69
|
"""
|
|
69
70
|
with base:
|
|
70
|
-
base("pip install pytest")
|
|
71
|
+
base(f"{sys.executable} -m pip install pytest")
|
|
71
72
|
|
|
72
73
|
def _calculate_score(self, ret: int, command_output: List[str], *, verbose: bool = False) -> float:
|
|
73
74
|
"""
|
|
@@ -6,6 +6,17 @@ from danielutils import get_current_working_directory, set_current_working_direc
|
|
|
6
6
|
from ...quality_assurance_runner import QualityAssuranceRunner
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
def _removesuffix(string: str, suffix: str) -> str:
|
|
10
|
+
"""Remove a suffix from a string.
|
|
11
|
+
|
|
12
|
+
Replace this with str.removesuffix() from stdlib when minimum Python
|
|
13
|
+
version is 3.9.
|
|
14
|
+
"""
|
|
15
|
+
if suffix and string.endswith(suffix):
|
|
16
|
+
return string[: -len(suffix)]
|
|
17
|
+
return string
|
|
18
|
+
|
|
19
|
+
|
|
9
20
|
class UnittestRunner(QualityAssuranceRunner):
|
|
10
21
|
NUM_TESTS_PATTERN: re.Pattern = re.compile(r"Ran (\d+) tests? in \d+\.\d+s")
|
|
11
22
|
NUM_FAILED_PATTERN: re.Pattern = re.compile(r"FAILED \((?:failures=(\d+))?(?:, )?(?:errors=(\d+))?\)")
|
|
@@ -30,7 +41,7 @@ class UnittestRunner(QualityAssuranceRunner):
|
|
|
30
41
|
|
|
31
42
|
def _build_command(self, src: str, *args, use_system_interpreter: bool = False) -> str:
|
|
32
43
|
command: str = self.get_executable()
|
|
33
|
-
rel = os.path.relpath(src, self.target)
|
|
44
|
+
rel = _removesuffix(os.path.relpath(src, self.target), src.lstrip("./\\"))
|
|
34
45
|
command += f" discover -s {rel}"
|
|
35
46
|
return command # f"cd {self.target}; {command}" # f"; cd {self.target}"
|
|
36
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
from abc import abstractmethod
|
|
3
|
-
from typing import Union, List, Optional, cast
|
|
3
|
+
from typing import Union, List, Optional, cast, Dict, Tuple
|
|
4
4
|
from danielutils import LayeredCommand, get_os, OSType, file_exists
|
|
5
5
|
|
|
6
6
|
from quickpub import Bound
|
|
@@ -19,7 +19,7 @@ class Configurable:
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class HasOptionalExecutable:
|
|
22
|
-
PYTHON: str =
|
|
22
|
+
PYTHON: str = sys.executable
|
|
23
23
|
|
|
24
24
|
@property
|
|
25
25
|
def use_executable(self) -> bool:
|
|
@@ -45,6 +45,13 @@ class HasOptionalExecutable:
|
|
|
45
45
|
from typing import Optional, Union, List
|
|
46
46
|
from abc import abstractmethod
|
|
47
47
|
|
|
48
|
+
SPEICLA_EXIT_CODES: Dict[int, Tuple[str, str]] = {
|
|
49
|
+
-1073741515: ("Can't find python in path.",
|
|
50
|
+
"Executing command '{command}' failed with exit code {ret} which in hex is {hex} which corresponds to STATUS_DLL_NOT_FOUND"),
|
|
51
|
+
3221225781: ("Can't find python in path.",
|
|
52
|
+
"Executing command '{command}' failed with exit code {ret} which in hex is {hex} which corresponds to STATUS_DLL_NOT_FOUND")
|
|
53
|
+
}
|
|
54
|
+
|
|
48
55
|
|
|
49
56
|
class QualityAssuranceRunner(Configurable, HasOptionalExecutable):
|
|
50
57
|
"""
|
|
@@ -139,6 +146,11 @@ class QualityAssuranceRunner(Configurable, HasOptionalExecutable):
|
|
|
139
146
|
self._pre_command()
|
|
140
147
|
try:
|
|
141
148
|
ret, out, err = executor(command, command_raise_on_fail=False)
|
|
149
|
+
if ret in SPEICLA_EXIT_CODES:
|
|
150
|
+
title, explanation = SPEICLA_EXIT_CODES[ret]
|
|
151
|
+
unsigned_integer_ret = ret + 2 ** 32
|
|
152
|
+
raise RuntimeError(
|
|
153
|
+
title + "\n\t" + explanation.format(command=command, ret=ret, hex=hex(unsigned_integer_ret)))
|
|
142
154
|
score = self._calculate_score(ret, "".join(out + err).splitlines(), verbose=verbose)
|
|
143
155
|
exit_if(not self.bound.compare_against(score),
|
|
144
156
|
f"On env '{env_name}' runner '{self.__class__.__name__}' failed to pass its defined bound. Got a score of {score} but expected {self.bound}",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: quickpub
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: A python package to quickly configure and publish a new package
|
|
5
5
|
Author-email: danielnachumdev <danielnachumdev@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -34,21 +34,21 @@ Requires-Python: >=3.8.0
|
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
36
|
|
|
37
|
-
# quickpub
|
|
37
|
+
# quickpub V2.0.2
|
|
38
38
|
**Tested python versions**: `3.8.0`, `3.9.0`, `3.10.13`,
|
|
39
39
|
|
|
40
40
|
Example usage of how this package was published
|
|
41
41
|
|
|
42
42
|
```python
|
|
43
|
-
from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider,
|
|
44
|
-
PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer,
|
|
43
|
+
from quickpub import publish, MypyRunner, PylintRunner, UnittestRunner, CondaPythonProvider, \
|
|
44
|
+
PypircUploadTarget, SetuptoolsBuildSchema, GithubUploadTarget, PypircEnforcer, ReadmeEnforcer, LicenseEnforcer, \
|
|
45
45
|
PypiRemoteVersionEnforcer, LocalVersionEnforcer
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
def main() -> None:
|
|
49
49
|
publish(
|
|
50
50
|
name="quickpub",
|
|
51
|
-
version="
|
|
51
|
+
version="2.0.2",
|
|
52
52
|
author="danielnachumdev",
|
|
53
53
|
author_email="danielnachumdev@gmail.com",
|
|
54
54
|
description="A python package to quickly configure and publish a new package",
|
|
@@ -61,13 +61,12 @@ def main() -> None:
|
|
|
61
61
|
upload_targets=[PypircUploadTarget(), GithubUploadTarget()],
|
|
62
62
|
python_interpreter_provider=CondaPythonProvider(["base", "390", "380"]),
|
|
63
63
|
global_quality_assurance_runners=[
|
|
64
|
-
MypyRunner(bound="<=
|
|
64
|
+
MypyRunner(bound="<=20", configuration_path="./mypy.ini"),
|
|
65
65
|
PylintRunner(bound=">=0.8", configuration_path="./.pylintrc"),
|
|
66
|
-
UnittestRunner(bound=">=0.
|
|
66
|
+
UnittestRunner(bound=">=0.95"),
|
|
67
67
|
],
|
|
68
|
-
dependencies=["danielutils>=0.9.
|
|
68
|
+
dependencies=["danielutils>=0.9.94", "requests"],
|
|
69
69
|
min_python="3.8.0",
|
|
70
|
-
demo=True
|
|
71
70
|
)
|
|
72
71
|
|
|
73
72
|
|
|
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
|
{quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/build_schemas/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/python_providers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quickpub-2.0.1 → quickpub-2.0.3}/quickpub/strategies/implementations/upload_targets/__init__.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|