Skip to content
Open
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
7 changes: 3 additions & 4 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!--
🎉 Thank you for contributing!
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: 3.x
Expand All @@ -26,43 +26,39 @@ jobs:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6.2.1
- uses: wagoid/commitlint-github-action@v6.0.1

test:
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
os:
- ubuntu-latest
- windows-latest
- macOS-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install Dependencies
run: poetry install
allow-prereleases: true
- uses: astral-sh/setup-uv@v6
- run: uv sync --no-python-downloads
shell: bash
- name: Test with Pytest
run: poetry run pytest
- run: uv run pytest
shell: bash
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -81,7 +77,7 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.sha }}
Expand All @@ -92,21 +88,22 @@ jobs:

# Do a dry run of PSR
- name: Test release
uses: python-semantic-release/python-semantic-release@v9.21.1
uses: python-semantic-release/python-semantic-release@v10
if: github.ref_name != 'main'
with:
root_options: --noop
no_operation_mode: true
github_token: noop

# On main branch: actual PSR + upload to PyPI & GitHub
- name: Release
uses: python-semantic-release/python-semantic-release@v9.21.1
id: release
uses: python-semantic-release/python-semantic-release@v10
if: github.ref_name == 'main'
id: release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Attest build provenance
uses: actions/attest-build-provenance@v1
uses: actions/attest-build-provenance@v3
if: steps.release.outputs.released == 'true'
with:
subject-path: "dist/*"
Expand All @@ -116,7 +113,7 @@ jobs:
if: steps.release.outputs.released == 'true'

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/publish-action@v9.21.1
uses: python-semantic-release/publish-action@v10
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
issue-manager:
runs-on: ubuntu-latest
steps:
- uses: tiangolo/issue-manager@0.5.1
- uses: tiangolo/issue-manager@0.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install labels
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ dmypy.json

# Cython debug symbols
cython_debug/
*.pdf
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
tasks:
- command: |
pip install poetry
PIP_USER=false poetry install
pip install uv
PIP_USER=false uv sync
- command: |
pip install pre-commit
pre-commit install
Expand Down
9 changes: 0 additions & 9 deletions .idea/aoiro.iml

This file was deleted.

65 changes: 0 additions & 65 deletions .idea/watcherTasks.xml

This file was deleted.

32 changes: 0 additions & 32 deletions .idea/workspace.xml

This file was deleted.

20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ ci:

repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.9.0
rev: v4.13.7
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: debug-statements
- id: check-builtin-literals
Expand All @@ -28,30 +28,30 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.6.0"
rev: "v2.16.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/python-poetry/poetry
rev: 2.1.4
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.10.4
hooks:
- id: poetry-check
- id: uv-lock
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
args: ["--tab-width", "2"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12
rev: v0.15.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies: [types-dateparser, attrs, types-requests]
21 changes: 10 additions & 11 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.12"
python: "3.13"
jobs:
post_create_environment:
# Install poetry
- python -m pip install poetry
post_install:
# Install dependencies, reusing RTD virtualenv
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --no-dev --group docs

# Build documentation in the docs directory with Sphinx
sphinx:
configuration: docs/conf.py
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ Ready to contribute? Here's how to set yourself up for local development.
$ git clone git@github.com:your_name_here/aoiro.git
```

3. Install the project dependencies with [Poetry](https://python-poetry.org):
3. Install the project dependencies with [uv](https://docs.astral.sh/uv/):

```shell
$ poetry install
$ uv sync
```

4. Create a branch for local development:
Expand All @@ -63,7 +63,7 @@ Ready to contribute? Here's how to set yourself up for local development.
5. When you're done making changes, check that your changes pass our tests:

```shell
$ poetry run pytest
$ uv run pytest
```

6. Linting is done through [pre-commit](https://pre-commit.com). Provided you have the tool installed globally, you can run them all as one-off:
Expand Down
Loading
Loading