Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
187 lines (172 loc) · 5.8 KB
/
Copy pathpyproject.toml
File metadata and controls
187 lines (172 loc) · 5.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[project]
name = "simplecadapi"
version = "2.2.5"
description = "A simplified OCP-native CAD modeling Python API"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "倪旌哲", email = "nijingzhe@zju.edu.cn" }]
maintainers = [{ name = "倪旌哲", email = "nijingzhe@zju.edu.cn" }]
requires-python = ">=3.10,<3.14"
keywords = ["cad", "modeling", "3d", "design", "ocp", "opencascade"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Manufacturing",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Visualization",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=1.21.0",
"rich>=14.0.0",
"cadquery-ocp>=7.9.3.1",
"jsonschema>=4.25.1,<5.0.0",
"rfc8785>=0.1.4,<0.2.0",
"typing-extensions>=4.12,<5",
"tomli>=2.0,<3; python_version < '3.11'",
"py-slvs==1.0.6",
"ocp-gordon>=0.2,<0.3",
"ezdxf>=1.4.4",
"marimo>=0.25.0",
"plotly>=7.1.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"mypy>=1.0",
"black>=23.0",
"isort>=5.0",
"pymupdf>=1.28.2",
]
drawing = [
"pymupdf>=1.28.2",
]
editor = [
"starlette>=1.7.0",
"uvicorn>=0.54.0",
"websockets>=16.1.1",
]
inspect = [
"matplotlib>=3.7.0",
]
whucad = [
"h5py>=3.8",
]
gmsh = [
"gmsh>=4.15,<5",
]
fem = [
"gmsh>=4.15,<5",
"ccx2paraview[VTK]>=3.2,<4",
]
[project.urls]
Homepage = "https://github.com/PhySpace/SimpleCADAPI"
Repository = "https://github.com/PhySpace/SimpleCADAPI"
Documentation = "https://github.com/PhySpace/SimpleCADAPI#readme"
Issues = "https://github.com/PhySpace/SimpleCADAPI/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
# Metadata-Version 2.5 is newer than what twine 6.x validates; keep the
# published metadata at 2.4 until the toolchain accepts 2.5.
core-metadata-version = "2.4"
# Ship harness-neutral source; sca skill compiles it on the user's machine.
packages = ["src/simplecadapi"]
include = ["src/**/*"]
# The built webui (`cd editor-web && npm run build`) is git-ignored; ship it
# with `sca edit` when it has been built.
artifacts = ["src/simplecadapi/editor/webui/**"]
[tool.hatch.build.targets.wheel.force-include]
"docs/skill" = "simplecadapi/skill/resources/docs/skill"
"skillproj.toml" = "simplecadapi/skill/resources/skillproj.toml"
# The notebooks `sca example u_link` copies out.
"examples/u_link_motor_mount/u_link.py" = "simplecadapi/example/resources/u_link_motor_mount/u_link.py"
"examples/u_link_motor_mount/shell.py" = "simplecadapi/example/resources/u_link_motor_mount/shell.py"
"examples/u_link_motor_mount/u_link_motor_mount.py" = "simplecadapi/example/resources/u_link_motor_mount/u_link_motor_mount.py"
"examples/u_link_motor_mount/dimensions.py" = "simplecadapi/example/resources/u_link_motor_mount/dimensions.py"
"examples/u_link_motor_mount/common.py" = "simplecadapi/example/resources/u_link_motor_mount/common.py"
[tool.hatch.build.targets.sdist]
core-metadata-version = "2.4"
# The release builds its wheel from this sdist, so the built webui has to be in it.
artifacts = ["src/simplecadapi/editor/webui/**"]
include = [
"/README.md",
"/LICENSE",
"/pyproject.toml",
"/MANIFEST.in",
"/skillproj.toml",
"/src",
"/docs",
]
exclude = [
"/.python-version",
"/uv.lock",
"/test",
"/tests",
"/skills",
"/examples",
]
# The sdist leaves out /examples, but `sca example u_link` builds its wheel
# from these five notebooks (the wheel is built from the sdist on release).
[tool.hatch.build.targets.sdist.force-include]
"examples/u_link_motor_mount/u_link.py" = "examples/u_link_motor_mount/u_link.py"
"examples/u_link_motor_mount/shell.py" = "examples/u_link_motor_mount/shell.py"
"examples/u_link_motor_mount/u_link_motor_mount.py" = "examples/u_link_motor_mount/u_link_motor_mount.py"
"examples/u_link_motor_mount/dimensions.py" = "examples/u_link_motor_mount/dimensions.py"
"examples/u_link_motor_mount/common.py" = "examples/u_link_motor_mount/common.py"
[dependency-groups]
dev = [
"twine>=6.1.0",
"pytest",
"pymupdf>=1.28.2",
# the editor tests (test/test_editor.py) need the editor extra's packages
"starlette>=1.7.0",
"uvicorn>=0.54.0",
"websockets>=16.1.1",
"jupyterlab>=4.5.5",
"ipykernel>=6.29.5",
"matplotlib>=3.10.8",
"numpy-stl>=3.2.0",
"trimesh>=4.11.3",
"datamodel-code-generator==0.32.0",
"ty>=0.0.18",
]
[tool.ty.environment]
python-version = "3.10"
# FreeCAD runtime payloads are exec'd inside FreeCAD's embedded interpreter;
# GRAPH_NODES / App / Part etc. are runtime-injected globals by design.
[[tool.ty.overrides]]
include = ["src/simplecadapi/translator/freecad_translator/runtime/**/*.py"]
[tool.ty.overrides.rules]
unresolved-import = "ignore"
unresolved-reference = "ignore"
[tool.ty.rules]
# OCP/VTK are compiled C-extension bindings that ship no .pyi stubs, and
# example scripts import sibling modules — import resolution is
# environmental noise in this repo, not signal. Real import typos surface
# at runtime and in the test suite.
unresolved-import = "ignore"
[tool.ty.src]
include = ["src", "test", "tests", "examples", "tools"]
exclude = [
"**/__pycache__/**",
".venv/**",
"build/**",
"dist/**",
"output/**",
]
[tool.pytest.ini_options]
testpaths = ["test", "tests"]
[project.scripts]
sca = "simplecadapi.cli:main"
# The marimo editor runs SimpleCAD notebooks' cells with this executor.
[project.entry-points."marimo.cell.executor"]
simplecadapi = "simplecadapi.runtime.executor:executor_factory"