Skip to content

Commit cdd706f

Browse files
committed
feat: added pyproject.toml
1 parent a2f99d1 commit cdd706f

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "mpesa-sdk"
7+
dynamic = ["version"]
8+
description = "A Python SDK for integrating with M-Pesa APIs"
9+
readme = "README.md"
10+
license = { text = "APACHE-2.0" }
11+
requires-python = ">=3.10"
12+
authors = [
13+
{ name = "John Kagunda", email = "johnmkagunda@gmail.com" }
14+
]
15+
maintainers = [
16+
{ name = "John Kagunda", email = "johnmkagunda@gmail.com" }
17+
]
18+
classifiers = [
19+
"Development Status :: 4 - Beta",
20+
"Intended Audience :: Developers",
21+
"License :: OSI Approved :: Apache Software License",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3.12",
25+
"Operating System :: OS Independent",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
27+
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
28+
"Typing :: Typed"
29+
]
30+
keywords = ["mpesa", "sdk", "payment", "africa", "flask", "django", "fastapi", "rest", "api"]
31+
urls = { Homepage = "https://github.com/rafaeljohn9/mpesa-daraja-sdk", Repository = "https://github.com/rafaeljohn9/mpesa-daraja-sdk" }
32+
33+
[project.optional-dependencies]
34+
dev = [
35+
"ruff",
36+
"pytest",
37+
"pytest-cov",
38+
"build",
39+
"twine",
40+
"pydantic",
41+
"mypy",
42+
"hatch-vcs",
43+
"hatchling",
44+
"hatch",
45+
"requests",
46+
"coverage",
47+
"types-requests",
48+
]
49+
install = [
50+
"pydantic",
51+
"requests"
52+
]
53+
54+
[tool.hatch.version]
55+
source = "vcs"
56+
57+
[tool.hatch.build]
58+
include = [
59+
"mpesa_sdk/**/*",
60+
"pyproject.toml",
61+
]
62+
63+
[tool.hatch.build.targets.wheel]
64+
packages = ["mpesa_sdk"]
65+
66+
# Ruff configuration
67+
[tool.ruff]
68+
target-version = "py310"
69+
70+
[tool.ruff.lint]
71+
select = ["D", "E", "W"] # Enable docstring checks, pycodestyle errors, and warnings
72+
ignore = [
73+
"D104", # Missing docstring in public package
74+
"D105", # Missing docstring in magic method
75+
]
76+
77+
[tool.ruff.lint.pydocstyle]
78+
convention = "google"
79+
80+
81+
82+
[tool.ruff.lint.isort]
83+
known-first-party = ["mpesa_sdk"]
84+
85+
[tool.ruff.lint.per-file-ignores]
86+
"__init__.py" = ["D104", "F401"]
87+
88+
# Testing configuration
89+
[tool.pytest.ini_options]
90+
testpaths = ["tests"]
91+
addopts = "-v -s --cov=mpesa_sdk --cov-report=html --cov-report=term"
92+
93+
94+
[tool.mypy]
95+
enable_error_code = ["ignore-without-comment"]
96+
plugins = ["pydantic.mypy"]

0 commit comments

Comments
 (0)