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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
poetry.lock -diff linguist-generated
uv.lock -diff linguist-generated
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ updates:
prefix: chore
labels: []

- package-ecosystem: pip
- package-ecosystem: uv
directory: /
schedule:
interval: daily
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ jobs:
- name: Checkout
uses: actions/checkout@v4.2.2

- name: Setup Python
uses: actions/setup-python@v5.6.0
with:
python-version: 3.11

- name: Setup Poetry
uses: threeal/setup-poetry-action@v1.2.0
- name: Setup uv
uses: astral-sh/setup-uv@v6.1.0

- name: Install Dependencies
run: poetry install --with dev
run: uv sync --locked

- name: Check Format
run: poetry run ruff format --diff
run: uv run ruff format --diff

- name: Check Lint
run: poetry run ruff check
run: uv run ruff check

- name: Test Package
run: poetry run pytest -v --cov
run: uv run pytest -v --cov

- name: Build Package
run: poetry build
run: uv build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.*
!.git*
!.python-version

*.egg-info
__pycache__
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10.18
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The Python Starter is a [GitHub repository template](https://docs.github.com/en/
## Key Features

- Organized file structure for Python projects, featuring a sample `pyproject.toml`, a sample module, and associated testing files.
- Project and dependency management with [Poetry](https://python-poetry.org/), supplemented by [Poe the Poet](https://poethepoet.natn.io/index.html) for task management.
- Project and dependency management with [uv](https://docs.astral.sh/uv/).
- Code formatting and linting with [Ruff](https://github.com/astral-sh/ruff), leveraging all recommended rules for enhanced code quality.
- Testing framework powered by [Pytest](https://docs.pytest.org/en/7.4.x/), complete with support for test coverage checks.
- [GitHub Actions](https://github.com/features/actions) support with multiple workflows for continuous integration (CI) and continuous delivery (CD).
Expand Down
16 changes: 9 additions & 7 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@ pre-commit:
piped: true
jobs:
- name: install dependencies
run: poetry install --with dev
run: uv sync
glob:
- poetry.lock
- poetry.toml
- .python-version
- pyproject.toml
- uv.lock

- name: fix formatting
run: poetry run ruff format
run: uv run ruff format
glob:
- "*.py"
- poetry.lock
- .python-version
- pyproject.toml
- uv.lock

- name: fix lint
run: poetry run ruff check --fix
run: uv run ruff check --fix
glob:
- "*.py"
- poetry.lock
- .python-version
- pyproject.toml
- uv.lock

- name: check diff
run: git diff --exit-code {staged_files}
265 changes: 0 additions & 265 deletions poetry.lock

This file was deleted.

3 changes: 0 additions & 3 deletions poetry.toml

This file was deleted.

49 changes: 23 additions & 26 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
[build-system]
requires = ["poetry-core >= 1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
[project]
name = "my_fibonacci"
version = "0.0.0"
description = "A starter python module for generating a Fibonacci sequence."
license = "Unlicense"
dependencies = []
requires-python = ">=3.10"
authors = [
"Alfi Maulana <alfi.maulana.f@gmail.com>",
{name = "Alfi Maulana", email = "alfi.maulana.f@gmail.com"},
]
description = "A starter python module for generating a Fibonacci sequence."
readme = "README.md"
repository = "https://github.com/threeal/python-starter"
license = "Unlicense"
keywords = ["python", "starter", "fibonacci"]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules"
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "my_fibonacci", from = "lib" }
]

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.dev]
optional = true
[project.scripts]
my_fibonacci = "my_fibonacci.__main__:main"

[tool.poetry.group.dev.dependencies]
lefthook = "^1.11.14"
pytest = "^8.4.0"
pytest-cov = "^6.2.1"
ruff = "^0.12.0"
[project.urls]
repository = "https://github.com/threeal/python-starter.git"
issues = "https://github.com/threeal/python-starter/issues"

[tool.poetry.scripts]
my_fibonacci = "my_fibonacci.__main__:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
"lefthook>=1.11.14",
"pytest>=8.4.0",
"pytest-cov>=6.2.1",
"ruff>=0.11.13",
]

[tool.coverage.report]
fail_under = 100
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading