Skip to content

Commit 53dc750

Browse files
committed
move to src folder layout and hatch for package management
1 parent a6f8fa9 commit 53dc750

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+18
-13
lines changed

pyproject.toml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "machinevision-toolbox-python"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
authors = [
55
{ name = "Peter Corke", email = "rvc@petercorke.com" },
66
{ name = "Dorian Tsai" },
@@ -38,11 +38,10 @@ keywords = [
3838
]
3939

4040
dependencies = [
41-
"numpy>=1.17.4, < 2.0.0", # OpenCV requires numpy 1.x
41+
"numpy",
4242
"scipy",
4343
"matplotlib",
4444
"opencv-python",
45-
"open3d",
4645
"opencv-contrib-python",
4746
"spatialmath-python",
4847
"pgraph-python",
@@ -59,6 +58,12 @@ dependencies = [
5958

6059
[project.optional-dependencies]
6160

61+
# Options:
62+
# dev - development tools
63+
# docs - documentation building tools
64+
# jupyter - jupyter notebook support
65+
# open3d - open3d support (open3d generally won't work with latest Python)
66+
6267
dev = ["pytest", "coverage", "flake8"]
6368

6469
docs = [
@@ -73,27 +78,26 @@ docs = [
7378

7479
jupyter = ["ipywidgets", "ipympl"]
7580

81+
open3d = ["open3d-python"]
82+
7683
[tool.pytest.ini_options]
77-
pythonpath = [".", "machinevisiontoolbox", "mvtb-data", "mvtb-data/mvtbdata"]
84+
pythonpath = ["src", "mvtb-data", "mvtb-data/mvtbdata"]
7885

7986
[project.scripts]
8087
mvtbtool = "machinevisiontoolbox.bin.mvtbtool:main"
8188
imtool = "machinevisiontoolbox.bin.imtool:main"
89+
tagtool = "machinevisiontoolbox.bin.tagtool:main"
8290

8391
[build-system]
84-
requires = ["setuptools", "oldest-supported-numpy"]
85-
build-backend = "setuptools.build_meta"
92+
requires = ["hatchling"]
93+
build-backend = "hatchling.build"
8694

87-
[tool.setuptools]
88-
packages = [
89-
"machinevisiontoolbox",
90-
"machinevisiontoolbox.base",
91-
"machinevisiontoolbox.blocks",
92-
]
95+
[tool.hatch.build.targets.wheel]
96+
packages = ["src/machinevisiontoolbox"]
9397

9498
[tool.black]
9599
line-length = 88
96-
target-version = ['py37']
100+
target-version = ['py311']
97101
exclude = "camera_derivatives.py"
98102

99103
[tool.coverage.run]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class Blob:
8181
uc = None
8282
vc = None
8383
level = None
84+
_moments = None
8485

8586
def __init__(self):
8687
"""Constructor for Blob class
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)