Skip to content

Commit

Permalink
Merge pull request #28 from toshi-pono/feature/versions
Browse files Browse the repository at this point in the history
versionを統一するように
  • Loading branch information
toshi-pono authored Jul 6, 2024
2 parents a232fda + 1672656 commit 043bd92
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 6 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
current = $(shell poetry version -s)

## help: Show this help info.
help: Makefile
@printf "\n\033[1mUsage: make <TARGETS> ...\033[0m\n\n\033[1mTargets:\033[0m\n\n"
Expand Down Expand Up @@ -40,8 +42,8 @@ api_update:


## test: Run lint
.PHONY: lint_all
lint_all:
.PHONY: lint
lint:
poetry run ruff check .
poetry run mypy .
cd libs/aiotraq && poetry run ruff check .
Expand All @@ -50,3 +52,11 @@ lint_all:
cd libs/bot && poetry run mypy .
cd libs/message && poetry run ruff check .
cd libs/message && poetry run mypy .


## version: edit versions
.PHONY: write-version
write-version:
cd libs/aiotraq && poetry version $(current)
cd libs/bot && poetry version $(current)
cd libs/message && poetry version $(current)
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ make api_update
> [!WARNING]
> `post_webhook` についてはライブラリ未対応のため動的に生成できず、手動で追加しています
## publish

> [!WARNING]
> work in progress: githubactions でいい感じにしたい
1. monorepo の pyproject.toml に記載されているバージョンを更新して、`$ make write-version`でまとめて更新します
2. github actions の workflow を実行して、pypi に publish します

## License

This project is licensed under the terms of the MIT license.
3 changes: 3 additions & 0 deletions libs/aiotraq/aiotraq/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"""A client library for accessing traQ v3"""

from importlib.metadata import version

from .client import AuthenticatedClient, Client

__version__ = version(__package__)
__all__ = (
"AuthenticatedClient",
"Client",
Expand Down
4 changes: 3 additions & 1 deletion libs/aiotraq/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiotraq"
version = "0.1.3"
version = "0.2.3"
description = "Async ready traQ API Client"
authors = ["toshi00"]
license = "MIT"
Expand Down Expand Up @@ -43,6 +43,8 @@ exclude = [".venv", "venv", "__pycache__", ".git"]

line-length = 120
indent-width = 4

[tool.ruff.lint]
select = ["F", "I", "UP"]

[tool.ruff.format]
Expand Down
3 changes: 3 additions & 0 deletions libs/bot/aiotraq_bot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from .bot import TraqHttpBot
from importlib.metadata import version


__version__ = version(__package__)
__all__ = ["TraqHttpBot"]
2 changes: 1 addition & 1 deletion libs/bot/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiotraq-bot"
version = "0.1.2"
version = "0.2.3"
description = "Async ready traQ Bot library"
authors = ["toshi00"]
license = "MIT"
Expand Down
2 changes: 2 additions & 0 deletions libs/message/aiotraq_message/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from .manager import TraqMessageManager
from .message import TraqMessage
from importlib.metadata import version

__version__ = version(__package__)
__all__ = ["TraqMessageManager", "TraqMessage"]
2 changes: 1 addition & 1 deletion libs/message/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiotraq-message"
version = "0.2.2"
version = "0.2.3"
description = "aiotraq Plugin that supports interactive message sending using Streamlit-style syntax for traQ"
authors = ["toshi00"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aiotraq-monorepo"
version = "0.1.2"
version = "0.2.3"
description = "Async ready traQ Developper toolkit"
authors = ["toshi00"]
license = "MIT"
Expand Down
3 changes: 3 additions & 0 deletions templates/aiotraq/package_init.py.jinja
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{% from "helpers.jinja" import safe_docstring %}

{{ safe_docstring(package_description) }}
from importlib.metadata import version

from .client import AuthenticatedClient, Client

__version__ = version(__package__)
__all__ = (
"AuthenticatedClient",
"Client",
Expand Down
2 changes: 2 additions & 0 deletions templates/aiotraq/pyproject_ruff.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ exclude = [".venv", "venv", "__pycache__", ".git"]

line-length = 120
indent-width = 4

[tool.ruff.lint]
select = ["F", "I", "UP"]

[tool.ruff.format]
Expand Down

0 comments on commit 043bd92

Please sign in to comment.