python-kacl 0.6.6__py3-none-any.whl → 0.6.7__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.6.6"
2
+ __version__ = "0.6.7"
3
3
 
4
4
  from kacl.document import KACLDocument
5
5
  from kacl.serializer import KACLMarkdownSerializer
@@ -13,6 +13,8 @@ kacl:
13
13
  default_content:
14
14
  - All notable changes to this project will be documented in this file.
15
15
  - The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
16
+ release:
17
+ add_unreleased: True
16
18
  git:
17
19
  commit: False
18
20
  commit_message: "[skip ci] Releasing Changelog version {new_version}"
kacl/config.py CHANGED
@@ -20,6 +20,9 @@ class KACLConfig:
20
20
  self.allowed_header_titles = self.__config.get("allowed_header_titles")
21
21
  self.allowed_version_sections = self.__config.get("allowed_version_sections")
22
22
  self.default_content = self.__config.get("default_content")
23
+ self.add_unreleased = self.__config.get("release", {}).get(
24
+ "add_unreleased", True
25
+ )
23
26
  self.git_tag_name = self.__config.get("git", {}).get("tag_name")
24
27
  self.git_tag_description = self.__config.get("git", {}).get("tag_description")
25
28
  self.changelog_file_path = self.__config.get("file")
kacl/document.py CHANGED
@@ -430,13 +430,9 @@ class KACLDocument:
430
430
  # remove current unrelease version from list
431
431
  self.__versions.pop(0)
432
432
 
433
- self.__versions.insert(
434
- 0, KACLVersion(version="Unreleased", link=unreleased_version.link())
435
- )
436
-
437
433
  # convert unreleased version to version
438
434
  self.__versions.insert(
439
- 1,
435
+ 0,
440
436
  KACLVersion(
441
437
  version=version,
442
438
  link=KACLElement(title=version, body=link),
@@ -445,6 +441,11 @@ class KACLDocument:
445
441
  ),
446
442
  )
447
443
 
444
+ if self.config.add_unreleased:
445
+ self.__versions.insert(
446
+ 0, KACLVersion(version="Unreleased", link=unreleased_version.link())
447
+ )
448
+
448
449
  if auto_link:
449
450
  link_provider = self.__get_link_provider()
450
451
  for i in range(2):
kacl/kacl_cli.py CHANGED
@@ -150,10 +150,11 @@ def add(ctx, section, message, modify, stash):
150
150
 
151
151
  kacl_changelog_content = kacl.dump(kacl_changelog)
152
152
  # if stashing is enabled, do not modify the changelog file
153
- if modify and not stash:
154
- with open(kacl_changelog.config.changelog_file_path, "w") as f:
155
- f.write(kacl_changelog_content)
156
- f.close()
153
+ if modify:
154
+ if not stash:
155
+ with open(kacl_changelog.config.changelog_file_path, "w") as f:
156
+ f.write(kacl_changelog_content)
157
+ f.close()
157
158
  else:
158
159
  click.echo(kacl_changelog_content)
