tinysemver 2.1.0__tar.gz → 2.1.1__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.
- {tinysemver-2.1.0/tinysemver.egg-info → tinysemver-2.1.1}/PKG-INFO +1 -1
- {tinysemver-2.1.0 → tinysemver-2.1.1}/pyproject.toml +1 -1
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver/tinysemver.py +17 -15
- {tinysemver-2.1.0 → tinysemver-2.1.1/tinysemver.egg-info}/PKG-INFO +1 -1
- {tinysemver-2.1.0 → tinysemver-2.1.1}/LICENSE +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/README.md +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/setup.cfg +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver/__init__.py +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver.egg-info/SOURCES.txt +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver.egg-info/dependency_links.txt +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver.egg-info/entry_points.txt +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver.egg-info/requires.txt +0 -0
- {tinysemver-2.1.0 → tinysemver-2.1.1}/tinysemver.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinysemver
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Semantic-Versioning with LLMs and without 300,000 lines of JS
|
|
5
5
|
Author-email: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com>, Guillaume de Rouville <31691250+grouville@users.noreply.github.com>
|
|
6
6
|
License: Apache License
|
|
@@ -15,7 +15,7 @@ Example:
|
|
|
15
15
|
--minor-verbs 'feature,minor,add,new' \
|
|
16
16
|
--patch-verbs 'fix,patch,bug,improve,docs,make' \
|
|
17
17
|
--changelog-file 'CHANGELOG.md' \
|
|
18
|
-
--guide-file '
|
|
18
|
+
--guide-file 'CONTRIBUTING.md' \
|
|
19
19
|
--version-file 'VERSION' \
|
|
20
20
|
--update-version-in 'package.json' '"version": "(.*)"' \
|
|
21
21
|
--update-version-in 'CITATION.cff' '^version: (.*)' \
|
|
@@ -479,7 +479,7 @@ def aggregate_release_notes_with_llms(
|
|
|
479
479
|
You are a release notes generator for an advanced software project.
|
|
480
480
|
|
|
481
481
|
Aggregate the release notes for the upcoming version based on the commits and their
|
|
482
|
-
changes replying in a
|
|
482
|
+
changes replying in a GitHub-flavored Markdown format.
|
|
483
483
|
|
|
484
484
|
- Mention the new features, improvements, and bug fixes.
|
|
485
485
|
- Warn about potential breaking changes and vulnerabilities.
|
|
@@ -494,6 +494,8 @@ def aggregate_release_notes_with_llms(
|
|
|
494
494
|
```
|
|
495
495
|
|
|
496
496
|
- Use alerting quotes, like: [!CAUTION] or [!TIP], when needed.
|
|
497
|
+
|
|
498
|
+
Most importantly, be concise and informative.
|
|
497
499
|
"""
|
|
498
500
|
header_message = f"""Commits:
|
|
499
501
|
|
|
@@ -501,7 +503,7 @@ def aggregate_release_notes_with_llms(
|
|
|
501
503
|
"""
|
|
502
504
|
changes_messages = [f"#{commit.hash}: {commit.message}\n{change}" for commit, change in zip(commits, changes)]
|
|
503
505
|
|
|
504
|
-
client =
|
|
506
|
+
client = get_open_ai_client(base_url=base_url, api_key=api_key)
|
|
505
507
|
response = client.chat.completions.create(
|
|
506
508
|
messages=[
|
|
507
509
|
{"role": "system", "content": prompt},
|
|
@@ -621,16 +623,16 @@ def bump(
|
|
|
621
623
|
|
|
622
624
|
current_version = parse_version(last_tag)
|
|
623
625
|
if verbose:
|
|
624
|
-
|
|
626
|
+
print_to_console(f"Current version: {current_version[0]}.{current_version[1]}.{current_version[2]}")
|
|
625
627
|
|
|
626
628
|
commits = get_commits_since_tag(repository_path, last_tag)
|
|
627
629
|
if not len(commits):
|
|
628
630
|
raise NoNewCommitsError(f"No new commits since the last {last_tag} tag")
|
|
629
631
|
|
|
630
632
|
if verbose:
|
|
631
|
-
|
|
633
|
+
print_to_console(f"? Commits since last tag: {len(commits)}")
|
|
632
634
|
for hash, commit in commits:
|
|
633
|
-
|
|
635
|
+
print_to_console(f"# {hash}: {commit}")
|
|
634
636
|
|
|
635
637
|
major_commits, minor_commits, patch_commits = group_commits(commits, major_verbs, minor_verbs, patch_verbs)
|
|
636
638
|
assert (
|
|
@@ -645,7 +647,7 @@ def bump(
|
|
|
645
647
|
bump_type = "patch"
|
|
646
648
|
new_version = bump_version(current_version, bump_type)
|
|
647
649
|
if verbose:
|
|
648
|
-
|
|
650
|
+
print_to_console(f"Next version: {new_version[0]}.{new_version[1]}.{new_version[2]} (type: {bump_type})")
|
|
649
651
|
|
|
650
652
|
new_version_str = f"{new_version[0]}.{new_version[1]}.{new_version[2]}"
|
|
651
653
|
if version_file:
|
|
@@ -656,12 +658,12 @@ def bump(
|
|
|
656
658
|
changes = f"\n## {now:%B %d, %Y}: v{new_version_str}\n"
|
|
657
659
|
changes += convert_commits_to_message(major_commits, minor_commits, patch_commits)
|
|
658
660
|
|
|
659
|
-
|
|
661
|
+
print_to_console(f"Will update file: {changelog_file}")
|
|
660
662
|
if verbose:
|
|
661
663
|
changes_lines = changes.count("\n") + 1
|
|
662
|
-
|
|
664
|
+
print_to_console(f"? Appending {changes_lines} lines")
|
|
663
665
|
for line in changes.split("\n"):
|
|
664
|
-
|
|
666
|
+
print_to_console(f"+ {line}")
|
|
665
667
|
|
|
666
668
|
if not dry_run:
|
|
667
669
|
with open(changelog_file, "a") as file:
|
|
@@ -698,13 +700,13 @@ def bump(
|
|
|
698
700
|
warnings_commits.append(commit)
|
|
699
701
|
warnings.append(warning)
|
|
700
702
|
except Exception as e:
|
|
701
|
-
|
|
703
|
+
print_to_console(f"Failed to validate commit: {commit.hash} with error: {str(e)}")
|
|
702
704
|
traceback.print_exc()
|
|
703
705
|
|
|
704
706
|
if len(warnings):
|
|
705
|
-
|
|
707
|
+
print_to_console("## Potential issues")
|
|
706
708
|
for commit, warning in zip(warnings_commits, warnings):
|
|
707
|
-
|
|
709
|
+
print_to_console(f"- Commit #{commit.hash}: {warning}")
|
|
708
710
|
|
|
709
711
|
release_notes = aggregate_release_notes_with_llms(
|
|
710
712
|
base_url=openai_base_url,
|
|
@@ -714,8 +716,8 @@ def bump(
|
|
|
714
716
|
commits=commits,
|
|
715
717
|
changes=changes,
|
|
716
718
|
)
|
|
717
|
-
|
|
718
|
-
|
|
719
|
+
print_to_console("## Generated release notes:")
|
|
720
|
+
print_to_console(release_notes)
|
|
719
721
|
|
|
720
722
|
if not dry_run:
|
|
721
723
|
create_tag(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tinysemver
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Semantic-Versioning with LLMs and without 300,000 lines of JS
|
|
5
5
|
Author-email: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com>, Guillaume de Rouville <31691250+grouville@users.noreply.github.com>
|
|
6
6
|
License: Apache License
|
|
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
|