partcad-cli 0.7.3__tar.gz → 0.7.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/PKG-INFO +3 -3
  2. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/README.md +1 -1
  3. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/pyproject.toml +1 -1
  4. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/requirements.txt +1 -1
  5. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/__init__.py +1 -1
  6. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli.py +6 -0
  7. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_render.py +1 -1
  8. partcad_cli-0.7.12/src/partcad_cli/cli_test.py +110 -0
  9. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli.egg-info/PKG-INFO +3 -3
  10. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli.egg-info/SOURCES.txt +1 -0
  11. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli.egg-info/requires.txt +1 -1
  12. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/setup.cfg +0 -0
  13. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_add.py +0 -0
  14. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_info.py +0 -0
  15. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_init.py +0 -0
  16. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_inspect.py +0 -0
  17. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_install.py +0 -0
  18. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_list.py +0 -0
  19. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_status.py +0 -0
  20. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_supply_caps.py +0 -0
  21. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_supply_find.py +0 -0
  22. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_supply_order.py +0 -0
  23. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli/cli_supply_quote.py +0 -0
  24. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli.egg-info/dependency_links.txt +0 -0
  25. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli.egg-info/entry_points.txt +0 -0
  26. {partcad_cli-0.7.3 → partcad_cli-0.7.12}/src/partcad_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: partcad-cli
3
- Version: 0.7.3
3
+ Version: 0.7.12
4
4
  Summary: Command-line interface to PartCAD
5
5
  Author-email: Roman Kuzmenko <openvmp@proton.me>
6
6
  Maintainer-email: Roman Kuzmenko <openvmp@proton.me>
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.10
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: partcad==0.7.3
15
+ Requires-Dist: partcad==0.7.12
16
16
  Requires-Dist: renderlab
17
17
  Requires-Dist: rlPyCairo
18
18
  Requires-Dist: svglib
