mlx3d 0.2.1__tar.gz → 0.3.0__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 (187) hide show
  1. mlx3d-0.3.0/.github/workflows/publish.yml +106 -0
  2. {mlx3d-0.2.1 → mlx3d-0.3.0}/.gitignore +3 -0
  3. {mlx3d-0.2.1 → mlx3d-0.3.0}/CONTRIBUTING.md +21 -0
  4. {mlx3d-0.2.1 → mlx3d-0.3.0}/PKG-INFO +1 -1
  5. {mlx3d-0.2.1 → mlx3d-0.3.0}/pyproject.toml +12 -2
  6. mlx3d-0.3.0/src/mlx3d/__init__.py +49 -0
  7. mlx3d-0.3.0/src/mlx3d/_version.py +24 -0
  8. mlx3d-0.2.1/.github/workflows/publish.yml +0 -40
  9. mlx3d-0.2.1/src/mlx3d/__init__.py +0 -36
  10. {mlx3d-0.2.1 → mlx3d-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  11. {mlx3d-0.2.1 → mlx3d-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  12. {mlx3d-0.2.1 → mlx3d-0.3.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  13. {mlx3d-0.2.1 → mlx3d-0.3.0}/.github/workflows/documentation.yml +0 -0
  14. {mlx3d-0.2.1 → mlx3d-0.3.0}/.github/workflows/tests.yml +0 -0
  15. {mlx3d-0.2.1 → mlx3d-0.3.0}/CHANGELOG.md +0 -0
  16. {mlx3d-0.2.1 → mlx3d-0.3.0}/CITATION.cff +0 -0
  17. {mlx3d-0.2.1 → mlx3d-0.3.0}/CODE_OF_CONDUCT.md +0 -0
  18. {mlx3d-0.2.1 → mlx3d-0.3.0}/LICENSE +0 -0
  19. {mlx3d-0.2.1 → mlx3d-0.3.0}/Logo.jpeg +0 -0
  20. {mlx3d-0.2.1 → mlx3d-0.3.0}/README.md +0 -0
  21. {mlx3d-0.2.1 → mlx3d-0.3.0}/SECURITY.md +0 -0
  22. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/cameras.md +0 -0
  23. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/capture.md +0 -0
  24. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/datasets.md +0 -0
  25. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/io.md +0 -0
  26. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/losses.md +0 -0
  27. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/nn.md +0 -0
  28. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/ops.md +0 -0
  29. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/renderer.md +0 -0
  30. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/splatting.md +0 -0
  31. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/structures.md +0 -0
  32. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/transforms.md +0 -0
  33. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/utils.md +0 -0
  34. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/api/viewer.md +0 -0
  35. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/capture_castle.jpg +0 -0
  36. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/fast_4dgs_juggle.mp4 +0 -0
  37. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/fast_4dgs_juggle_strip.png +0 -0
  38. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/fast_truck_diff_x50.png +0 -0
  39. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/fast_truck_fast.png +0 -0
  40. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/fast_truck_reference.png +0 -0
  41. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/gallery_gsplat.png +0 -0
  42. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/gallery_nerf.png +0 -0
  43. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/logo.jpeg +0 -0
  44. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/mlx3d-icon.png +0 -0
  45. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/mlx3d-logo.png +0 -0
  46. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/render_aa.png +0 -0
  47. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/render_lit_sphere.png +0 -0
  48. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/render_lit_torus.png +0 -0
  49. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/render_normals.png +0 -0
  50. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/render_textured.png +0 -0
  51. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/v020_lego_ngp.png +0 -0
  52. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/v020_truck_depth_hi.png +0 -0
  53. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/v020_truck_normals_hi.png +0 -0
  54. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/assets/v020_truck_render_hi.png +0 -0
  55. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/benchmarks.md +0 -0
  56. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/conventions.md +0 -0
  57. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/index.md +0 -0
  58. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/quickstart.md +0 -0
  59. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/capture.md +0 -0
  60. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/extending.md +0 -0
  61. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/fast_rendering.md +0 -0
  62. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/gaussian_splatting.md +0 -0
  63. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/hashgrid_nerf.md +0 -0
  64. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/mesh_lighting.md +0 -0
  65. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/mesh_optimization.md +0 -0
  66. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/mesh_rendering.md +0 -0
  67. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/nerf.md +0 -0
  68. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/tutorials/pointcloud_fitting.md +0 -0
  69. {mlx3d-0.2.1 → mlx3d-0.3.0}/docs/viewer.md +0 -0
  70. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/README.md +0 -0
  71. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/benchmark.py +0 -0
  72. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/benchmark_fast_rasterization.py +0 -0
  73. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/benchmark_gaussian_splatting.py +0 -0
  74. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/extend_renderer.py +0 -0
  75. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/extract_mesh.py +0 -0
  76. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/fit_gaussians.py +0 -0
  77. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/fit_mesh.py +0 -0
  78. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/fit_nerf.py +0 -0
  79. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/fit_pointcloud.py +0 -0
  80. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/play_dynamic_gaussians.py +0 -0
  81. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/raytrace_volume.py +0 -0
  82. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/refine_pose.py +0 -0
  83. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/render_mesh.py +0 -0
  84. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/render_mesh_lit.py +0 -0
  85. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/sdf_csg.py +0 -0
  86. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/train_gaussian_splatting.py +0 -0
  87. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/train_nerf.py +0 -0
  88. {mlx3d-0.2.1 → mlx3d-0.3.0}/examples/train_ngp_nerf.py +0 -0
  89. {mlx3d-0.2.1 → mlx3d-0.3.0}/mkdocs.yml +0 -0
  90. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cameras/__init__.py +0 -0
  91. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cameras/cameras.py +0 -0
  92. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/capture/__init__.py +0 -0
  93. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/capture/colmap_wrap.py +0 -0
  94. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/capture/frames.py +0 -0
  95. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/capture/pipeline.py +0 -0
  96. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/capture/sfm.py +0 -0
  97. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cli/__init__.py +0 -0
  98. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cli/capture.py +0 -0
  99. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cli/compact.py +0 -0
  100. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cli/eval.py +0 -0
  101. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/cli/render.py +0 -0
  102. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/datasets/__init__.py +0 -0
  103. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/datasets/blender.py +0 -0
  104. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/datasets/colmap.py +0 -0
  105. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/datasets/images.py +0 -0
  106. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/datasets/instant_ngp.py +0 -0
  107. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/io/__init__.py +0 -0
  108. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/io/gltf_io.py +0 -0
  109. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/io/image_io.py +0 -0
  110. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/io/obj_io.py +0 -0
  111. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/io/ply_io.py +0 -0
  112. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/losses/__init__.py +0 -0
  113. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/losses/chamfer.py +0 -0
  114. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/losses/image_metrics.py +0 -0
  115. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/losses/lpips.py +0 -0
  116. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/losses/mesh_losses.py +0 -0
  117. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/losses/point_mesh.py +0 -0
  118. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/__init__.py +0 -0
  119. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/accel.py +0 -0
  120. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/fused_mlp.py +0 -0
  121. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/hashgrid.py +0 -0
  122. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/instant_ngp.py +0 -0
  123. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/nerf.py +0 -0
  124. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/nn/occupancy.py +0 -0
  125. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/__init__.py +0 -0
  126. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/ball_query.py +0 -0
  127. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/geometry.py +0 -0
  128. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/knn.py +0 -0
  129. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/marching_cubes.py +0 -0
  130. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/ray_mesh.py +0 -0
  131. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/sample_points.py +0 -0
  132. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/sdf.py +0 -0
  133. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/ops/subdivide.py +0 -0
  134. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/__init__.py +0 -0
  135. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/mesh.py +0 -0
  136. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/points.py +0 -0
  137. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/protocols.py +0 -0
  138. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/rasterizer.py +0 -0
  139. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/rays.py +0 -0
  140. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/renderer/shading.py +0 -0
  141. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/__init__.py +0 -0
  142. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/fast.py +0 -0
  143. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/model.py +0 -0
  144. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/projection.py +0 -0
  145. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/rasterize.py +0 -0
  146. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/reference.py +0 -0
  147. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/render.py +0 -0
  148. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/sh.py +0 -0
  149. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/tiles.py +0 -0
  150. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/splatting/trainer.py +0 -0
  151. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/structures/__init__.py +0 -0
  152. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/structures/meshes.py +0 -0
  153. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/structures/pointclouds.py +0 -0
  154. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/transforms/__init__.py +0 -0
  155. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/transforms/rotations.py +0 -0
  156. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/transforms/se3.py +0 -0
  157. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/utils/__init__.py +0 -0
  158. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/utils/primitives.py +0 -0
  159. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/viewer/__init__.py +0 -0
  160. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/viewer/__main__.py +0 -0
  161. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/viewer/server.py +0 -0
  162. {mlx3d-0.2.1 → mlx3d-0.3.0}/src/mlx3d/viewer/viewer.html +0 -0
  163. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/__init__.py +0 -0
  164. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/conftest.py +0 -0
  165. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_behavior.py +0 -0
  166. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_cameras.py +0 -0
  167. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_capture.py +0 -0
  168. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_cli_compact.py +0 -0
  169. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_cli_eval.py +0 -0
  170. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_cli_render.py +0 -0
  171. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_datasets.py +0 -0
  172. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_image_io.py +0 -0
  173. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_import.py +0 -0
  174. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_io.py +0 -0
  175. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_mesh_rendering.py +0 -0
  176. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_nerf_renderer.py +0 -0
  177. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_ops_losses.py +0 -0
  178. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_ops_sdf.py +0 -0
  179. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_rasterizer.py +0 -0
  180. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_se3.py +0 -0
  181. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_smoke.py +0 -0
  182. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_splatting.py +0 -0
  183. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_splatting_fast.py +0 -0
  184. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_structures.py +0 -0
  185. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_transforms.py +0 -0
  186. {mlx3d-0.2.1 → mlx3d-0.3.0}/tests/test_viewer.py +0 -0
  187. {mlx3d-0.2.1 → mlx3d-0.3.0}/uv.lock +0 -0
@@ -0,0 +1,106 @@
1
+ name: publish
2
+
3
+ # Push a version tag to cut a release. The package version is derived from the
4
+ # tag by hatch-vcs (v0.3.0 -> 0.3.0), so nothing is hand-edited:
5
+ #
6
+ # git tag v0.3.0 && git push origin v0.3.0
7
+ #
8
+ # That builds the sdist/wheel, publishes to PyPI (trusted publishing, no
9
+ # token), and opens a GitHub Release with autogenerated notes.
10
+ on:
11
+ push:
12
+ tags:
13
+ # Semver with an optional pre-release suffix, e.g. v0.3.0 or v0.3.0rc1.
14
+ - "v[0-9]+.[0-9]+.[0-9]+"
15
+ - "v[0-9]+.[0-9]+.[0-9]+[a-z]*[0-9]*"
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ build:
22
+ name: Build distributions
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ with:
27
+ # hatch-vcs needs full history and tags to resolve the version.
28
+ fetch-depth: 0
29
+
30
+ - name: Verify the tag is on main
31
+ run: |
32
+ git fetch origin main --tags --force
33
+ tag_commit="$(git rev-parse "${GITHUB_REF_NAME}^{commit}")"
34
+ if ! git merge-base --is-ancestor "$tag_commit" origin/main; then
35
+ echo "::error::Tag ${GITHUB_REF_NAME} is not an ancestor of origin/main. Release only from main."
36
+ exit 1
37
+ fi
38
+
39
+ - uses: actions/setup-python@v5
40
+ with:
41
+ python-version: "3.12"
42
+
43
+ - name: Build sdist and wheel
44
+ run: |
45
+ python -m pip install --upgrade build
46
+ python -m build
47
+
48
+ - name: Verify built version matches the tag
49
+ run: |
50
+ expected="${GITHUB_REF_NAME#v}"
51
+ if [ ! -f "dist/mlx3d-${expected}-py3-none-any.whl" ]; then
52
+ echo "::error::Expected dist/mlx3d-${expected}-py3-none-any.whl but built:"
53
+ ls -1 dist/
54
+ exit 1
55
+ fi
56
+ echo "Built mlx3d ${expected} from tag ${GITHUB_REF_NAME}."
57
+
58
+ - uses: actions/upload-artifact@v4
59
+ with:
60
+ name: dist
61
+ path: dist/
62
+
63
+ publish-pypi:
64
+ name: Publish to PyPI
65
+ needs: build
66
+ runs-on: ubuntu-latest
67
+ environment: pypi
68
+ permissions:
69
+ id-token: write # trusted publishing
70
+ steps:
71
+ - uses: actions/download-artifact@v4
72
+ with:
73
+ name: dist
74
+ path: dist/
75
+
76
+ - name: Publish distributions to PyPI
77
+ uses: pypa/gh-action-pypi-publish@release/v1
78
+
79
+ github-release:
80
+ name: Create GitHub Release
81
+ needs: publish-pypi
82
+ runs-on: ubuntu-latest
83
+ permissions:
84
+ contents: write # create the release
85
+ steps:
86
+ - uses: actions/checkout@v4
87
+ with:
88
+ fetch-depth: 0
89
+
90
+ - uses: actions/download-artifact@v4
91
+ with:
92
+ name: dist
93
+ path: dist/
94
+
95
+ - name: Create release with autogenerated notes
96
+ env:
97
+ GH_TOKEN: ${{ github.token }}
98
+ run: |
99
+ prerelease=""
100
+ case "${GITHUB_REF_NAME}" in
101
+ *a*|*b*|*rc*) prerelease="--prerelease" ;;
102
+ esac
103
+ gh release create "${GITHUB_REF_NAME}" dist/* \
104
+ --title "${GITHUB_REF_NAME}" \
105
+ --generate-notes \
106
+ $prerelease
@@ -170,3 +170,6 @@ outputs/
170
170
 
171
171
  # Local planning notes
172
172
  TODO.md
173
+
174
+ # hatch-vcs generated version file
175
+ src/mlx3d/_version.py
@@ -50,6 +50,27 @@ Plain pip works too: `pip install -e ".[dev,capture]"`.
50
50
  - **Performance-sensitive code** (Metal kernels, training loops) should come
51
51
  with a before/after measurement in the PR description.
52
52
 
53
+ ## Releasing (maintainers)
54
+
55
+ The package version is **derived from the git tag** by
56
+ [hatch-vcs](https://github.com/ophidian-labs/hatch-vcs) — it is never written
57
+ by hand in `pyproject.toml`, `__init__.py`, or anywhere else. To cut a release:
58
+
59
+ 1. Land everything on `main` and move the `CHANGELOG.md` `Unreleased` items
60
+ under a new dated version heading.
61
+ 2. Tag and push:
62
+
63
+ ```bash
64
+ git tag v0.3.0 # must be vMAJOR.MINOR.PATCH (rc/a/b suffixes allowed)
65
+ git push origin v0.3.0
66
+ ```
67
+
68
+ That's it. The `publish` workflow then builds the sdist/wheel (stamped
69
+ `0.3.0`), verifies the version matches the tag and that the tag is on `main`,
70
+ publishes to PyPI via trusted publishing (no API token), and opens a GitHub
71
+ Release with autogenerated notes. Between tags, local builds get a dev version
72
+ like `0.3.0.dev4+g1a2b3c4`.
73
+
53
74
  ## Reporting bugs
54
75
 
55
76
  Use the issue templates. The most useful reports include: macOS + chip model,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlx3d
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Differentiable 3D computer vision on Apple Silicon, built on MLX
5
5
  Project-URL: Homepage, https://github.com/amirhossein-razlighi/mlx3D
6
6
  Project-URL: Documentation, https://amirhossein-razlighi.github.io/mlx3D/
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["hatchling"]
2
+ requires = ["hatchling", "hatch-vcs"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "mlx3d"
7
- version = "0.2.1"
7
+ dynamic = ["version"]
8
8
  description = "Differentiable 3D computer vision on Apple Silicon, built on MLX"
9
9
  authors = [{ name = "AmirHossein Razlighi", email = "arazlighi@gmail.com" }]
10
10
  license = { text = "MIT" }
@@ -72,6 +72,16 @@ Homepage = "https://github.com/amirhossein-razlighi/mlx3D"
72
72
  Documentation = "https://amirhossein-razlighi.github.io/mlx3D/"
73
73
  Repository = "https://github.com/amirhossein-razlighi/mlx3D"
74
74
 
75
+ # Version is derived from the latest git tag (e.g. v0.3.0 -> 0.3.0) by
76
+ # hatch-vcs. Never hand-edit a version anywhere: tag the release and push.
77
+ [tool.hatch.version]
78
+ source = "vcs"
79
+
80
+ # Freeze the resolved version into the sdist so a wheel built from it (no .git)
81
+ # still gets the right number.
82
+ [tool.hatch.build.hooks.vcs]
83
+ version-file = "src/mlx3d/_version.py"
84
+
75
85
  [tool.hatch.build.targets.wheel]
76
86
  packages = ["src/mlx3d"]
77
87
 
@@ -0,0 +1,49 @@
1
+ """MLX3D: differentiable 3D computer vision on Apple Silicon, built on MLX."""
2
+
3
+ # The version is derived from the git tag at build time by hatch-vcs. Prefer
4
+ # the installed package metadata (authoritative for an installed wheel); fall
5
+ # back to the file hatch-vcs writes into the source tree, then to a sentinel
6
+ # for a bare source checkout that was never built or installed.
7
+ from importlib.metadata import PackageNotFoundError
8
+ from importlib.metadata import version as _pkg_version
9
+
10
+ try:
11
+ __version__ = _pkg_version("mlx3d")
12
+ except PackageNotFoundError: # pragma: no cover - not installed
13
+ try:
14
+ from ._version import __version__
15
+ except ImportError:
16
+ __version__ = "0.0.0+unknown"
17
+
18
+ from . import (
19
+ cameras,
20
+ capture,
21
+ datasets,
22
+ io,
23
+ losses,
24
+ nn,
25
+ ops,
26
+ renderer,
27
+ splatting,
28
+ structures,
29
+ transforms,
30
+ utils,
31
+ viewer,
32
+ )
33
+
34
+ __all__ = [
35
+ "__version__",
36
+ "cameras",
37
+ "capture",
38
+ "datasets",
39
+ "io",
40
+ "losses",
41
+ "nn",
42
+ "ops",
43
+ "renderer",
44
+ "splatting",
45
+ "structures",
46
+ "transforms",
47
+ "utils",
48
+ "viewer",
49
+ ]
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '0.3.0'
22
+ __version_tuple__ = version_tuple = (0, 3, 0)
23
+
24
+ __commit_id__ = commit_id = None
@@ -1,40 +0,0 @@
1
- name: publish
2
-
3
- on:
4
- release:
5
- types:
6
- - published
7
-
8
- permissions:
9
- contents: read
10
-
11
- jobs:
12
- pypi:
13
- name: Publish package to PyPI
14
- runs-on: ubuntu-latest
15
- environment: pypi
16
- permissions:
17
- contents: read
18
- id-token: write
19
- steps:
20
- - uses: actions/checkout@v4
21
- with:
22
- fetch-depth: 0
23
-
24
- - name: Verify release tag is on main
25
- run: |
26
- git fetch origin main --tags --force
27
- tag_commit="$(git rev-parse "refs/tags/${{ github.event.release.tag_name }}^{commit}")"
28
- git merge-base --is-ancestor "$tag_commit" origin/main
29
-
30
- - uses: actions/setup-python@v5
31
- with:
32
- python-version: "3.12"
33
-
34
- - name: Build distributions
35
- run: |
36
- python -m pip install --upgrade build
37
- python -m build
38
-
39
- - name: Publish distributions to PyPI
40
- uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,36 +0,0 @@
1
- """MLX3D: differentiable 3D computer vision on Apple Silicon, built on MLX."""
2
-
3
- __version__ = "0.2.1"
4
-
5
- from . import (
6
- cameras,
7
- capture,
8
- datasets,
9
- io,
10
- losses,
11
- nn,
12
- ops,
13
- renderer,
14
- splatting,
15
- structures,
16
- transforms,
17
- utils,
18
- viewer,
19
- )
20
-
21
- __all__ = [
22
- "__version__",
23
- "cameras",
24
- "capture",
25
- "datasets",
26
- "io",
27
- "losses",
28
- "nn",
29
- "ops",
30
- "renderer",
31
- "splatting",
32
- "structures",
33
- "transforms",
34
- "utils",
35
- "viewer",
36
- ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes