mirror of
https://github.com/tembo-pages/tembo-core.git
synced 2025-12-22 05:35:43 +00:00
chore: merge pull request #1 from tembo-pages/develop
chore: release 1.0.0
This commit is contained in:
@@ -5,10 +5,11 @@ 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).
|
||||
|
||||
|
||||
<!-- insertion marker -->
|
||||
## [0.1.0](https://github.com/tembo-pages/tembo-core/releases/tag/0.1.0) - 2021-11-20
|
||||
|
||||
<small>[Compare with first commit](https://github.com/tembo-pages/tembo-core/compare/8884a942c5c2a2815a1bbc75fb106555402d2055...0.1.0)</small>
|
||||
<!-- insertion marker -->
|
||||
## [1.0.0](https://github.com/tembo-pages/tembo-core/releases/tag/1.0.01.0.0) - 2021-11-21
|
||||
|
||||
<small>[Compare with first commit](https://github.com/tembo-pages/tembo-core/compare/fb7fec7ea619318b0e0830c0f9260335c0d4e173...1.0.0)</small>
|
||||
|
||||
### Features
|
||||
- update duties ([e2b4ef9](https://github.com/tembo-pages/tembo-core/commit/e2b4ef9f91c484d0d26ee5afcd308b6470f46370) by Daniel Tomlinson).
|
||||
- initial commit ([fb7fec7](https://github.com/tembo-pages/tembo-core/commit/fb7fec7ea619318b0e0830c0f9260335c0d4e173) by Daniel Tomlinson).
|
||||
|
||||
77
duties.py
77
duties.py
@@ -66,22 +66,21 @@ def coverage(ctx):
|
||||
|
||||
|
||||
@duty
|
||||
def version(ctx, bump: str = "patch"):
|
||||
def bump(ctx, version: str = "patch"):
|
||||
"""
|
||||
Bump the version using Poetry and update _version.py.
|
||||
|
||||
Args:
|
||||
ctx: The context instance (passed automatically).
|
||||
bump (str, optional) = poetry version flag. Available options are:
|
||||
patch, minor, major, prepatch, preminor, premajor, prerelease.
|
||||
Defaults to patch.
|
||||
version (str, optional) = poetry version flag. Available options are:
|
||||
patch, minor, major. Defaults to patch.
|
||||
|
||||
Example:
|
||||
`duty version bump=major`
|
||||
`duty bump version=major`
|
||||
"""
|
||||
|
||||
# bump with poetry
|
||||
result = ctx.run(["poetry", "version", bump])
|
||||
result = ctx.run(["poetry", "version", version])
|
||||
new_version = re.search(r"(?:.*)(?:\s)(\d+\.\d+\.\d+)$", result)
|
||||
print(new_version.group(0))
|
||||
|
||||
@@ -126,6 +125,22 @@ def build(ctx):
|
||||
shutil.rmtree(extracted_path)
|
||||
|
||||
|
||||
@duty
|
||||
def release(ctx, version: str = "patch") -> None:
|
||||
"""
|
||||
Prepare package for a new release.
|
||||
|
||||
Will run bump, build, export. Manual running of publish is required afterwards.
|
||||
|
||||
Args:
|
||||
ctx: The context instance (passed automatically).
|
||||
version (str): poetry version flag. Available options are: patch, minor, major.
|
||||
"""
|
||||
print(ctx.run(["duty", "bump", f"version={version}"]))
|
||||
ctx.run(["duty", "build"])
|
||||
ctx.run(["duty", "export"])
|
||||
|
||||
|
||||
@duty
|
||||
def export(ctx):
|
||||
"""
|
||||
@@ -328,6 +343,8 @@ def update_changelog(
|
||||
marker: str,
|
||||
version_regex: str,
|
||||
commit_style: str,
|
||||
planned_tag: str,
|
||||
last_released: str,
|
||||
) -> None:
|
||||
"""
|
||||
Update the given changelog file in place.
|
||||
@@ -347,8 +364,9 @@ def update_changelog(
|
||||
|
||||
if len(changelog.versions_list) == 1:
|
||||
last_version = changelog.versions_list[0]
|
||||
print(last_version.planned_tag)
|
||||
if last_version.planned_tag is None:
|
||||
planned_tag = "0.1.0"
|
||||
planned_tag = planned_tag
|
||||
last_version.tag = planned_tag
|
||||
last_version.url += planned_tag
|
||||
last_version.compare_url = last_version.compare_url.replace("HEAD", planned_tag)
|
||||
@@ -356,7 +374,9 @@ def update_changelog(
|
||||
with open(inplace_file, "r") as changelog_file:
|
||||
lines = changelog_file.read().splitlines()
|
||||
|
||||
last_released = _latest(lines, re.compile(version_regex))
|
||||
# last_released = _latest(lines, re.compile(version_regex))
|
||||
last_released = last_released
|
||||
print(last_released)
|
||||
if last_released:
|
||||
changelog.versions_list = _unreleased(changelog.versions_list, last_released)
|
||||
rendered = template.render(changelog=changelog, inplace=True)
|
||||
@@ -366,26 +386,39 @@ def update_changelog(
|
||||
changelog_file.write("\n".join(lines).rstrip("\n") + "\n")
|
||||
|
||||
|
||||
@duty
|
||||
def changelog(ctx):
|
||||
# @duty
|
||||
def changelog(planned_tag, last_released):
|
||||
"""
|
||||
Update the changelog in-place with latest commits.
|
||||
Arguments:
|
||||
ctx: The context instance (passed automatically).
|
||||
"""
|
||||
ctx.run(
|
||||
update_changelog,
|
||||
kwargs={
|
||||
"inplace_file": "CHANGELOG.md",
|
||||
"marker": "<!-- insertion marker -->",
|
||||
"version_regex": r"^## \[v?(?P<version>[^\]]+)",
|
||||
"commit_style": "angular",
|
||||
},
|
||||
title="Updating changelog",
|
||||
pty=True,
|
||||
# print(
|
||||
# ctx.run(
|
||||
# update_changelog,
|
||||
# kwargs={
|
||||
# "inplace_file": "CHANGELOG.md",
|
||||
# "marker": "<!-- insertion marker -->",
|
||||
# "version_regex": r"^## \[v?(?P<version>[^\]]+)",
|
||||
# "commit_style": "angular",
|
||||
# },
|
||||
# title="Updating changelog",
|
||||
# pty=True,
|
||||
# )
|
||||
# )
|
||||
|
||||
update_changelog(
|
||||
inplace_file="CHANGELOG.md",
|
||||
marker="<!-- insertion marker -->",
|
||||
version_regex=r"^## \[v?(?P<version>[^\]]+)",
|
||||
commit_style="angular",
|
||||
planned_tag=planned_tag,
|
||||
last_released=last_released
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
def rm_tree(directory: pathlib.Path):
|
||||
"""
|
||||
Recursively delete a directory and all its contents.
|
||||
@@ -447,3 +480,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
{{ render_version(version) }}
|
||||
{%- endfor -%}
|
||||
"""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
changelog("1.0.1", "1.0.0")
|
||||
|
||||
20
poetry.lock
generated
20
poetry.lock
generated
@@ -538,20 +538,15 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
|
||||
|
||||
[[package]]
|
||||
name = "panaetius"
|
||||
version = "2.3.2"
|
||||
version = "2.3.3"
|
||||
description = "Python module to gracefully handle a .config file/environment variables for scripts, with built in masking for sensitive options. Provides a Splunk friendly formatted logger instance."
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = "^3.7"
|
||||
develop = true
|
||||
python-versions = ">=3.7,<4.0"
|
||||
|
||||
[package.dependencies]
|
||||
PyYAML = "^6.0"
|
||||
toml = "^0.10.0"
|
||||
|
||||
[package.source]
|
||||
type = "directory"
|
||||
url = "../../panaetius"
|
||||
PyYAML = ">=6.0,<7.0"
|
||||
toml = ">=0.10.0,<0.11.0"
|
||||
|
||||
[[package]]
|
||||
name = "pbr"
|
||||
@@ -1119,7 +1114,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.8"
|
||||
content-hash = "0126a464628e466ebffe16877a2a727a10a2a298c90f504274f264b5ab8b4fcd"
|
||||
content-hash = "1865d915f794aa79cb865a812b30fdc47bf193769595cab3975fa3d1d6515de4"
|
||||
|
||||
[metadata.files]
|
||||
altgraph = [
|
||||
@@ -1443,7 +1438,10 @@ packaging = [
|
||||
{file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"},
|
||||
{file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"},
|
||||
]
|
||||
panaetius = []
|
||||
panaetius = [
|
||||
{file = "panaetius-2.3.3-py3-none-any.whl", hash = "sha256:44d8554dbeea25f16c7c36bc97e35369eb87c09b339a6347c6053ded00890569"},
|
||||
{file = "panaetius-2.3.3.tar.gz", hash = "sha256:d984596a54f74763bc76664dcf04e41d080d20d8e458ccf42a9e7da1846cfcf2"},
|
||||
]
|
||||
pbr = [
|
||||
{file = "pbr-5.8.0-py2.py3-none-any.whl", hash = "sha256:176e8560eaf61e127817ef93d8a844803abb27a4d4637f0ff3bb783129be2e0a"},
|
||||
{file = "pbr-5.8.0.tar.gz", hash = "sha256:672d8ebee84921862110f23fcec2acea191ef58543d34dfe9ef3d9f13c31cddf"},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[tool.poetry]
|
||||
name = "tembo"
|
||||
description = "A simple folder organiser for your work notes."
|
||||
version = "0.0.8"
|
||||
version = "1.0.0"
|
||||
license = "ISC"
|
||||
authors = ["dtomlinson <dtomlinson@panaetius.co.uk>"]
|
||||
readme = "./README.md"
|
||||
@@ -15,9 +15,7 @@ python = "^3.8"
|
||||
click = "^8.0.3"
|
||||
pendulum = "^2.1.2"
|
||||
Jinja2 = "^3.0.2"
|
||||
# panaetius = "^2.3.2"
|
||||
panaetius = { path = "../../panaetius", develop = true }
|
||||
|
||||
panaetius = "^2.3.3"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
pytest = "^6.2.5"
|
||||
|
||||
@@ -2,7 +2,7 @@ click==8.0.3; python_version >= "3.6"
|
||||
colorama==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and platform_system == "Windows" or platform_system == "Windows" and python_version >= "3.6" and python_full_version >= "3.5.0"
|
||||
jinja2==3.0.3; python_version >= "3.6"
|
||||
markupsafe==2.0.1; python_version >= "3.6"
|
||||
panaetius @ /home/dtomlinson/git-repos/python/panaetius; python_version >= "3.7" and python_version < "4.0"
|
||||
panaetius==2.3.3; python_version >= "3.7" and python_version < "4.0"
|
||||
pendulum==2.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||
python-dateutil==2.8.2; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
pytzdata==2020.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
|
||||
|
||||
@@ -44,7 +44,7 @@ mkdocstrings==0.16.2; python_version >= "3.6"
|
||||
mypy-extensions==0.4.3; python_full_version >= "3.6.1" and python_version < "4.0" and python_version >= "3.5"
|
||||
mypy==0.910; python_version >= "3.5"
|
||||
packaging==21.3; python_version >= "3.6"
|
||||
panaetius @ /home/dtomlinson/git-repos/python/panaetius; python_version >= "3.7" and python_version < "4.0"
|
||||
panaetius==2.3.3; python_version >= "3.7" and python_version < "4.0"
|
||||
pbr==5.8.0; python_full_version >= "3.6.1" and python_version < "4.0" and python_version >= "3.6"
|
||||
pefile==2021.9.3; sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.6.0"
|
||||
pendulum==2.1.2; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
|
||||
|
||||
4
setup.py
4
setup.py
@@ -10,7 +10,7 @@ package_data = \
|
||||
install_requires = \
|
||||
['Jinja2>=3.0.2,<4.0.0',
|
||||
'click>=8.0.3,<9.0.0',
|
||||
'panaetius>=2.3.2,<3.0.0',
|
||||
'panaetius>=2.3.3,<3.0.0',
|
||||
'pendulum>=2.1.2,<3.0.0']
|
||||
|
||||
entry_points = \
|
||||
@@ -18,7 +18,7 @@ entry_points = \
|
||||
|
||||
setup_kwargs = {
|
||||
'name': 'tembo',
|
||||
'version': '0.0.8',
|
||||
'version': '1.0.0',
|
||||
'description': 'A simple folder organiser for your work notes.',
|
||||
'long_description': '# Tembo\n\n<img\n src="https://raw.githubusercontent.com/tembo-pages/tembo-core/main/assets/tembo_logo.png"\n width="200px"\n/>\n\nA simple folder organiser for your work notes.\n\n\n\n\n\n\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',
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""Module containing the version of tembo."""
|
||||
|
||||
__version__ = "0.0.8"
|
||||
__version__ = "1.0.0"
|
||||
|
||||
Reference in New Issue
Block a user