Skip to content

Commit cdfdb79

Browse files
committed
Replace setup.py with pyproject.toml
1 parent 8e51269 commit cdfdb79

4 files changed

Lines changed: 65 additions & 37 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ repos:
4848
- black==24.8.0
4949
- coremltools==8.2;
5050
- fire==0.7.0
51+
- hatch-requirements-txt==0.4.1
5152
- ijson==3.3.0
5253
- interrogate==1.5.0
5354
- isort==5.13.2
@@ -62,6 +63,7 @@ repos:
6263
- pytest==8.3.3
6364
- torch==2.3.1
6465
- torchvision==0.18.1
66+
- twine==6.1.0
6567
- types-PyYAML
6668
- types-flake8
6769
- types-geopandas
@@ -89,4 +91,4 @@ repos:
8991
- id: shell-fmt-docker
9092
args:
9193
- -i
92-
- "2"
94+
- '2'

pyproject.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-requirements-txt"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
6+
name = "OTVision"
7+
dynamic = ["dependencies", "version"]
8+
authors = [
9+
{ name="OpenTrafficCam contributors", email="team@opentrafficcam.org" },
10+
{ name="platomo GmbH", email="info@platomo.de" },
11+
]
12+
description = "OTVision is a core module of the OpenTrafficCam framework to perform object detection and tracking."
13+
14+
readme = "README.md"
15+
requires-python = ">=3.11"
16+
license = "GPL-3.0-only"
17+
license-files = ["LICENSE"]
18+
classifiers = [
19+
"Development Status :: 4 - Beta",
20+
"Programming Language :: Python :: 3",
21+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
22+
"Operating System :: OS Independent",
23+
]
24+
keywords = ["OpenTrafficCam", "Traffic Analysis", "Traffic Counting", "Trajectories"]
25+
26+
[project.urls]
27+
Homepage = "https://opentrafficcam.org/"
28+
Documentation = "https://opentrafficcam.org/overview/"
29+
Repository = "https://github.com/OpenTrafficCam/OTVision"
30+
Issues = "https://github.com/OpenTrafficCam/OTVision/issues"
31+
Changelog = "https://github.com/OpenTrafficCam/OTVision/releases"
32+
33+
[tool.hatch.metadata.hooks.requirements_txt]
34+
files = ["requirements.txt"]
35+
36+
[tool.hatch.version]
37+
path = "OTVision/version.py"
38+
39+
[tool.hatch.build.targets.wheel]
40+
packages = ["OTVision"]
41+
42+
[tool.hatch.build]
43+
directory = "dist"
44+
45+
[tool.black]
46+
line-length = 88
47+
48+
[tool.isort]
49+
profile = "black"
50+
51+
[tool.mypy]
52+
ignore_missing_imports = true
53+
ignore_missing_imports_per_module = true
54+
disallow_untyped_defs = true
55+
56+
[[tool.mypy.overrides]]
57+
module = "OTVision.view.*"
58+
ignore_errors = true
59+
60+
[[tool.mypy.overrides]]
61+
module = "OTVision.transform.*"
62+
ignore_errors = true

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)