@@ -57,7 +57,7 @@ Find [more documentation here](https://partcad.readthedocs.io/en/latest/?badge=l
57
57
 
58
58
  This extension can be installed by searching for `PartCAD` in VS Code extension search form, or by browsing [its VS Code marketplace page](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad).
59
59
 
60
- ![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)
60
+ [![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad)
61
61
 
62
62
  ### Command-Line Interface
63
63
 
@@ -37,7 +37,7 @@ Find [more documentation here](https://partcad.readthedocs.io/en/latest/?badge=l
37
37
 
38
38
  This extension can be installed by searching for `PartCAD` in VS Code extension search form, or by browsing [its VS Code marketplace page](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad).
39
39
 
40
- ![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)
40
+ [![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad)
41
41
 
42
42
  ### Command-Line Interface
43
43
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "partcad-cli"
3
- version = "0.7.3"
3
+ version = "0.7.12"
4
4
  description = "Command-line interface to PartCAD"
5
5
  readme = "README.md"
6
6
  keywords = ["cadquery", "build123d", "cad", "design", "openscad", "step", "stl"]
@@ -1,4 +1,4 @@
1
- partcad==0.7.3
1
+ partcad==0.7.12
2
2
  renderlab
3
3
  rlPyCairo
4
4
  svglib
@@ -4,4 +4,4 @@ __all__ = [
4
4
  "main_cli",
5
5
  ]
6
6
 
7
- __version__: str = "0.7.3"
7
+ __version__: str = "0.7.12"
@@ -28,6 +28,7 @@ from .cli_supply_find import *
28
28
  from .cli_supply_caps import *
29
29
  from .cli_supply_order import *
30
30
  from .cli_supply_quote import *
31
+ from .cli_test import *
31
32
 
32
33
 
33
34
  # Initialize plugins that are not enabled by default
@@ -81,6 +82,7 @@ def main():
81
82
  cli_help_render(subparsers)
82
83
  cli_help_inspect(subparsers)
83
84
  cli_help_status(subparsers)
85
+ cli_help_test(subparsers)
84
86
 
85
87
  # Supply subcommands
86
88
  parser_supply = subparsers.add_parser(
@@ -209,6 +211,10 @@ def main():
209
211
  print("Unknown supply command.\n")
210
212
  parser.print_help()
211
213
 
214
+ elif args.command == "test":
215
+ with pc_logging.Process("Test", "this"):
216
+ cli_test(args, ctx)
217
+
212
218
  else:
213
219
  print("Unknown command.\n")
214
220
  parser.print_help()
@@ -33,7 +33,7 @@ def cli_help_render(subparsers: argparse.ArgumentParser):
33
33
  )
34
34
  parser_render.add_argument(
35
35
  "-t",
36
- help="The object is an assembly",
36
+ help="The type of file to export",
37
37
  dest="format",
38
38
  type=str,
39
39
  nargs="?",
@@ -0,0 +1,110 @@
1
+ #
2
+ # OpenVMP, 2023-2024
3
+ #
4
+ # Author: Roman Kuzmenko
5
+ # Created: 2023-12-23
6
+ #
7
+ # Licensed under Apache License, Version 2.0.
8
+ #
9
+
10
+ import argparse
11
+
12
+ import partcad.logging as pc_logging
13
+ import partcad.utils as pc_utils
14
+
15
+
16
+ def cli_help_test(subparsers: argparse.ArgumentParser):
17
+ parser_test = subparsers.add_parser(
18
+ "test",
19
+ help="Render the selected or all parts, assemblies and scenes in this package",
20
+ )
21
+
22
+ parser_test.add_argument(
23
+ "-P",
24
+ "--package",
25
+ help="Package to retrieve the object from",
26
+ type=str,
27
+ dest="package",
28
+ default="",
29
+ )
30
+ parser_test.add_argument(
31
+ "-r",
32
+ help="Recursively test all imported packages",
33
+ dest="recursive",
34
+ action="store_true",
35
+ )
36
+
37
+ group_type = parser_test.add_mutually_exclusive_group(required=False)
38
+ group_type.add_argument(
39
+ "-s",
40
+ help="The object is a sketch",
41
+ dest="sketch",
42
+ action="store_true",
43
+ )
44
+ group_type.add_argument(
45
+ "-i",
46
+ help="The object is an interface",
47
+ dest="interface",
48
+ action="store_true",
49
+ )
50
+ group_type.add_argument(
51
+ "-a",
52
+ help="The object is an assembly",
53
+ dest="assembly",
54
+ action="store_true",
55
+ )
56
+ group_type.add_argument(
57
+ "-S",
58
+ help="The object is a scene",
59
+ dest="scene",
60
+ action="store_true",
61
+ )
62
+
63
+ parser_test.add_argument(
64
+ "object",
65
+ help="Part (default), assembly or scene to test",
66
+ type=str,
67
+ nargs="?",
68
+ )
69
+
70
+
71
+ def cli_test(args, ctx):
72
+ package = args.package if args.package is not None else ""
73
+ if args.recursive:
74
+ start_package = pc_utils.get_child_project_path(
75
+ ctx.get_current_project_path(), package
76
+ )
77
+ all_packages = ctx.get_all_packages(start_package)
78
+ packages = list(
79
+ map(
80
+ lambda p: p["name"],
81
+ list(all_packages),
82
+ )
83
+ )
84
+ else:
85
+ packages = [package]
86
+
87
+ for package in packages:
88
+ if not args.object is None:
89
+ if not ":" in args.object:
90
+ args.object = ":" + args.object
91
+ args.package, args.object = pc_utils.resolve_resource_path(
92
+ ctx.get_current_project_path(), args.object
93
+ )
94
+
95
+ prj = ctx.get_project(package)
96
+ if args.object is None:
97
+ # Test all parts and assemblies in this project
98
+ prj.test()
99
+ else:
100
+ # Test the requested part or assembly
101
+ if args.sketch:
102
+ shape = prj.get_sketch(args.object)
103
+ elif args.interface:
104
+ shape = prj.get_interface(args.object)
105
+ elif args.assembly:
106
+ shape = prj.get_assembly(args.object)
107
+ else:
108
+ shape = prj.get_part(args.object)
109
+
110
+ shape.test()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: partcad-cli
3
- Version: 0.7.3
3
+ Version: 0.7.12
4
4
  Summary: Command-line interface to PartCAD
5
5
  Author-email: Roman Kuzmenko <openvmp@proton.me>
6
6
  Maintainer-email: Roman Kuzmenko <openvmp@proton.me>
@@ -12,7 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.10
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: partcad==0.7.3
15
+ Requires-Dist: partcad==0.7.12
16
16
  Requires-Dist: renderlab
17
17
  Requires-Dist: rlPyCairo
18
18
  Requires-Dist: svglib
@@ -57,7 +57,7 @@ Find [more documentation here](https://partcad.readthedocs.io/en/latest/?badge=l
57
57
 
58
58
  This extension can be installed by searching for `PartCAD` in VS Code extension search form, or by browsing [its VS Code marketplace page](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad).
59
59
 
60
- ![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)
60
+ [![PartCAD Visual Studio Code extension](./docs/source/images/vscode1.png)](https://marketplace.visualstudio.com/items?itemName=OpenVMP.partcad)
61
61
 
62
62
  ### Command-Line Interface
63
63
 
@@ -15,6 +15,7 @@ src/partcad_cli/cli_supply_caps.py
15
15
  src/partcad_cli/cli_supply_find.py
16
16
  src/partcad_cli/cli_supply_order.py
17
17
  src/partcad_cli/cli_supply_quote.py
18
+ src/partcad_cli/cli_test.py
18
19
  src/partcad_cli.egg-info/PKG-INFO
19
20
  src/partcad_cli.egg-info/SOURCES.txt
20
21
  src/partcad_cli.egg-info/dependency_links.txt
@@ -1,4 +1,4 @@
1
- partcad==0.7.3
1
+ partcad==0.7.12
2
2
  renderlab
3
3
  rlPyCairo
4
4
  svglib
File without changes