From b49d776712737deaa1aeb86dd40230c099198d5a Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Mon, 22 Nov 2021 10:55:01 +0000 Subject: [PATCH 1/7] feat: add garbage --- garbage | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 garbage diff --git a/garbage b/garbage new file mode 100644 index 0000000..e69de29 From e29ae6dadb1ca419d536db18f34d9d249012cc25 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Mon, 22 Nov 2021 10:56:40 +0000 Subject: [PATCH 2/7] chore: prepare release v1.0.2 --- CHANGELOG.md | 21 ++++++++++----------- pyproject.toml | 2 +- setup.py | 2 +- tembo/_version.py | 2 +- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c5789c..bfa650c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,18 @@ All notable changes to this project will be documented in this file. 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). -## [1.0.1](https://github.com/tembo-pages/tembo-core/commits/1.0.1) - 2021-11-21 -[Compare with v1.0.0](https://github.com/tembo-pages/tembo-core/compare/v1.0.1...v1.0.0) +## [1.0.2](https://github.com/tembo-pages/tembo-core/commits/v1.0.2) - 2021-11-21 -### Miscellaneous Tasks +### Features -- Add changelog generation using git-cliff ([4c8d68](https://github.com/tembo-pages/tembo-core/commit/4c8d686abb82ade97680a3e8cdef267559282ff4)) -- Prepare release 1.0.1 ([b077aa](https://github.com/tembo-pages/tembo-core/commit/b077aaaf6666e78507f6439fa2e10a34c55176e5)) +- Add garbage ([c593c0](https://github.com/tembo-pages/tembo-core/commit/c593c0fdca6120fce9e44cfd0ac046ec8ce766df)) + +## [1.0.1](https://github.com/tembo-pages/tembo-core/commits/v1.0.1) - 2021-11-21 +[Compare with v1.0.0](https://github.com/tembo-pages/tembo-core/compare/v1.0.0...v1.0.1) + +### Documentation + +- Update changelog ([b71033](https://github.com/tembo-pages/tembo-core/commit/b710338a73add7ed93af1f76f3b9272e30ce41de)) ## [1.0.0](https://github.com/tembo-pages/tembo-core/commits/v1.0.0) - 2021-11-21 @@ -22,12 +27,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial commit ([fb7fec](https://github.com/tembo-pages/tembo-core/commit/fb7fec7ea619318b0e0830c0f9260335c0d4e173)) -### Miscellaneous Tasks - -- Update duties.py ([562de6](https://github.com/tembo-pages/tembo-core/commit/562de606c4846ad37d32822260121892c353e7ca)) -- Prepare release 1.0.0 ([eed47d](https://github.com/tembo-pages/tembo-core/commit/eed47d34b9a0b79f48b2fbe0ad77f43dc42f6027)) - ### Build - Update panaetius to 2.3.3 ([e5d2b2](https://github.com/tembo-pages/tembo-core/commit/e5d2b28252b9d7962a8d49d4da37b9f9c4f6d514)) - diff --git a/pyproject.toml b/pyproject.toml index 928eeee..1dcd6c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "tembo" description = "A simple folder organiser for your work notes." -version = "1.0.1" +version = "1.0.2" license = "ISC" authors = ["dtomlinson "] readme = "./README.md" diff --git a/setup.py b/setup.py index 14a9850..a77645c 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ entry_points = \ setup_kwargs = { 'name': 'tembo', - 'version': '1.0.1', + 'version': '1.0.2', 'description': 'A simple folder organiser for your work notes.', 'long_description': '# Tembo\n\n\n\nA simple folder organiser for your work notes.\n\n![](https://img.shields.io/codecov/c/github/tembo-pages/tembo-core?style=flat-square)\n\n![Sonar Coverage](https://img.shields.io/sonar/coverage/tembo-pages_tembo-core?server=https%3A%2F%2Fsonarcloud.io&style=flat-square)\n![Sonar Tests](https://img.shields.io/sonar/tests/tembo-pages_tembo-core?compact_message&failed_label=failed&passed_label=passed&server=https%3A%2F%2Fsonarcloud.io&skipped_label=skipped&style=flat-square)\n![Sonar Tech Debt](https://img.shields.io/sonar/tech_debt/tembo-pages_tembo-core?server=https%3A%2F%2Fsonarcloud.io&style=flat-square)\n\n## config.yml\n\n```yaml\n# time tokens: https://strftime.org\ntembo:\n base_path: ~/tembo\n # template_path: ~/tembo/templates\n scopes:\n - name: scratchpad\n example: tembo new scratchpad\n path: "scratchpad/{d:%B_%Y}"\n filename: "{d:%B_%W}"\n extension: md\n template_filename: scratchpad.md.tpl\n - name: wtodo\n example: tembo new wtodo | directory is month_year, filename is month_week-of-year\n path: "wtodo/{d:%B_%Y}"\n filename: "week_{d:%W}"\n extension: todo\n template_filename: weekly.todo.tpl\n - name: meeting\n example: tembo new meeting $meeting_title\n path: "meetings/{d:%B_%y}"\n filename: "{d:%a_%d_%m_%y}-{input0}"\n extension: md\n template_filename: meeting.md.tpl\n - name: knowledge\n example: tembo new knowledge $project $filename\n path: "knowledge/{input0}"\n filename: "{input1}"\n extension: md\n template_filename: knowledge.md.tpl\n logging:\n level: INFO\n path: ~/tembo/.logs\n```\n\n## templates\n\n###\xa0knowledge\n\n```\n---\ncreated: {d:%d-%m-%Y}\n---\n\n# {input0} - {input1}.md\n```\n\n### meeting\n\n```\n---\ncreated: {d:%d-%m-%Y}\n---\n\n# {d:%A %d %B %Y} - {input0}\n\n## People\n\nHead:\n\nAttendees:\n\n## Actions\n\n\n## Notes\n\n```\n\n### scratchpad\n\n```\n---\ncreated: {d:%d-%m-%Y}\n---\n\n# Scratchpad - Week {d:%W} - {d:%B-%y}\n```\n\n### wtodo\n\n```\n---\ncreated: {d:%d-%m-%Y}\n---\n\nWeekly TODO | Week {d:%W} {d:%B}-{d:%Y}\n\nWork:\n\nDocumentation:\n```\n', 'author': 'dtomlinson', diff --git a/tembo/_version.py b/tembo/_version.py index 8cb9d2e..e3e7223 100644 --- a/tembo/_version.py +++ b/tembo/_version.py @@ -1,3 +1,3 @@ """Module containing the version of tembo.""" -__version__ = "1.0.1" +__version__ = "1.0.2" From 7ee36f28b5160251c37085744166c2a5b1e695e4 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 23 Nov 2021 20:29:33 +0000 Subject: [PATCH 3/7] chore: update cliff.toml --- cliff.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cliff.toml b/cliff.toml index 5522e29..43a2eac 100644 --- a/cliff.toml +++ b/cliff.toml @@ -14,7 +14,7 @@ body = """ {% if version %}\ ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/tembo-pages/tembo-core/commits/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} {% if previous.version %}\ - [Compare with {{ previous.version }}](https://github.com/tembo-pages/tembo-core/compare/v{{ version }}...{{ previous.version }}) + [Compare with {{ previous.version }}](https://github.com/tembo-pages/tembo-core/compare/{{ previous.version }}...{{ version }}) {% endif %}\ {% else %}\ ## [unreleased] From f6f2fe07b61e8fa8bd812bbc63a51d3f9705a448 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 23 Nov 2021 20:29:58 +0000 Subject: [PATCH 4/7] chore: update duties.py with latest changelog duty --- duties.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/duties.py b/duties.py index a854afe..3d4574a 100644 --- a/duties.py +++ b/duties.py @@ -331,16 +331,19 @@ def changelog(ctx, planned_release: Optional[str] = None): ctx: The context instance (passed automatically). planned_release (str, optional): The planned release version. Example: v1.0.2 """ - if planned_release is not None: - changelog = ctx.run(["git", "cliff", "--tag", planned_release]) - else: - changelog = ctx.run(["git", "cliff"]) + generated_changelog = ctx.run(["git", "cliff", "-u", "-t", planned_release, "-s", "header"])[:-1] + new_changelog = [] changelog_file = pathlib.Path(".") / "CHANGELOG.md" + with changelog_file.open("r", encoding="utf-8") as changelog_contents: + all_lines = changelog_contents.readlines() + for line_string in all_lines: + regex_string = re.search(r"()", line_string) + new_changelog.append(line_string) + if isinstance(regex_string, re.Match): + new_changelog.append(generated_changelog) with changelog_file.open("w", encoding="utf-8") as changelog_contents: - changelog_contents.write(changelog) - - + changelog_contents.writelines(new_changelog) def rm_tree(directory: pathlib.Path): From 8c1d7632dded4f221c61d942b548c1552f5b8292 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 23 Nov 2021 20:53:58 +0000 Subject: [PATCH 5/7] chore: update cliff.toml & duties.py --- cliff.toml | 2 +- duties.py | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cliff.toml b/cliff.toml index 43a2eac..c956128 100644 --- a/cliff.toml +++ b/cliff.toml @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # https://tera.netlify.app/docs/#introduction body = """ {% if version %}\ - ## [{{ version | trim_start_matches(pat="v") }}](https://github.com/tembo-pages/tembo-core/commits/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} + ## [{{ version }}](https://github.com/tembo-pages/tembo-core/commits/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} {% if previous.version %}\ [Compare with {{ previous.version }}](https://github.com/tembo-pages/tembo-core/compare/{{ previous.version }}...{{ version }}) {% endif %}\ diff --git a/duties.py b/duties.py index 3d4574a..581ad61 100644 --- a/duties.py +++ b/duties.py @@ -13,6 +13,7 @@ from urllib.request import urlopen from duty import duty PACKAGE_NAME = "tembo" +REPO_URL = "https://github.com/tembo-pages/tembo-core" @duty(post=["export"]) @@ -322,16 +323,25 @@ def check_dependencies(ctx): pty=True, ) + @duty -def changelog(ctx, planned_release: Optional[str] = None): +def changelog(ctx, planned_release: Optional[str] = None, previous_release: Optional[str] = None): """ Generate a changelog with git-cliff. Args: ctx: The context instance (passed automatically). planned_release (str, optional): The planned release version. Example: v1.0.2 + previous_release (str, optional): The previous release version. Example: v1.0.1 """ - generated_changelog = ctx.run(["git", "cliff", "-u", "-t", planned_release, "-s", "header"])[:-1] + generated_changelog: str = ctx.run(["git", "cliff", "-u", "-t", planned_release, "-s", "header"])[:-1] + if previous_release is not None: + generated_changelog: list = generated_changelog.splitlines() + generated_changelog.insert( + 1, + f"[Compare with {previous_release}]({REPO_URL}/compare/{previous_release}..{planned_release})", + ) + generated_changelog: str = "\n".join([line for line in generated_changelog]) + "\n" new_changelog = [] changelog_file = pathlib.Path(".") / "CHANGELOG.md" From 2b5632955a0090e94d353bd407955371463b9416 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 23 Nov 2021 20:55:16 +0000 Subject: [PATCH 6/7] docs: update CHANGELOG.md --- CHANGELOG.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfa650c..3ac84db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,28 @@ # Changelog + All notable changes to this project will be documented in this file. -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). - -## [1.0.2](https://github.com/tembo-pages/tembo-core/commits/v1.0.2) - 2021-11-21 + +## [v1.0.2](https://github.com/tembo-pages/tembo-core/commits/v1.0.2) - 2021-11-23 +[Compare with v1.0.1](https://github.com/tembo-pages/tembo-core/compare/v1.0.1..v1.0.2) ### Features -- Add garbage ([c593c0](https://github.com/tembo-pages/tembo-core/commit/c593c0fdca6120fce9e44cfd0ac046ec8ce766df)) +- Add garbage ([b49d77](https://github.com/tembo-pages/tembo-core/commit/b49d776712737deaa1aeb86dd40230c099198d5a)) -## [1.0.1](https://github.com/tembo-pages/tembo-core/commits/v1.0.1) - 2021-11-21 -[Compare with v1.0.0](https://github.com/tembo-pages/tembo-core/compare/v1.0.0...v1.0.1) +### Miscellaneous Tasks + +- Prepare release v1.0.2 ([e29ae6](https://github.com/tembo-pages/tembo-core/commit/e29ae6dadb1ca419d536db18f34d9d249012cc25)) +- Update cliff.toml ([7ee36f](https://github.com/tembo-pages/tembo-core/commit/7ee36f28b5160251c37085744166c2a5b1e695e4)) +- Update duties.py with latest changelog duty ([f6f2fe](https://github.com/tembo-pages/tembo-core/commit/f6f2fe07b61e8fa8bd812bbc63a51d3f9705a448)) +## [v1.0.1](https://github.com/tembo-pages/tembo-core/commits/v1.0.1) - 2021-11-21 +[Compare with v1.0.0](https://github.com/tembo-pages/tembo-core/compare/v1.0.0..v1.0.1) ### Documentation - Update changelog ([b71033](https://github.com/tembo-pages/tembo-core/commit/b710338a73add7ed93af1f76f3b9272e30ce41de)) -## [1.0.0](https://github.com/tembo-pages/tembo-core/commits/v1.0.0) - 2021-11-21 +## [v1.0.0](https://github.com/tembo-pages/tembo-core/commits/v1.0.0) - 2021-11-21 ### Documentation From e17882549a209955dbf6ab2c3582b13db4df4897 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Tue, 23 Nov 2021 21:05:12 +0000 Subject: [PATCH 7/7] docs: update license reference --- docs/home/license.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/home/license.md b/docs/home/license.md index 616b86c..cdacdfe 100644 --- a/docs/home/license.md +++ b/docs/home/license.md @@ -1,3 +1,3 @@ ``` ---8<-- "LICENSE.md" +--8<-- "LICENSE" ```