diff --git a/.copier-answers.yml b/.copier-answers.yml
index 1812534..cc5792d 100644
--- a/.copier-answers.yml
+++ b/.copier-answers.yml
@@ -1,7 +1,6 @@
# Changes here will be overwritten by Copier
-_commit: 85694ff
+_commit: dc40542
_src_path: gh:34j/pypackage-template
-add_me_as_contributor: false
cli_name: aoiro
copyright_year: '2025'
documentation: true
@@ -11,13 +10,13 @@ github_username: 34j
has_cli: true
initial_commit: false
is_django_package: false
-open_source_license: GNU General Public License v3
+open_source_license: MIT
open_with_editor: true
package_name: aoiro
project_name: Aoiro
project_short_description: CSV-based 青色申告 CLI app
project_slug: aoiro
-run_poetry_install: false
+run_uv_sync: false
setup_github: false
setup_pre_commit: false
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 02c9e8a..e128eae 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -41,7 +41,7 @@
- [ ] The new commits follow conventions outlined in the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/), such as "fix(api): prevent racing of requests".
> - If pre-commit.ci is failing, try `pre-commit run -a` for further information.
-> - If CI / test is failing, try `poetry run pytest` for further information.
+> - If CI / test is failing, try `uv run pytest` for further information.
-
@@ -218,8 +217,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
-
-
@@ -227,6 +224,8 @@ This project follows the [all-contributors](https://github.com/all-contributors/
## Credits
+[](https://github.com/copier-org/copier)
+
This package was created with
[Copier](https://copier.readthedocs.io/) and the
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
diff --git a/conftest.py b/conftest.py
new file mode 100644
index 0000000..da23fb4
--- /dev/null
+++ b/conftest.py
@@ -0,0 +1,32 @@
+from sybil import Sybil
+from sybil.evaluators.doctest import NUMBER
+from sybil.parsers.myst import ClearNamespaceParser as MarkdownClearNamespaceParser
+from sybil.parsers.myst import DocTestDirectiveParser as MarkdownDocTestParser
+from sybil.parsers.myst import PythonCodeBlockParser as MarkdownPythonCodeBlockParser
+from sybil.parsers.myst import SkipParser as MarkdownSkipParser
+from sybil.parsers.rest import ClearNamespaceParser as ReSTClearNamespaceParser
+from sybil.parsers.rest import DocTestParser as ReSTDocTestParser
+from sybil.parsers.rest import PythonCodeBlockParser as ReSTPythonCodeBlockParser
+from sybil.parsers.rest import SkipParser as ReSTSkipParser
+
+markdown_examples = Sybil(
+ parsers=[
+ MarkdownDocTestParser(NUMBER),
+ MarkdownPythonCodeBlockParser(doctest_optionflags=NUMBER),
+ MarkdownSkipParser(),
+ MarkdownClearNamespaceParser(),
+ ],
+ patterns=["*.md"],
+)
+
+rest_examples = Sybil(
+ parsers=[
+ ReSTDocTestParser(NUMBER),
+ ReSTPythonCodeBlockParser(),
+ ReSTSkipParser(),
+ ReSTClearNamespaceParser(),
+ ],
+ patterns=["*.py", "*.rst"],
+)
+
+pytest_collect_file = (markdown_examples + rest_examples).pytest()
diff --git a/docs/index.md b/docs/index.md
index 8053cea..3823a42 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,4 +1,6 @@
-# Welcome to Aoiro documentation!
+```{include} ../README.md
+
+```
```{toctree}
:caption: Installation & Usage
@@ -22,7 +24,3 @@ contributing
aoiro
```
-
-```{include} ../README.md
-
-```
diff --git a/pyproject.toml b/pyproject.toml
index 0fffc6a..fde9bc1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,61 +1,55 @@
[build-system]
-build-backend = "poetry.core.masonry.api"
-requires = [ "poetry-core>=1.0.0" ]
+build-backend = "setuptools.build_meta"
+requires = [ "setuptools>=77.0.3" ]
-[tool.poetry]
+[project]
name = "aoiro"
-version = "0.1.59"
+version = "0.0.0"
description = "CSV-based 青色申告 CLI app"
-authors = [ "34j <34j.github@proton.me>" ]
-license = "AGPL-3.0-only"
readme = "README.md"
-repository = "https://github.com/34j/aoiro"
-documentation = "https://aoiro.readthedocs.io"
+license = "MIT"
+authors = [
+ { name = "34j", email = "34j.github@proton.me" },
+]
+requires-python = ">=3.10"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+ "Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries",
]
-packages = [
- { include = "aoiro", from = "src" },
-]
-
-[tool.poetry.urls]
-"Bug Tracker" = "https://github.com/34j/aoiro/issues"
-"Changelog" = "https://github.com/34j/aoiro/blob/main/CHANGELOG.md"
-
-[tool.poetry.scripts]
-aoiro = "aoiro.cli:app"
-
-[tool.poetry.dependencies]
-python = "^3.10"
-pandas = "^2.2.3"
-dateparser = "^1.2.1"
-attrs = "^25.1.0"
-rich = "^13.9.4"
-networkx = "^3.4.2"
-requests-cache = "^1.2.1"
-openpyxl = "^3.1.5"
-account-codes-jp = "^0.4.0"
-cyclopts = "^3.9.3"
-
-[tool.poetry.group.dev.dependencies]
-pytest = "^8.0.0"
-pytest-cov = "^5.0.0"
-
-[tool.poetry.group.docs]
-optional = true
-[tool.poetry.group.docs.dependencies]
-myst-parser = { version = ">=0.16", python = ">=3.11" }
-sphinx = { version = ">=4.0", python = ">=3.11" }
-furo = { version = ">=2023.5.20", python = ">=3.11" }
-sphinx-autobuild = { version = ">=2024.0.0", python = ">=3.11" }
+dependencies = [
+ "rich>=10",
+ "typer>=0.15,<1",
+]
+urls."Bug Tracker" = "https://github.com/34j/aoiro/issues"
+urls.Changelog = "https://github.com/34j/aoiro/blob/main/CHANGELOG.md"
+urls.documentation = "https://aoiro.readthedocs.io"
+urls.repository = "https://github.com/34j/aoiro"
+scripts.aoiro = "aoiro.cli:app"
+
+[dependency-groups]
+dev = [
+ "pytest==9.*",
+ "sybil[pytest]",
+ "coverage",
+ "pytest-cov==7.*",
+]
+docs = [
+ "sphinx==9.*; python_version>='3.12'",
+ "furo; python_version>='3.12'",
+ "myst-parser; python_version>='3.12'",
+ "sphinx-autobuild; python_version>='3.12'",
+]
[tool.ruff]
-target-version = "py39"
line-length = 88
lint.select = [
"B", # flake8-bugbear
@@ -76,8 +70,6 @@ lint.ignore = [
"D104", # Missing docstring in public package
"D107", # Missing docstring in `__init__`
"D401", # First line of docstring should be in imperative mood
- "E712",
- "RUF001"
]
lint.per-file-ignores."conftest.py" = [ "D100" ]
lint.per-file-ignores."docs/conf.py" = [ "D100" ]
@@ -92,21 +84,28 @@ lint.per-file-ignores."tests/**/*" = [
]
lint.isort.known-first-party = [ "aoiro", "tests" ]
-[tool.pytest.ini_options]
-addopts = """\
- -v
- -Wdefault
- --cov=aoiro
- --cov-report=term
- --cov-report=xml
- """
+[tool.pyproject-fmt]
+max_supported_python = "3.14"
+
+[tool.pytest]
+minversion = "9.0"
+addopts = [
+ "-v",
+ "-Wonce",
+ "-p no:doctest",
+ "--cov=aoiro",
+ "--cov-report=term",
+ "--cov-report=xml"
+]
pythonpath = [ "src" ]
-[tool.coverage.run]
-branch = true
-
-[tool.coverage.report]
-exclude_lines = [
+[tool.coverage]
+run.branch = true
+paths.source = [
+ "src",
+ ".tox/**/site-packages",
+]
+report.exclude_lines = [
"pragma: no cover",
"@overload",
"if TYPE_CHECKING",
@@ -138,12 +137,17 @@ module = "docs.*"
ignore_errors = true
[tool.semantic_release]
-version_toml = [ "pyproject.toml:tool.poetry.version" ]
+version_toml = [ "pyproject.toml:project.version" ]
version_variables = [
"src/aoiro/__init__.py:__version__",
"docs/conf.py:release",
]
-build_command = "pip install poetry && poetry build"
+build_command = """
+pip install uv
+uv lock
+git add uv.lock
+uv build
+"""
[tool.semantic_release.changelog]
exclude_commit_patterns = [
diff --git a/renovate.json b/renovate.json
index 4fcf996..95d1781 100644
--- a/renovate.json
+++ b/renovate.json
@@ -7,9 +7,7 @@
],
"packageRules": [
{
- "matchDepTypes": [
- "dependencies"
- ],
+ "matchDepTypes": ["dependencies"],
"rangeStrategy": "bump"
}
]
diff --git a/src/aoiro/_ledger.py b/src/aoiro/_ledger.py
index 8796d79..f0c093f 100644
--- a/src/aoiro/_ledger.py
+++ b/src/aoiro/_ledger.py
@@ -1,7 +1,7 @@
-from collections.abc import Sequence
+from collections.abc import Callable, Sequence
from decimal import Decimal
from itertools import chain
-from typing import Any, Callable, Literal, Protocol, TypeVar
+from typing import Any, Literal, Protocol, TypeVar
import attrs
import pandas as pd
diff --git a/src/aoiro/_multidimensional.py b/src/aoiro/_multidimensional.py
index 2f5cf47..32f7be4 100644
--- a/src/aoiro/_multidimensional.py
+++ b/src/aoiro/_multidimensional.py
@@ -1,9 +1,9 @@
from collections import defaultdict
-from collections.abc import Iterable, Mapping, Sequence
+from collections.abc import Callable, Iterable, Mapping, Sequence
from decimal import ROUND_DOWN, Decimal, localcontext
from pathlib import Path
from sys import platform
-from typing import Callable, Literal
+from typing import Literal
import numpy as np
import pandas as pd