Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/code-style/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ runs:
- name: Ruff
shell: bash
run: |
ruff format --check
ruff check
uv run ruff format --check
uv run ruff check

- name: MyPy
shell: bash
run: mypy ./
run: uv run mypy ./
5 changes: 3 additions & 2 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ runs:
- name: Publish
shell: bash
run: |
poetry version ${{ inputs.version }}
poetry publish --build
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version ${{ inputs.version }}
uv build
uv publish
15 changes: 4 additions & 11 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ inputs:
runs:
using: "composite"
steps:
- name: Install Python
uses: actions/setup-python@v5
- name: Install UV
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ inputs.python-version }}
architecture: "x64"

- name: Install Poetry & Dependencies
- name: Install Dependencies
shell: bash
run: |
pip install --upgrade pip
pip install poetry
poetry config installer.modern-installation true
poetry config virtualenvs.create false
poetry check
poetry install --compile --without example
run: uv sync
2 changes: 1 addition & 1 deletion .github/actions/tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ runs:
steps:
- name: Pytest
shell: bash
run: pytest
run: uv run pytest
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
with:
version: ${{ github.event.release.tag_name }}
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
513 changes: 0 additions & 513 deletions poetry.lock

This file was deleted.

66 changes: 41 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
[tool.poetry]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
"hatch",
"mypy",
"ruff",
]
example = [
"fastapi",
]
test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
]

[project]
name = "python-cq"
version = "0.0.0"
description = "Lightweight CQRS library."
license = "MIT"
authors = ["remimd"]
license = { text = "MIT" }
readme = "README.md"
repository = "https://github.com/100nm/python-cq"
requires-python = ">=3.12, <4"
authors = [{ name = "remimd" }]
keywords = ["cqrs"]
classifiers = [
"Development Status :: 4 - Beta",
Expand All @@ -20,24 +39,13 @@ classifiers = [
"Natural Language :: English",
"Typing :: Typed",
]
packages = [{ include = "cq" }]

[tool.poetry.dependencies]
python = ">=3.12, <4"
pydantic = ">=2, <3"
python-injection = "*"

[tool.poetry.group.dev.dependencies]
mypy = "*"
ruff = "*"

[tool.poetry.group.example.dependencies]
fastapi = "*"
dependencies = [
"pydantic (>=2, <3)",
"python-injection",
]

[tool.poetry.group.test.dependencies]
pytest = "*"
pytest-asyncio = "*"
pytest-cov = "*"
[project.urls]
Repository = "https://github.com/100nm/python-cq"

[tool.coverage.report]
exclude_lines = [
Expand All @@ -46,6 +54,15 @@ exclude_lines = [
"raise NotImplementedError",
]

[tool.hatch.build]
skip-excluded-dirs = true

[tool.hatch.build.targets.sdist]
include = ["cq"]

[tool.hatch.build.targets.wheel]
packages = ["cq"]

[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
Expand All @@ -70,7 +87,6 @@ asyncio_mode = "auto"
testpaths = "**/tests/"

[tool.ruff]
target-version = "py312"
line-length = 88
indent-width = 4

Expand All @@ -84,6 +100,6 @@ line-ending = "auto"
extend-select = ["F", "I", "N"]
fixable = ["ALL"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
default-groups = ["dev", "test"]
package = true
860 changes: 860 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

Loading