packingcubes 0.2.1__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 (47) hide show
  1. packingcubes-0.2.1/.gitattributes +2 -0
  2. packingcubes-0.2.1/.github/dependabot.yml +11 -0
  3. packingcubes-0.2.1/.github/workflows/ci.yml +49 -0
  4. packingcubes-0.2.1/.github/workflows/pypi-publish.yml +105 -0
  5. packingcubes-0.2.1/.github/workflows/ruff.yml +8 -0
  6. packingcubes-0.2.1/.gitignore +219 -0
  7. packingcubes-0.2.1/.gitlint +14 -0
  8. packingcubes-0.2.1/.pre-commit-config.yaml +15 -0
  9. packingcubes-0.2.1/CHANGELOG.md +319 -0
  10. packingcubes-0.2.1/LICENSE +21 -0
  11. packingcubes-0.2.1/PKG-INFO +77 -0
  12. packingcubes-0.2.1/README.md +38 -0
  13. packingcubes-0.2.1/cliff.toml +100 -0
  14. packingcubes-0.2.1/doc/example_packed.jpg +0 -0
  15. packingcubes-0.2.1/doc/packed_format.md +70 -0
  16. packingcubes-0.2.1/examples/Basic_Usage.py +167 -0
  17. packingcubes-0.2.1/examples/Benchmarking.py +780 -0
  18. packingcubes-0.2.1/examples/Example_PackedTree.py +457 -0
  19. packingcubes-0.2.1/examples/Profiling.py +221 -0
  20. packingcubes-0.2.1/examples/timing_tests.py +850 -0
  21. packingcubes-0.2.1/examples/timing_tests.sh +48 -0
  22. packingcubes-0.2.1/packingcubes/__init__.py +25 -0
  23. packingcubes-0.2.1/packingcubes/bounding_box.py +953 -0
  24. packingcubes-0.2.1/packingcubes/configuration.py +91 -0
  25. packingcubes-0.2.1/packingcubes/cubes.py +803 -0
  26. packingcubes-0.2.1/packingcubes/data_objects.py +434 -0
  27. packingcubes-0.2.1/packingcubes/octree.py +1293 -0
  28. packingcubes-0.2.1/packingcubes/packed_tree/__init__.py +19 -0
  29. packingcubes-0.2.1/packingcubes/packed_tree/kdtree.py +870 -0
  30. packingcubes-0.2.1/packingcubes/packed_tree/packed_node.py +319 -0
  31. packingcubes-0.2.1/packingcubes/packed_tree/packed_tree.py +492 -0
  32. packingcubes-0.2.1/packingcubes/packed_tree/packed_tree_meta.py +201 -0
  33. packingcubes-0.2.1/packingcubes/packed_tree/packed_tree_numba.py +1404 -0
  34. packingcubes-0.2.1/packingcubes/tree_vis.py +880 -0
  35. packingcubes-0.2.1/packingcubes.egg-info/PKG-INFO +77 -0
  36. packingcubes-0.2.1/packingcubes.egg-info/SOURCES.txt +45 -0
  37. packingcubes-0.2.1/packingcubes.egg-info/dependency_links.txt +1 -0
  38. packingcubes-0.2.1/packingcubes.egg-info/requires.txt +17 -0
  39. packingcubes-0.2.1/packingcubes.egg-info/top_level.txt +1 -0
  40. packingcubes-0.2.1/pixi.lock +4440 -0
  41. packingcubes-0.2.1/pyproject.toml +193 -0
  42. packingcubes-0.2.1/setup.cfg +4 -0
  43. packingcubes-0.2.1/tests/conftest.py +302 -0
  44. packingcubes-0.2.1/tests/test_bounding_box.py +576 -0
  45. packingcubes-0.2.1/tests/test_data_objects.py +56 -0
  46. packingcubes-0.2.1/tests/test_kdtree.py +246 -0
  47. packingcubes-0.2.1/tests/test_octree.py +587 -0
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
@@ -0,0 +1,11 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "monthly"
8
+ groups:
9
+ dependencies:
10
+ patterns:
11
+ - "*"
@@ -0,0 +1,49 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - "**"
7
+ - "!.github/**"
8
+ - ".github/workflows/ci.yml"
9
+ pull_request:
10
+ paths:
11
+ - "**"
12
+ - "!.github/**"
13
+ - ".github/workflows/ci.yml"
14
+ workflow_dispatch:
15
+
16
+ jobs:
17
+ build:
18
+ # strategy:
19
+ # matrix:
20
+ # ox: [ubuntu-latest, macos-latest]
21
+ # python-version: ["3.12", "3.13"]
22
+ # runs-on: ${{ matrix.os }}
23
+ runs-on: ubuntu-latest
24
+ name: CI/CD testing
25
+ steps:
26
+ - uses: actions/checkout@v6
27
+ - name: Install pixi and run tests
28
+ uses: prefix-dev/setup-pixi@v0.9.4
29
+ with:
30
+ pixi-version: v0.66.0
31
+ cache: true
32
+ cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
33
+ environments: test
34
+ - run: pixi run python -c "import sys; print(sys.version)"
35
+ - run: pixi run test --cov-report=xml --cov-report=html
36
+ # - name: Set up Python ${{ matrix.python-version }}
37
+ # uses: actions/setup-python@v5
38
+ # with:
39
+ # python-version: ${{ matrix.python-version }}
40
+ # # You can test your matrix by printing the current Python version
41
+ # - name: Display Python version
42
+ # run: python -c "import sys; print(sys.version)"
43
+ # - name: Install dependencies
44
+ # run: |
45
+ # python -m pip install --upgrade pip
46
+ # python -m pip install ".[tests]"
47
+ # - name: Test with pytest
48
+ # run: |
49
+ # python -m pytest --cov=packingcubes --cov-report=xml --cov-report=html .
@@ -0,0 +1,105 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ release-build:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ with:
18
+ # Fetch full history for setuptools-scm
19
+ fetch-depth: 0
20
+
21
+ - uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.x"
24
+ - name: Install pixi
25
+ uses: prefix-dev/setup-pixi@v0.9.4
26
+ with:
27
+ pixi-version: v0.66.0
28
+ cache: true
29
+ cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
30
+ environments: build
31
+ - name: Build
32
+ run: |
33
+ pixi run -e build python -c "import packingcubes;print(packingcubes.__version__)"
34
+ pixi run -e build python -m build
35
+
36
+ - name: Upload distributions
37
+ uses: actions/upload-artifact@v7
38
+ with:
39
+ name: release-dists
40
+ path: dist/
41
+
42
+ pypi-publish:
43
+ runs-on: ubuntu-latest
44
+
45
+ needs:
46
+ - release-build
47
+
48
+ permissions:
49
+ # IMPORTANT: this permission is mandatory for trusted publishing
50
+ id-token: write
51
+
52
+ if: startsWith(github.ref, 'refs/tags')
53
+
54
+ # Dedicated environments with protections for publishing are strongly recommended
55
+ environment:
56
+ name: pypi
57
+ url: https://pypi.org/p/packingcubes
58
+
59
+ env:
60
+ SETUPTOOLS_SCM_OVERRIDES_FOR_PACKINGCUBES: '{local_scheme = "no-local-version"}'
61
+
62
+ steps:
63
+ - name: Retrieve release distributions
64
+ uses: actions/download-artifact@v8
65
+ with:
66
+ name: release-dists
67
+ path: dist/
68
+
69
+ - name: Publish release distributions to PyPI
70
+ uses: pypa/gh-action-pypi-publish@release/v1
71
+ with:
72
+ print-hash: true
73
+ verbose: true
74
+
75
+ testpypi-publish:
76
+ runs-on: ubuntu-latest
77
+
78
+ needs:
79
+ - release-build
80
+
81
+ permissions:
82
+ # IMPORTANT: this permission is mandatory for trusted publishing
83
+ id-token: write
84
+
85
+ # Dedicated environments with protections for publishing are strongly recommended
86
+ environment:
87
+ name: testpypi
88
+ url: https://test.pypi.org/p/packingcubes
89
+
90
+ env:
91
+ SETUPTOOLS_SCM_OVERRIDES_FOR_PACKINGCUBES: '{local_scheme = "no-local-version"}'
92
+
93
+ steps:
94
+ - name: Retrieve release distributions
95
+ uses: actions/download-artifact@v8
96
+ with:
97
+ name: release-dists
98
+ path: dist/
99
+
100
+ - name: Publish release distributions to PyPI
101
+ uses: pypa/gh-action-pypi-publish@release/v1
102
+ with:
103
+ repository-url: https://test.pypi.org/legacy/
104
+ print-hash: true
105
+ verbose: true
@@ -0,0 +1,8 @@
1
+ name: Ruff Formatting
2
+ on: [ push, pull_request ]
3
+ jobs:
4
+ ruff:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v6
8
+ - uses: astral-sh/ruff-action@v3
@@ -0,0 +1,219 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
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
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # packingcubes versioning
30
+ packingcubes/_version.py
31
+
32
+ # packingcubes configuration
33
+ packingcubes.toml
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py.cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+ cover/
59
+
60
+ # Translations
61
+ *.mo
62
+ *.pot
63
+
64
+ # Django stuff:
65
+ *.log
66
+ local_settings.py
67
+ db.sqlite3
68
+ db.sqlite3-journal
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ .pybuilder/
82
+ target/
83
+
84
+ # Jupyter Notebook
85
+ .ipynb_checkpoints
86
+
87
+ # IPython
88
+ profile_default/
89
+ ipython_config.py
90
+
91
+ # pyenv
92
+ # For a library or package, you might want to ignore these files since the code is
93
+ # intended to run in multiple environments; otherwise, check them in:
94
+ # .python-version
95
+
96
+ # pipenv
97
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
99
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
100
+ # install all needed dependencies.
101
+ #Pipfile.lock
102
+
103
+ # UV
104
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ #uv.lock
108
+
109
+ # poetry
110
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
114
+ #poetry.lock
115
+ #poetry.toml
116
+
117
+ # pdm
118
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
119
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
120
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
121
+ #pdm.lock
122
+ #pdm.toml
123
+ .pdm-python
124
+ .pdm-build/
125
+
126
+ # pixi
127
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
128
+ #pixi.lock
129
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
130
+ # in the .venv directory. It is recommended not to include this directory in version control.
131
+ .pixi
132
+
133
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
134
+ __pypackages__/
135
+
136
+ # Celery stuff
137
+ celerybeat-schedule
138
+ celerybeat.pid
139
+
140
+ # SageMath parsed files
141
+ *.sage.py
142
+
143
+ # Environments
144
+ .env
145
+ .envrc
146
+ .venv
147
+ env/
148
+ venv/
149
+ ENV/
150
+ env.bak/
151
+ venv.bak/
152
+
153
+ # Spyder project settings
154
+ .spyderproject
155
+ .spyproject
156
+
157
+ # Rope project settings
158
+ .ropeproject
159
+
160
+ # mkdocs documentation
161
+ /site
162
+
163
+ # mypy
164
+ .mypy_cache/
165
+ .dmypy.json
166
+ dmypy.json
167
+
168
+ # Pyre type checker
169
+ .pyre/
170
+
171
+ # pytype static type analyzer
172
+ .pytype/
173
+
174
+ # Cython debug symbols
175
+ cython_debug/
176
+
177
+ # PyCharm
178
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
179
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
180
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
181
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
182
+ #.idea/
183
+
184
+ # Abstra
185
+ # Abstra is an AI-powered process automation framework.
186
+ # Ignore directories containing user credentials, local state, and settings.
187
+ # Learn more at https://abstra.io/docs
188
+ .abstra/
189
+
190
+ # Visual Studio Code
191
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
192
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
193
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
194
+ # you could uncomment the following to ignore the entire vscode folder
195
+ # .vscode/
196
+
197
+ # Ruff stuff:
198
+ .ruff_cache/
199
+
200
+ # PyPI configuration file
201
+ .pypirc
202
+
203
+ # Cursor
204
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
205
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
206
+ # refer to https://docs.cursor.com/context/ignore-files
207
+ .cursorignore
208
+ .cursorindexingignore
209
+
210
+ # Marimo
211
+ marimo/_static/
212
+ marimo/_lsp/
213
+ __marimo__/
214
+
215
+
216
+ # Profilers
217
+ _ipython*profile
218
+ profile*.html
219
+ profile*.json
@@ -0,0 +1,14 @@
1
+ [general]
2
+ # Ignore rules, reference them by id or name (comma-separated)
3
+ ignore=body-is-missing
4
+
5
+ # Enable specific community contributed rules
6
+ # contrib=
7
+
8
+ # Set path to search for user-defined rules
9
+ # extra-path=
10
+
11
+ ### Configuring rules ###
12
+ # Specify configuration options for individual rules here
13
+ [body-changed-file-mention]
14
+ files=README.md, pyproject.toml
@@ -0,0 +1,15 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.14.2
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff
8
+ args: [ --fix ]
9
+ # Run the formatter.
10
+ - id: ruff-format
11
+
12
+ - repo: https://github.com/jorisroovers/gitlint
13
+ rev: v0.19.1 # Fill in a tag / sha here (e.g. v0.19.1)
14
+ hooks:
15
+ - id: gitlint