DeepSDFStruct 1.7.2__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 (183) hide show
  1. deepsdfstruct-1.7.2/.deepsource.toml +10 -0
  2. deepsdfstruct-1.7.2/.github/copilot-instructions.md +5 -0
  3. deepsdfstruct-1.7.2/.github/workflows/copilot-setup-steps.yml +43 -0
  4. deepsdfstruct-1.7.2/.github/workflows/docs.yml +43 -0
  5. deepsdfstruct-1.7.2/.github/workflows/publish.yml +56 -0
  6. deepsdfstruct-1.7.2/.github/workflows/test.yml +76 -0
  7. deepsdfstruct-1.7.2/.gitignore +132 -0
  8. deepsdfstruct-1.7.2/.pre-commit-config.yaml +5 -0
  9. deepsdfstruct-1.7.2/AGENT_INSTRUCTIONS.md +17 -0
  10. deepsdfstruct-1.7.2/DeepSDFStruct/SDF.py +1734 -0
  11. deepsdfstruct-1.7.2/DeepSDFStruct/__init__.py +66 -0
  12. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/__init__.py +69 -0
  13. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/create_screenshots_from_plyfiles.py +65 -0
  14. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/data.py +258 -0
  15. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/metrics/__init__.py +14 -0
  16. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/metrics/mesh_to_analytical.py +24 -0
  17. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/models.py +197 -0
  18. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/networks/__init__.py +8 -0
  19. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/networks/analytic_round_cross.py +105 -0
  20. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/networks/deep_sdf_decoder.py +155 -0
  21. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/networks/hierarchical_deep_sdf_decoder.py +139 -0
  22. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/networks/hierarchical_positional_sdf_decoder.py +190 -0
  23. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/networks/resnet_positional_sdf_decoder.py +108 -0
  24. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/nn_utils.py +70 -0
  25. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/plotting.py +143 -0
  26. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/reconstruction.py +165 -0
  27. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/training.py +840 -0
  28. deepsdfstruct-1.7.2/DeepSDFStruct/deep_sdf/workspace.py +363 -0
  29. deepsdfstruct-1.7.2/DeepSDFStruct/design_of_experiments.py +235 -0
  30. deepsdfstruct-1.7.2/DeepSDFStruct/flexicubes/__init__.py +15 -0
  31. deepsdfstruct-1.7.2/DeepSDFStruct/flexicubes/flexicubes.py +1005 -0
  32. deepsdfstruct-1.7.2/DeepSDFStruct/flexicubes/tables.py +2338 -0
  33. deepsdfstruct-1.7.2/DeepSDFStruct/flexisquares/__init__.py +15 -0
  34. deepsdfstruct-1.7.2/DeepSDFStruct/flexisquares/flexisquares.py +967 -0
  35. deepsdfstruct-1.7.2/DeepSDFStruct/flexisquares/tables.py +63 -0
  36. deepsdfstruct-1.7.2/DeepSDFStruct/lattice_structure.py +254 -0
  37. deepsdfstruct-1.7.2/DeepSDFStruct/local_shapes.py +226 -0
  38. deepsdfstruct-1.7.2/DeepSDFStruct/mesh.py +1184 -0
  39. deepsdfstruct-1.7.2/DeepSDFStruct/optimization.py +357 -0
  40. deepsdfstruct-1.7.2/DeepSDFStruct/parametrization.py +215 -0
  41. deepsdfstruct-1.7.2/DeepSDFStruct/pretrained_models.py +128 -0
  42. deepsdfstruct-1.7.2/DeepSDFStruct/sampling.py +670 -0
  43. deepsdfstruct-1.7.2/DeepSDFStruct/sdf_operations.py +990 -0
  44. deepsdfstruct-1.7.2/DeepSDFStruct/sdf_primitives.py +1416 -0
  45. deepsdfstruct-1.7.2/DeepSDFStruct/splinepy_unitcells/__init__.py +35 -0
  46. deepsdfstruct-1.7.2/DeepSDFStruct/splinepy_unitcells/chi_3D.py +1617 -0
  47. deepsdfstruct-1.7.2/DeepSDFStruct/splinepy_unitcells/cross_lattice.py +165 -0
  48. deepsdfstruct-1.7.2/DeepSDFStruct/splinepy_unitcells/double_lattice_extruded.py +298 -0
  49. deepsdfstruct-1.7.2/DeepSDFStruct/splinepy_unitcells/snappy_3d.py +544 -0
  50. deepsdfstruct-1.7.2/DeepSDFStruct/torch_spline.py +446 -0
  51. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/analytic_round_cross/LatentCodes/latest.pth +0 -0
  52. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/analytic_round_cross/ModelParameters/latest.pth +0 -0
  53. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/analytic_round_cross/OptimizerParameters/latest.pth +0 -0
  54. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/analytic_round_cross/specs.json +45 -0
  55. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/chi_and_cross/LatentCodes/latest.pth +0 -0
  56. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/chi_and_cross/Logs.pth +0 -0
  57. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/chi_and_cross/ModelParameters/latest.pth +0 -0
  58. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/chi_and_cross/OptimizerParameters/latest.pth +0 -0
  59. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/chi_and_cross/specs.json +76 -0
  60. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives/LatentCodes/latest.pth +0 -0
  61. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives/ModelParameters/latest.pth +0 -0
  62. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives/OptimizerParameters/latest.pth +0 -0
  63. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives/specs.json +46 -0
  64. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives_2d/LatentCodes/latest.pth +0 -0
  65. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives_2d/ModelParameters/latest.pth +0 -0
  66. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives_2d/OptimizerParameters/latest.pth +0 -0
  67. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/primitives_2d/specs.json +46 -0
  68. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/round_cross/LatentCodes/latest.pth +0 -0
  69. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/round_cross/Logs.pth +0 -0
  70. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/round_cross/ModelParameters/latest.pth +0 -0
  71. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/round_cross/OptimizerParameters/latest.pth +0 -0
  72. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/round_cross/specs.json +45 -0
  73. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment/LatentCodes/latent_code_data_map.json +106 -0
  74. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment/specs.json +45 -0
  75. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment/training_summary.json +10 -0
  76. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_hierarchical/LatentCodes/latent_code_data_map.json +106 -0
  77. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_hierarchical/specs.json +45 -0
  78. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_hierarchical/training_summary.json +10 -0
  79. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latent_code_data_map.json +5006 -0
  80. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/LatentCodes/latest.pth +0 -0
  81. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/Logs.png +0 -0
  82. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/ModelParameters/latest.pth +0 -0
  83. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/OptimizerParameters/latest.pth +0 -0
  84. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/specs.json +83 -0
  85. deepsdfstruct-1.7.2/DeepSDFStruct/trained_models/test_experiment_homogenization/training_summary.json +10 -0
  86. deepsdfstruct-1.7.2/DeepSDFStruct/utils.py +96 -0
  87. deepsdfstruct-1.7.2/DeepSDFStruct/visualization/latent_viewer.py +211 -0
  88. deepsdfstruct-1.7.2/DeepSDFStruct/visualization/latent_viewer_cli.py +8 -0
  89. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/PKG-INFO +44 -0
  90. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/SOURCES.txt +181 -0
  91. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/dependency_links.txt +1 -0
  92. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/requires.txt +38 -0
  93. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/scm_file_list.json +178 -0
  94. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/scm_version.json +8 -0
  95. deepsdfstruct-1.7.2/DeepSDFStruct.egg-info/top_level.txt +5 -0
  96. deepsdfstruct-1.7.2/LICENSE +208 -0
  97. deepsdfstruct-1.7.2/MANIFEST.in +1 -0
  98. deepsdfstruct-1.7.2/NOTICE +67 -0
  99. deepsdfstruct-1.7.2/PKG-INFO +44 -0
  100. deepsdfstruct-1.7.2/README.md +527 -0
  101. deepsdfstruct-1.7.2/SDF_FEATURE_TRACKING.md +66 -0
  102. deepsdfstruct-1.7.2/benchmarks/generate_sdf_showcase.py +622 -0
  103. deepsdfstruct-1.7.2/benchmarks/sdf_from_mesh_benchmark.py +52 -0
  104. deepsdfstruct-1.7.2/benchmarks/sdf_from_mesh_comparison.md +33 -0
  105. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/boolean/difference_sphere_box.png +0 -0
  106. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/boolean/union_sphere_box.png +0 -0
  107. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/circular_array_sphere.png +0 -0
  108. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/dilate_sphere.png +0 -0
  109. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/mirror_sphere.png +0 -0
  110. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/repeat_sphere.png +0 -0
  111. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/revolve_circle.png +0 -0
  112. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/shell_sphere.png +0 -0
  113. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/operations/transformations/twist_torus.png +0 -0
  114. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/2D/circle.png +0 -0
  115. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/2D/equilateral_triangle.png +0 -0
  116. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/2D/hexagon.png +0 -0
  117. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/2D/polygon_pentagon.png +0 -0
  118. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/2D/rectangle.png +0 -0
  119. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/2D/rounded_rectangle.png +0 -0
  120. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/box.png +0 -0
  121. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/capped_cone.png +0 -0
  122. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/capped_cylinder.png +0 -0
  123. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/capsule.png +0 -0
  124. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/cone.png +0 -0
  125. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/corner_spheres.png +0 -0
  126. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/cross_ms.png +0 -0
  127. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/cylinder.png +0 -0
  128. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/dodecahedron.png +0 -0
  129. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/ellipsoid.png +0 -0
  130. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/icosahedron.png +0 -0
  131. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/octahedron.png +0 -0
  132. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/pyramid.png +0 -0
  133. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/rounded_box.png +0 -0
  134. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/rounded_cone.png +0 -0
  135. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/rounded_cylinder.png +0 -0
  136. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/sphere.png +0 -0
  137. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/tetrahedron.png +0 -0
  138. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/torus.png +0 -0
  139. deepsdfstruct-1.7.2/benchmarks/sdf_showcase/primitives/3D/wireframe_box.png +0 -0
  140. deepsdfstruct-1.7.2/docs/Makefile +20 -0
  141. deepsdfstruct-1.7.2/docs/api_reference.rst +6 -0
  142. deepsdfstruct-1.7.2/docs/conf.py +60 -0
  143. deepsdfstruct-1.7.2/docs/index.rst +136 -0
  144. deepsdfstruct-1.7.2/docs/make.bat +35 -0
  145. deepsdfstruct-1.7.2/docs/qr_code_github.png +0 -0
  146. deepsdfstruct-1.7.2/docs/qr_code_paper.png +0 -0
  147. deepsdfstruct-1.7.2/docs/readme_images/example_output_01.png +0 -0
  148. deepsdfstruct-1.7.2/docs/readme_images/example_output_02.png +0 -0
  149. deepsdfstruct-1.7.2/docs/readme_images/example_output_03.png +0 -0
  150. deepsdfstruct-1.7.2/docs/readme_images/example_output_04.png +0 -0
  151. deepsdfstruct-1.7.2/example.ipynb +533 -0
  152. deepsdfstruct-1.7.2/pyproject.toml +77 -0
  153. deepsdfstruct-1.7.2/setup.cfg +4 -0
  154. deepsdfstruct-1.7.2/tests/data/chairs/1005.obj +282 -0
  155. deepsdfstruct-1.7.2/tests/data/chairs/1024.obj +222 -0
  156. deepsdfstruct-1.7.2/tests/data/chairs/README.md +1 -0
  157. deepsdfstruct-1.7.2/tests/data/circular_balls_test_case.stl +0 -0
  158. deepsdfstruct-1.7.2/tests/data/cone.stl +1794 -0
  159. deepsdfstruct-1.7.2/tests/data/example_disconnectd_mesh.inp +1784 -0
  160. deepsdfstruct-1.7.2/tests/data/example_line_mesh.vtk +0 -0
  161. deepsdfstruct-1.7.2/tests/data/stanford_bunny.stl +0 -0
  162. deepsdfstruct-1.7.2/tests/data/sweep_test_case.stl +0 -0
  163. deepsdfstruct-1.7.2/tests/test_DOE.py +49 -0
  164. deepsdfstruct-1.7.2/tests/test_elongate_sdf.py +195 -0
  165. deepsdfstruct-1.7.2/tests/test_flexisquares.py +187 -0
  166. deepsdfstruct-1.7.2/tests/test_generate_dataset.py +76 -0
  167. deepsdfstruct-1.7.2/tests/test_lattice_evaluation.py +137 -0
  168. deepsdfstruct-1.7.2/tests/test_mesh_export.py +137 -0
  169. deepsdfstruct-1.7.2/tests/test_mesh_functions.py +49 -0
  170. deepsdfstruct-1.7.2/tests/test_networks.py +71 -0
  171. deepsdfstruct-1.7.2/tests/test_pretrained_models.py +40 -0
  172. deepsdfstruct-1.7.2/tests/test_reconstruction.py +101 -0
  173. deepsdfstruct-1.7.2/tests/test_sdf_from_mesh.py +52 -0
  174. deepsdfstruct-1.7.2/tests/test_sdf_functions.py +117 -0
  175. deepsdfstruct-1.7.2/tests/test_sdf_primitives.py +668 -0
  176. deepsdfstruct-1.7.2/tests/test_sdf_trimesh_comparison.py +482 -0
  177. deepsdfstruct-1.7.2/tests/test_splinepy_unitcells.py +64 -0
  178. deepsdfstruct-1.7.2/tests/test_structural_optimization.py +178 -0
  179. deepsdfstruct-1.7.2/tests/test_torch_spline.py +216 -0
  180. deepsdfstruct-1.7.2/tests/test_train_model.py +110 -0
  181. deepsdfstruct-1.7.2/tests/test_training_data_ids.py +41 -0
  182. deepsdfstruct-1.7.2/tests/tmp_outputs/temp_file.txt +0 -0
  183. deepsdfstruct-1.7.2/uv.lock +5385 -0
