python-kacl 0.7.3__py3-none-any.whl → 0.7.4__py3-none-any.whl

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.
kacl/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
1
  # Version of the python-kacl package
2
- __version__ = "0.7.3"
2
+ __version__ = "0.7.4"
3
3
 
4
4
  from kacl.document import KACLDocument
5
5
  from kacl.serializer import KACLMarkdownSerializer
kacl/document.py CHANGED
@@ -30,7 +30,7 @@ class KACLDocument:
30
30
  link_references=None,
31
31
  meta_data=None,
32
32
  file_path=None,
33
- config=KACLConfig(),
33
+ config=None,
34
34
  ):
35
35
  self.__data = data
36
36
  self.__headers = headers if headers else []
@@ -39,7 +39,7 @@ class KACLDocument:
39
39
  if not self.__link_references:
40
40
  self.__link_references = dict()
41
41
  self.__meta_data = meta_data
42
- self.config = config
42
+ self.config = config if config is not None else KACLConfig()
43
43
  self.stash = []
44
44
  self.file_path = file_path
45
45
 
@@ -82,6 +82,9 @@ class KACLDocument:
82
82
  data = fh.read()
83
83
  try:
84
84
  doc = KACLDocument.parse(data, None)
85
+ # stash documents must be validated against the same
86
+ # config as the changelog they belong to
87
+ doc.config = self.config
85
88
  self.stash.append(doc)
86
89
  except Exception:
87
90
  continue
@@ -205,7 +208,7 @@ class KACLDocument:
205
208
  try:
206
209
  v0 = versions[i]
207
210
  v1 = versions[i + 1]
208
- if semver.compare(v0.version(), v1.version()) < 1:
211
+ if semver.Version.parse(v0.version()).compare(v1.version()) < 1:
209
212
  validation.add_error(
210
213
  line=v1.raw(),
211
214
  line_number=v1.line_number(),
@@ -619,7 +622,12 @@ class KACLDocument:
619
622
  versions[i].set_link(link_provider.unreleased_changes(**fargs))
620
623
  else:
621
624
  versions[i].set_link(link_provider.compare_versions(**fargs))
622
- versions[-1].set_link(link_provider.initial_version(**fargs))
625
+ versions[-1].set_link(
626
+ link_provider.initial_version(
627
+ version=versions[-1].version(),
628
+ latest_version=self.current_version(),
629
+ )
630
+ )
623
631
  elif len(versions) == 1:
624
632
  fargs = {
625
633
  "version": versions[0].version(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-kacl
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: Python module and CLI tool for validating and modifying Changelogs in "keep-a-changelog" format"
5
5
  Author-email: Matthias Schmieder <schmieder.matthias@gmail.com>
6
6
  License: MIT
@@ -1,8 +1,8 @@
1
- kacl/__init__.py,sha256=OmXywkfL0JxSqAAoG4DZ_BzNupOZLCJp-KHxeKCpahU,667
1
+ kacl/__init__.py,sha256=nnerstRMbRV15Yzvsk9DPZlAbVvFmuCI5ff5Zogv_pc,667
2
2
  kacl/__main__.py,sha256=cpulIGoFUJNN5ZW9oUoNN1PnBvrOyJ24xwtpf_yRwgQ,91
3
3
  kacl/changes.py,sha256=Speu1KLMNQVn0U2BMaO8ta4IEaQLTQtpW0IhN0JjGdY,704
4
4
  kacl/config.py,sha256=c2QiP-BriJJwzrw36oigJWKe6t4o6yhmN_nPSL6bcRk,4242
5
- kacl/document.py,sha256=w0NxB06PeFS-EnN6YVLTVbQyT7ffn7swOigWmEmfq7c,31036
5
+ kacl/document.py,sha256=RtkIDx4eEQIerLkj1khIvLmAp2PdeAMnCEW47euXa9M,31424
6
6
  kacl/element.py,sha256=OG02QI8ND5fJpBMceT6dbIHr4uX9gLxK_fPCsOvMDHI,416
7
7
  kacl/exception.py,sha256=MfOVpUvhcQtm10rSY__74-oLo445PG8mLFGJPPIfXH0,41
8
8
  kacl/jira_client.py,sha256=KPE94bZDkJFKw3okFsCgf2DjoyMlUUTMZKtQGKreVQY,989
@@ -14,9 +14,9 @@ kacl/utils.py,sha256=4iWIJVNtv22v0IGXDjuEATPMQsJBr5Ycy9Q2zV2jkHE,2835
14
14
  kacl/validation.py,sha256=b9r_5CyY6Cmi9BePh47IgZ3j64zdVsoB_fFvucieNbw,2125
15
15
  kacl/version.py,sha256=IDYCWIIXzxdYyMptUAidMgf0SXJqoETFVJ8NVyKgA9A,9526
16
16
  kacl/config/kacl-default.yml,sha256=cXHl_w04SW0HA7OyJMMuaC6DTeXlhI2Sfsx7lygTPf4,1513
17
- python_kacl-0.7.3.dist-info/licenses/LICENSE,sha256=TRSJOIt7LZuMeZXFleJVL_LHczSxqi70HEiTLT-kI8Q,1075
18
- python_kacl-0.7.3.dist-info/METADATA,sha256=6__BT5lJYFoJxk5bRXMCaBo4Oiybjvr3JoV_csc7Ynk,42453
19
- python_kacl-0.7.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
20
- python_kacl-0.7.3.dist-info/entry_points.txt,sha256=rXqqJKfm6Y7fYfioq_7ay2VWOOM9C-hts1IsoGTtojM,76
21
- python_kacl-0.7.3.dist-info/top_level.txt,sha256=BcmQgo67JyGnVZ3Jc0Ag8hKMGVOqXc8ex01zW4Njw5M,5
22
- python_kacl-0.7.3.dist-info/RECORD,,
17
+ python_kacl-0.7.4.dist-info/licenses/LICENSE,sha256=TRSJOIt7LZuMeZXFleJVL_LHczSxqi70HEiTLT-kI8Q,1075
18
+ python_kacl-0.7.4.dist-info/METADATA,sha256=oUDaurtowv1UTAOj5UX56gj02_LepuwhzEb7Q0xporA,42453
19
+ python_kacl-0.7.4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
20
+ python_kacl-0.7.4.dist-info/entry_points.txt,sha256=rXqqJKfm6Y7fYfioq_7ay2VWOOM9C-hts1IsoGTtojM,76
21
+ python_kacl-0.7.4.dist-info/top_level.txt,sha256=BcmQgo67JyGnVZ3Jc0Ag8hKMGVOqXc8ex01zW4Njw5M,5
22
+ python_kacl-0.7.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (82.0.1)
2
+ Generator: setuptools (84.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5