python-kacl 0.6.4__tar.gz → 0.6.5__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.
- {python_kacl-0.6.4/python_kacl.egg-info → python_kacl-0.6.5}/PKG-INFO +1 -1
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/__init__.py +1 -1
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/serializer.py +7 -2
- {python_kacl-0.6.4 → python_kacl-0.6.5/python_kacl.egg-info}/PKG-INFO +1 -1
- {python_kacl-0.6.4 → python_kacl-0.6.5}/python_kacl.egg-info/SOURCES.txt +0 -2
- {python_kacl-0.6.4 → python_kacl-0.6.5}/python_kacl.egg-info/entry_points.txt +1 -0
- python_kacl-0.6.5/python_kacl.egg-info/top_level.txt +1 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/setup.py +8 -3
- {python_kacl-0.6.4 → python_kacl-0.6.5}/tests/test_kacl.py +17 -8
- python_kacl-0.6.4/python_kacl.egg-info/top_level.txt +0 -2
- python_kacl-0.6.4/tests/__init__.py +0 -1
- python_kacl-0.6.4/tests/snapshot_directory.py +0 -42
- {python_kacl-0.6.4 → python_kacl-0.6.5}/LICENSE +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/MANIFEST.in +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/README.md +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/__main__.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/changes.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/config/kacl-default.yml +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/config.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/document.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/element.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/exception.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/jira_client.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/kacl_cli.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/link_provider.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/parser.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/utils.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/validation.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/kacl/version.py +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/python_kacl.egg-info/dependency_links.txt +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/python_kacl.egg-info/not-zip-safe +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/python_kacl.egg-info/requires.txt +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/setup.cfg +0 -0
- {python_kacl-0.6.4 → python_kacl-0.6.5}/tests/test_cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-kacl
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: Python module and CLI tool for validating and modifying Changelogs in "keep-a-changelog" format"
|
|
5
5
|
Home-page: https://gitlab.com/schmieder.matthias/python-kacl.git
|
|
6
6
|
Author: Matthias Schmieder
|
|
@@ -19,7 +19,11 @@ class KACLMarkdownSerializer:
|
|
|
19
19
|
data.extend(serialized_metadata)
|
|
20
20
|
|
|
21
21
|
data.append(self.__serialize_header(document.header()))
|
|
22
|
-
|
|
22
|
+
# check if the body starts with a newline. if not add one
|
|
23
|
+
if document.header().body().startswith("\n"):
|
|
24
|
+
data.append(document.header().body())
|
|
25
|
+
else:
|
|
26
|
+
data.append("\n" + document.header().body())
|
|
23
27
|
|
|
24
28
|
for version in document.versions():
|
|
25
29
|
data.extend([self.__serialize_version(version), ""])
|
|
@@ -67,11 +71,12 @@ class KACLMarkdownSerializer:
|
|
|
67
71
|
return f"# {obj.title()}"
|
|
68
72
|
|
|
69
73
|
def __serialize_version(self, obj):
|
|
70
|
-
lines = [self.__serialize_header(obj)]
|
|
74
|
+
lines = [self.__serialize_header(obj), ""]
|
|
71
75
|
for title, changes in obj.sections().items():
|
|
72
76
|
lines.extend(
|
|
73
77
|
[
|
|
74
78
|
self.__serialize_header(changes),
|
|
79
|
+
"",
|
|
75
80
|
self.__serialize_list(changes.items()),
|
|
76
81
|
"",
|
|
77
82
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-kacl
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: Python module and CLI tool for validating and modifying Changelogs in "keep-a-changelog" format"
|
|
5
5
|
Home-page: https://gitlab.com/schmieder.matthias/python-kacl.git
|
|
6
6
|
Author: Matthias Schmieder
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
kacl
|
|
@@ -11,7 +11,7 @@ this_directory = path.abspath(path.dirname(__file__))
|
|
|
11
11
|
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
|
|
12
12
|
long_description = f.read()
|
|
13
13
|
|
|
14
|
-
version = "0.6.
|
|
14
|
+
version = "0.6.5"
|
|
15
15
|
|
|
16
16
|
version = f"{version}{os.environ.get('PIP_VERSION_POSTFIX', '')}"
|
|
17
17
|
|
|
@@ -33,9 +33,14 @@ setup(
|
|
|
33
33
|
url="https://gitlab.com/schmieder.matthias/python-kacl.git",
|
|
34
34
|
author="Matthias Schmieder",
|
|
35
35
|
author_email="schmieder.matthias@gmail.com",
|
|
36
|
-
entry_points={
|
|
36
|
+
entry_points={
|
|
37
|
+
"console_scripts": [
|
|
38
|
+
"kacl-cli = kacl.kacl_cli:start",
|
|
39
|
+
"kacl = kacl.kacl_cli:start",
|
|
40
|
+
]
|
|
41
|
+
},
|
|
37
42
|
license="MIT",
|
|
38
|
-
packages=find_packages(),
|
|
43
|
+
packages=find_packages(exclude=["tests", "tests.*"]),
|
|
39
44
|
include_package_data=True,
|
|
40
45
|
python_requires=">=3.9",
|
|
41
46
|
install_requires=requirements,
|
|
@@ -45,6 +45,15 @@ class TestKacl(TestCase):
|
|
|
45
45
|
changelog_reference_lines = changelog_reference.split("\n")
|
|
46
46
|
|
|
47
47
|
self.assertEqual(len(changelog_dump_lines), len(changelog_reference_lines))
|
|
48
|
+
|
|
49
|
+
for i in range(len(changelog_dump_lines)):
|
|
50
|
+
if changelog_dump_lines[i] != changelog_reference_lines[i]:
|
|
51
|
+
print(
|
|
52
|
+
f"Line {i + 1} differs:\n"
|
|
53
|
+
f"Dump: {changelog_dump_lines[i]}\n"
|
|
54
|
+
f"Reference: {changelog_reference_lines[i]}"
|
|
55
|
+
)
|
|
56
|
+
|
|
48
57
|
self.assertEqual(changelog_dump, changelog_reference)
|
|
49
58
|
|
|
50
59
|
def test_add_change(self):
|
|
@@ -231,8 +240,8 @@ class TestKacl(TestCase):
|
|
|
231
240
|
def test_release_with_increment(self):
|
|
232
241
|
tests = {
|
|
233
242
|
"major": "2.0.0",
|
|
234
|
-
"minor": "1.
|
|
235
|
-
"patch": "1.
|
|
243
|
+
"minor": "1.2.0",
|
|
244
|
+
"patch": "1.1.2",
|
|
236
245
|
}
|
|
237
246
|
changelog_file = os.path.join(
|
|
238
247
|
os.path.dirname(os.path.realpath(__file__)), "data/CHANGELOG.md"
|
|
@@ -263,9 +272,9 @@ class TestKacl(TestCase):
|
|
|
263
272
|
def test_release_with_increment_extension(self):
|
|
264
273
|
tests = {
|
|
265
274
|
"major": "2.0.0",
|
|
266
|
-
"minor": "1.
|
|
267
|
-
"patch": "1.
|
|
268
|
-
"post": "1.
|
|
275
|
+
"minor": "1.2.0",
|
|
276
|
+
"patch": "1.1.2",
|
|
277
|
+
"post": "1.1.1-post.1",
|
|
269
278
|
}
|
|
270
279
|
changelog_file = os.path.join(
|
|
271
280
|
os.path.dirname(os.path.realpath(__file__)), "data/CHANGELOG.md"
|
|
@@ -285,9 +294,9 @@ class TestKacl(TestCase):
|
|
|
285
294
|
def test_release_with_increment_extension_hotfix(self):
|
|
286
295
|
tests = {
|
|
287
296
|
"major": "2.0.0",
|
|
288
|
-
"minor": "1.
|
|
289
|
-
"patch": "1.
|
|
290
|
-
"post": "1.
|
|
297
|
+
"minor": "1.2.0",
|
|
298
|
+
"patch": "1.1.2",
|
|
299
|
+
"post": "1.1.1-hotfix.1",
|
|
291
300
|
}
|
|
292
301
|
changelog_file = os.path.join(
|
|
293
302
|
os.path.dirname(os.path.realpath(__file__)), "data/CHANGELOG.md"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.51"
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def snapshot_directory(
|
|
6
|
-
snapshot,
|
|
7
|
-
directory_path,
|
|
8
|
-
dir_excludes=[".git"],
|
|
9
|
-
file_excludes=[],
|
|
10
|
-
sanitize_callbacks={},
|
|
11
|
-
):
|
|
12
|
-
snapshot_dir = {}
|
|
13
|
-
|
|
14
|
-
for root, dirs, files in os.walk(directory_path, topdown=True):
|
|
15
|
-
dirs[:] = [d for d in dirs if d not in dir_excludes]
|
|
16
|
-
|
|
17
|
-
for file in files:
|
|
18
|
-
if file in file_excludes:
|
|
19
|
-
continue
|
|
20
|
-
current = snapshot_dir
|
|
21
|
-
parts = Path(root).relative_to(directory_path).parts
|
|
22
|
-
for part in parts:
|
|
23
|
-
current = current.setdefault(part, {})
|
|
24
|
-
|
|
25
|
-
file_path = os.path.join(root, f"{file}")
|
|
26
|
-
if __is_binary(file_path):
|
|
27
|
-
content = open(file_path, "rb").read()
|
|
28
|
-
else:
|
|
29
|
-
content = open(file_path, "r").read()
|
|
30
|
-
|
|
31
|
-
if file in sanitize_callbacks:
|
|
32
|
-
callback = sanitize_callbacks[file]
|
|
33
|
-
content = callback(content)
|
|
34
|
-
|
|
35
|
-
current[f"{file}.snap"] = content
|
|
36
|
-
|
|
37
|
-
snapshot.assert_match_dir(snapshot_dir, "snapshots")
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def __is_binary(file_path):
|
|
41
|
-
textchars = bytearray({7, 8, 9, 10, 12, 13, 27} | set(range(0x20, 0x100)) - {0x7F})
|
|
42
|
-
return bool(open(file_path, "rb").read(1024).translate(None, textchars))
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|