Skip to content

Commit bee048e

Browse files
authored
11 project format (#446)
* Migrates to pyproject.toml Switches the build system from setup.py to pyproject.toml. This change standardizes the project's build configuration, improves dependency management, and prepares the project for future enhancements. Removes unused requirements file. * Updates minimum Python version Corrects the minimum Python version specified in pyproject.toml. The project now requires Python 3.10 or higher. * Uses installable package for dev dependencies Updates the installation of development dependencies in the linting workflow to use the installable package. This simplifies dependency management and aligns with standard Python packaging practices. * Adds pyupgrade as a dev dependency Adds `pyupgrade` to the development dependencies. This enables developers to automatically upgrade Python syntax to more modern versions, improving code maintainability and readability.
1 parent 879ac01 commit bee048e

File tree

4 files changed

+29
-30
lines changed

4 files changed

+29
-30
lines changed

.github/workflows/lint_python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Install dependencies
1212
run: |
1313
python -m pip install --upgrade pip
14-
pip install -r requirements-dev.txt
14+
pip install .[dev]
1515
- name: Lint with flake8
1616
run: flake8 ./patterns --count --show-source --statistics
1717
continue-on-error: true

pyproject.toml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,46 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel"]
2+
requires = ["setuptools >= 77.0.3"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "patterns"
6+
name = "python-patterns"
77
description = "A collection of design patterns and idioms in Python."
88
version = "0.1.0"
99
readme = "README.md"
10-
requires-python = ">=3.9"
11-
license = {text = "MIT"}
10+
requires-python = ">=3.10"
1211
classifiers = [
13-
"Programming Language :: Python :: 3.9",
1412
"Programming Language :: Python :: 3.10",
1513
"Programming Language :: Python :: 3.11",
1614
"Programming Language :: Python :: 3.12",
1715
"Programming Language :: Python :: 3.13",
1816
]
17+
dependencies= [
18+
]
19+
20+
maintainers=[
21+
{ name="faif" }
22+
]
23+
24+
[project.urls]
25+
Homepage = "https://github.com/faif/python-patterns"
26+
Repository = "https://github.com/faif/python-patterns"
27+
"Bug Tracker" = "https://github.com/faif/python-patterns/issues"
28+
Contributors = "https://github.com/faif/python-patterns/graphs/contributors"
1929

2030
[project.optional-dependencies]
21-
dev = ["pytest", "pytest-cov", "pytest-randomly", "flake8", "mypy", "coverage"]
31+
dev = [
32+
"mypy",
33+
"pipx>=1.7.1",
34+
"pyupgrade",
35+
"pytest>=6.2.0",
36+
"pytest-cov>=2.11.0",
37+
"pytest-randomly>=3.1.0",
38+
"black>=25.1.0",
39+
"build>=1.2.2",
40+
"isort>=5.7.0",
41+
"flake8>=7.1.0",
42+
"tox>=4.25.0"
43+
]
2244

2345
[tool.setuptools]
2446
packages = ["patterns"]

requirements-dev.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)