From a5bad196d4976fb808457a08bf98d4207fa602e5 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 02:15:03 +0000 Subject: [PATCH 1/2] feat: Updated scripts/build_change_log.py --- scripts/build_change_log.py | 55 +++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/scripts/build_change_log.py b/scripts/build_change_log.py index b0f9881fb..f42f494d7 100755 --- a/scripts/build_change_log.py +++ b/scripts/build_change_log.py @@ -13,7 +13,55 @@ with open('scripts/change-types.yaml', 'r') as f: typs = yaml.load(f.read()) -typs = {x:x for x in typs} +typs = + { + 'data-change': 'data-change', + 'data-changes': 'data-change', + 'DataChange:': 'data-change', + 'DataChanges:': 'data-change', + 'api-change:': 'api-change', + 'new-feature:': 'new-feature', + 'improve:': 'improve', + 'Improve:': 'improve', + 'internal:': 'internal', + 'doc:': 'doc', + 'Doc:': 'doc', + 'refactor:': 'refactor', + 'fixbug:': 'fixbug', + 'fixdoc:': 'fixdoc', + 'Fixdoc:': 'fixdoc', + 'dep:': 'dep', + 'ci:': 'ci', + 'CI:': 'ci', + 'Change:': 'api-change', + 'change:': 'api-change', + 'changes:': 'api-change', + 'api-changes:': 'api-change', + 'Add:': 'new-feature', + 'add:': 'new-feature', + 'Feature:': 'new-feature', + 'feature:': 'new-feature', + 'Features:': 'new-feature', + 'features:': 'new-feature', + 'new-features:': 'new-feature', + 'docs:': 'doc', + 'fix:': 'fixbug', + 'Fix:': 'fixbug', + 'fixup:': 'fixbug', + 'test:': 'test', + 'build(deps):': 'dep', + 'Build(deps):': 'dep', + 'Update:': 'other', + 'update:': 'other', + 'turn:': 'other', + 'replace:': 'refactor', + 'format:': 'refactor', + 'use:': 'refactor', + 'Create:': 'other', + 'BumpVer:': 'other', + 'Chore:': 'other', + 'chore:': 'other' + } # categories has another mapping to fix typo in commit message categories = { @@ -233,7 +281,8 @@ def build_ver_changelog(new_ver, commit="HEAD", since=None): If ``since`` is specified, build change log since ``since`` upto ``commit``. ''' - fn = 'change-log/v{new_ver}.md'.format(new_ver=new_ver) + fn = 'change-log/v{new_ver}.md'.format(new_ver=new_ver.lstrip('v')) + # Handle different commit message formats or categories if os.path.exists(fn): print("--- Version {new_ver} change log exists, skip...".format(new_ver=new_ver)) print("--- To rebuild it, delete {fn} and re-run".format(fn=fn)) @@ -246,7 +295,9 @@ def build_ver_changelog(new_ver, commit="HEAD", since=None): new_ver = new_ver.lstrip('v') new_ver = semantic_version.Version(new_ver) tags = [t for t in tags if t < new_ver] + tags.sort() latest = tags[-1] + # Ensure the latest tags are listed else: latest = since From 289387573678033d410f06853fe4b2e00446ea01 Mon Sep 17 00:00:00 2001 From: "sweep-ai[bot]" <128439645+sweep-ai[bot]@users.noreply.github.com> Date: Thu, 11 Jan 2024 02:15:21 +0000 Subject: [PATCH 2/2] feat: Updated CONTRIBUTING.md --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d65861003..8d7d36294 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Review their guide for more details on how to work with mdBook. Here are a few o cargo install mdbook # Build the guide. -mdbook build +cd guide-directory \\nmdbook build # Watch the FS for changes & rebuild. mdbook watch @@ -29,7 +29,10 @@ mdbook watch ## Release checklist -- `make`: pass the unit test, format and clippy check. +- First, make sure you have installed the necessary dependencies through cargo and have a proper configuration for the Rust project. +- To run the unit tests, use `cargo test`. +- To perform a format check, use `cargo fmt`. +- To perform a clippy check, use `cargo clippy`. - Any documentation updates should also be reflected in the guide.