@@ -0,0 +1,10 @@
1
+ version = 1
2
+
3
+ [[analyzers]]
4
+ name = "python"
5
+
6
+ [analyzers.meta]
7
+ runtime_version = "3.x.x"
8
+
9
+ [[code_formatters]]
10
+ name = "black"
@@ -0,0 +1,5 @@
1
+ # Copilot Instructions
2
+
3
+ ## Lock files
4
+
5
+ Never modify or touch lock files (e.g., `uv.lock`, `package-lock.json`, `poetry.lock`). These files are managed by their respective package managers and should not be edited manually or as part of automated changes.
@@ -0,0 +1,43 @@
1
+ name: "Copilot Setup Steps"
2
+
3
+ # Automatically run the setup steps when they are changed to allow for easy validation, and
4
+ # allow manual testing through the repository's "Actions" tab
5
+ on:
6
+ workflow_dispatch:
7
+ push:
8
+ paths:
9
+ - .github/workflows/copilot-setup-steps.yml
10
+ pull_request:
11
+ paths:
12
+ - .github/workflows/copilot-setup-steps.yml
13
+
14
+ jobs:
15
+ # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16
+ copilot-setup-steps:
17
+ runs-on: ubuntu-latest
18
+
19
+ # Set the permissions to the lowest permissions possible needed for your steps.
20
+ # Copilot will be given its own token for its operations.
21
+ permissions:
22
+ # If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission.
23
+ # If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
24
+ contents: read
25
+
26
+ # You can define any steps you want, and they will run before the agent starts.
27
+ # If you do not check out your code, Copilot will do this for you.
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+
32
+ - name: Set up Python 3.12
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: 3.12
36
+
37
+ - name: Setup UV with cache
38
+ uses: astral-sh/setup-uv@v6
39
+ with:
40
+ enable-cache: true
41
+
42
+ - name: Sync dependencies with uv
43
+ run: uv sync
@@ -0,0 +1,43 @@
1
+ name: Create Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ docs:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Set up Python 3.13
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.13"
23
+
24
+ - name: Setup UV with cache
25
+ uses: astral-sh/setup-uv@v6
26
+ with:
27
+ enable-cache: true
28
+
29
+ - name: Sync dependencies with uv
30
+ run: uv sync --extra docs --no-editable
31
+
32
+ - name: Create Docs
33
+ run: |
34
+ uv run sphinx-autogen -o docs/source/generated docs/api_reference.rst
35
+ uv run make -C docs html
36
+
37
+ - name: Deploy to GitHub Pages
38
+ uses: peaceiris/actions-gh-pages@v4
39
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
40
+ with:
41
+ publish_branch: gh-pages
42
+ github_token: ${{ secrets.GITHUB_TOKEN }}
43
+ publish_dir: docs/_build/html
@@ -0,0 +1,56 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ test:
10
+ uses: ./.github/workflows/test.yml
11
+ secrets: inherit
12
+
13
+ publish:
14
+ needs: test
15
+
16
+ runs-on: ubuntu-latest
17
+
18
+ permissions:
19
+ contents: read
20
+ id-token: write
21
+
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.13"
28
+
29
+ - uses: astral-sh/setup-uv@v6
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Verify tag format
34
+ run: |
35
+ [[ "$GITHUB_REF_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]
36
+
37
+ - name: Verify package version
38
+ shell: bash
39
+ run: |
40
+ TAG="${GITHUB_REF_NAME#v}"
41
+
42
+ VERSION=$(uv version --short)
43
+
44
+ echo "Tag: $TAG"
45
+ echo "Version: $VERSION"
46
+
47
+ if [ "$TAG" != "$VERSION" ]; then
48
+ echo "::error::Git tag ($TAG) does not match package version ($VERSION)"
49
+ exit 1
50
+ fi
51
+
52
+ - run: uv sync
53
+
54
+ - run: uv build
55
+
56
+ - run: uv publish
@@ -0,0 +1,76 @@
1
+ name: Test Python Package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_call:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ${{ matrix.os }}
13
+
14
+ env:
15
+ HF_HOME: ${{ github.workspace }}/.cache/huggingface
16
+ HF_HUB_CACHE: ${{ github.workspace }}/.cache/huggingface/hub
17
+ HF_HUB_DOWNLOAD_TIMEOUT: "60"
18
+ HF_HUB_ETAG_TIMEOUT: "30"
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+
21
+ strategy:
22
+ matrix:
23
+ os: [ubuntu-latest, macos-latest]
24
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
25
+
26
+ steps:
27
+ - name: Checkout code
28
+ uses: actions/checkout@v4
29
+
30
+ - name: Set up Python ${{ matrix.python-version }}
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+
35
+ - name: Setup UV with cache
36
+ uses: astral-sh/setup-uv@v6
37
+ with:
38
+ enable-cache: true
39
+
40
+ - name: Cache huggingface
41
+ id: hf-cache
42
+ uses: actions/cache@v4
43
+ with:
44
+ path: ${{ github.workspace }}/.cache/huggingface
45
+ key: huggingface-${{ hashFiles('pyproject.toml') }}
46
+ restore-keys: |
47
+ huggingface-
48
+
49
+ - name: Ensure Hugging Face cache directories exist
50
+ run: |
51
+ mkdir -p "$HF_HUB_CACHE"
52
+
53
+ - name: Show Hugging Face cache status
54
+ run: |
55
+ echo "hf-cache-hit=${{ steps.hf-cache.outputs.cache-hit }}"
56
+ echo "HF_HOME=$HF_HOME"
57
+ ls -la "$(dirname "$HF_HOME")" || true
58
+ du -sh "$HF_HOME" || true
59
+ du -sh "$HF_HUB_CACHE" || true
60
+
61
+ - name: Sync dependencies with uv
62
+ run: uv sync
63
+
64
+ - name: Run tests
65
+ run: uv run pytest --cov=DeepSDFStruct --cov-report=term-missing --cov-report=xml tests
66
+
67
+ - name: Show Hugging Face cache after tests
68
+ if: always()
69
+ run: |
70
+ echo "Post-test Hugging Face cache usage"
71
+ du -sh "$HF_HOME" || true
72
+ du -sh "$HF_HUB_CACHE" || true
73
+
74
+ - name: Coveralls
75
+ if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest'
76
+ uses: coverallsapp/github-action@v2
@@ -0,0 +1,132 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+ MANIFEST
26
+
27
+ # Virtual environments
28
+ venv/
29
+ env/
30
+ .venv/
31
+ ENV/
32
+ env.bak/
33
+ venv.bak/
34
+ .python-version
35
+
36
+ # PyInstaller
37
+ *.manifest
38
+ *.spec
39
+
40
+ # Installer logs
41
+ pip-log.txt
42
+ pip-delete-this-directory.txt
43
+
44
+ # Unit test / coverage reports
45
+ htmlcov/
46
+ .tox/
47
+ .nox/
48
+ .coverage
49
+ .coverage.*
50
+ .cache
51
+ nosetests.xml
52
+ coverage.xml
53
+ *.cover
54
+ *.py,cover
55
+
56
+ # Pytest
57
+ .pytest_cache/
58
+
59
+ # mypy
60
+ .mypy_cache/
61
+ .dmypy.json
62
+ dmypy.json
63
+
64
+ # Pyre type checker
65
+ .pyre/
66
+
67
+ # pylint
68
+ pylint-report.txt
69
+ pylint-global.txt
70
+
71
+ # Bandit
72
+ bandit.json
73
+
74
+ # PyCharm / VSCode
75
+ .idea/
76
+ .vscode/
77
+ *.code-workspace
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # macOS
83
+ .DS_Store
84
+
85
+ # Windows
86
+ Thumbs.db
87
+ ehthumbs.db
88
+ Desktop.ini
89
+
90
+ # VS Code
91
+ .vscode/
92
+
93
+ # ruff
94
+ .ruff_cache
95
+
96
+ # Editor backups
97
+ *~
98
+ *.swp
99
+ *.swo
100
+
101
+ # Pytorch intermediate files
102
+ *.pth
103
+ !latest.pth
104
+
105
+ # Files generated during testing
106
+ DeepSDFStruct/trained_models/test_experiment/**/latest.pth
107
+ DeepSDFStruct/trained_models/test_experiment_hierarchical/**/latest.pth
108
+ DeepSDFStruct/trained_models/test_experiment/**/Logs.png
109
+ DeepSDFStruct/trained_models/test_experiment_hierarchical/**/Logs.png
110
+ DeepSDFStruct/trained_models/**/Reconstructions/*
111
+ training_data
112
+ tests/tmp_outputs
113
+ *.vtk
114
+
115
+ # doc temp files
116
+ docs/_build
117
+ docs/source/generated
118
+
119
+ # work in progress files
120
+ wip
121
+ examples
122
+ reconstruction
123
+ todo
124
+
125
+ # confidential files
126
+ confidential*
127
+
128
+ # slurm files
129
+ slurm-*.out
130
+
131
+ # intermediate model runs
132
+ mlruns
@@ -0,0 +1,5 @@
1
+ repos:
2
+ - repo: https://github.com/psf/black-pre-commit-mirror
3
+ rev: 26.5.1
4
+ hooks:
5
+ - id: black
@@ -0,0 +1,17 @@
1
+ AGENT_INSTRUCTIONS.md
2
+ # Agent Instructions
3
+
4
+ This file contains specific instructions for agents working in this environment.
5
+
6
+ ## Running Python Code
7
+
8
+ In order to run python code, use 'uv run python [your commmand]'
9
+
10
+ NEVER append 2>&1 to your commands
11
+ ## Context
12
+
13
+ This project uses uv for Python dependency management. Always wrap python commands with 'uv run' to ensure proper environment setup.
14
+
15
+ ## Formatting
16
+ always run black on the files that you touched or generated to keep aligned with the repository formatting.
17
+