159
160
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-kacl
3
- Version: 0.6.6
3
+ Version: 0.6.7
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
@@ -355,8 +355,9 @@ kacl-cli get 0.2.2
355
355
  ```
356
356
  Usage: kacl-cli add [OPTIONS] SECTION MESSAGE
357
357
 
358
- Adds a given message to a specified unreleased section. Use '--modify' to
359
- directly modify the changelog file.
358
+ Adds a given message to a specified unreleased section. A new unreleased
359
+ section is added if it doesn't exist. Use '--modify' to directly modify
360
+ the changelog file.
360
361
 
361
362
  Options:
362
363
  -m, --modify This option will add the changes directly into changelog file
@@ -378,7 +379,9 @@ Usage: kacl-cli release [OPTIONS] VERSION
378
379
 
379
380
  Creates a release for the latest 'unreleased' changes. Use '--modify' to
380
381
  directly modify the changelog file. You can automatically use the latest
381
- version by using the version keywords 'major', 'minor', 'patch', 'post'
382
+ version by using the version keywords 'major', 'minor', 'patch', 'post'.
383
+ Creates a new empty unreleased section if not disabled in the configuration
384
+ file.
382
385
 
383
386
  Example:
384
387
 
@@ -866,6 +869,8 @@ kacl:
866
869
  default_content:
867
870
  - All notable changes to this project will be documented in this file.
868
871
  - The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
872
+ release:
873
+ add_unreleased: True
869
874
  git:
870
875
  commit: False
871
876
  commit_message: "[skip ci] Releasing Changelog version {new_version}"
@@ -919,6 +924,8 @@ kacl:
919
924
  | `git.tag` | boolean | `false` | Automatically create git tags during release |
920
925
  | `git.tag_name` | string | `"v{new_version}"` | Template for git tag names |
921
926
  | `git.tag_description` | string | `"Version v{new_version} released"` | Template for git tag descriptions |
927
+ | **Release Settings** | | | |
928
+ | `release.add_unreleased` | boolean | `true` | Automatically add new "Unreleased" section after release |
922
929
  | **Link Generation** | | | |
923
930
  | `links.auto_generate` | boolean | `false` | Automatically generate version links during release |
924
931
  | `links.compare_versions_template` | string | `"{host}/compare/{previous_version}...{version}"` | Template for version comparison links |
@@ -961,7 +968,7 @@ cd python-kacl
961
968
 
962
969
  # create a virtual env
963
970
  python3 -m venv .venv
964
- source ./venv/bin/activate
971
+ source ./.venv/bin/activate
965
972
 
966
973
  # install in development mode
967
974
  pip install -e .
@@ -1,22 +1,22 @@
1
- kacl/__init__.py,sha256=Xz1MhC4G8ciUa0ezKXgEEYqJkoUeonsA7neF8DS-bYg,667
1
+ kacl/__init__.py,sha256=LVMIQ2xATXmaQ0FdcE9sRrOy2X7w-s6DKQHtZgSLNpA,667
2
2
  kacl/__main__.py,sha256=cpulIGoFUJNN5ZW9oUoNN1PnBvrOyJ24xwtpf_yRwgQ,91
3
3
  kacl/changes.py,sha256=Speu1KLMNQVn0U2BMaO8ta4IEaQLTQtpW0IhN0JjGdY,704
4
- kacl/config.py,sha256=mUPm4W0cW7kvwYG4L20B38V-AvguvD6jvIQtZDO5mPY,4129
5
- kacl/document.py,sha256=OuVjqSEUTxvO6tiCWggQiNebfjoTwQyIuqlT2y_V9Yc,28712
4
+ kacl/config.py,sha256=c2QiP-BriJJwzrw36oigJWKe6t4o6yhmN_nPSL6bcRk,4242
5
+ kacl/document.py,sha256=oNnxlXWEh4yfqK4dK8xhzjWrUPHbUizEj_PQhP73poQ,28763
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
9
- kacl/kacl_cli.py,sha256=SnukzW96DjlPunZ5WOUxlPAsjUI-dg3iMeV1y9pyxKg,22156
9
+ kacl/kacl_cli.py,sha256=RshCxLhh5YJa6tzl8f5dnLOYF3Kbl-EDD4m21hIJDPw,22176
10
10
  kacl/link_provider.py,sha256=tgvMYhJe2ErH1m_qXMlQEacq9Cg_KGp_-sF03sVFP6E,1866
11
11
  kacl/parser.py,sha256=EUtRjgaW0beWVqiYaRJ9Rcf6jbuGoTgWzVBdOdUHnv8,2587
12
12
  kacl/serializer.py,sha256=PdR2FFCh9rbBhkxXwUYD0fSjQqTG_Mb6mYws3lNAWQ8,3090
13
13
  kacl/utils.py,sha256=bHiDDmjoYB868Bm732vNjpfML-6xcNQQqS7NQn_Sfm0,2824
14
14
  kacl/validation.py,sha256=b9r_5CyY6Cmi9BePh47IgZ3j64zdVsoB_fFvucieNbw,2125
15
15
  kacl/version.py,sha256=IDYCWIIXzxdYyMptUAidMgf0SXJqoETFVJ8NVyKgA9A,9526
16
- kacl/config/kacl-default.yml,sha256=KGOLn-BKj_8J0F3nBpSjH8ywdCjQQelhdDOKZ1pOy_Q,1477
17
- python_kacl-0.6.6.dist-info/licenses/LICENSE,sha256=TRSJOIt7LZuMeZXFleJVL_LHczSxqi70HEiTLT-kI8Q,1075
18
- python_kacl-0.6.6.dist-info/METADATA,sha256=OZ-3KPX7dyJYFyO_kBdHuwsI6pLJlNhZS3rWWPVcJa0,37608
19
- python_kacl-0.6.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- python_kacl-0.6.6.dist-info/entry_points.txt,sha256=rXqqJKfm6Y7fYfioq_7ay2VWOOM9C-hts1IsoGTtojM,76
21
- python_kacl-0.6.6.dist-info/top_level.txt,sha256=BcmQgo67JyGnVZ3Jc0Ag8hKMGVOqXc8ex01zW4Njw5M,5
22
- python_kacl-0.6.6.dist-info/RECORD,,
16
+ kacl/config/kacl-default.yml,sha256=cXHl_w04SW0HA7OyJMMuaC6DTeXlhI2Sfsx7lygTPf4,1513
17
+ python_kacl-0.6.7.dist-info/licenses/LICENSE,sha256=TRSJOIt7LZuMeZXFleJVL_LHczSxqi70HEiTLT-kI8Q,1075
18
+ python_kacl-0.6.7.dist-info/METADATA,sha256=WXFDjyEQ1jS_sJyzfcHgx3wfq9OijduqLo1KYSkYpXY,38157
19
+ python_kacl-0.6.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ python_kacl-0.6.7.dist-info/entry_points.txt,sha256=rXqqJKfm6Y7fYfioq_7ay2VWOOM9C-hts1IsoGTtojM,76
21
+ python_kacl-0.6.7.dist-info/top_level.txt,sha256=BcmQgo67JyGnVZ3Jc0Ag8hKMGVOqXc8ex01zW4Njw5M,5
22
+ python_kacl-0.6.7.dist-info/RECORD,,