polyxios 0.1.0.dev1__tar.gz → 0.2.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 (87) hide show
  1. polyxios-0.2.0/.github/dependabot.yml +15 -0
  2. polyxios-0.2.0/.github/release.yml +14 -0
  3. polyxios-0.2.0/.github/workflows/build_docs.yml +44 -0
  4. polyxios-0.2.0/.github/workflows/check_format.yml +46 -0
  5. polyxios-0.2.0/.github/workflows/precommit_update.yml +26 -0
  6. polyxios-0.2.0/.github/workflows/release.yml +141 -0
  7. polyxios-0.2.0/.github/workflows/test.yml +58 -0
  8. {polyxios-0.1.0.dev1 → polyxios-0.2.0}/.gitignore +16 -3
  9. polyxios-0.2.0/.pre-commit-config.yaml +37 -0
  10. {polyxios-0.1.0.dev1/polyxios → polyxios-0.2.0/.spin}/__init__.py +0 -0
  11. polyxios-0.2.0/.spin/cmds.py +637 -0
  12. polyxios-0.2.0/CHANGES.rst +58 -0
  13. {polyxios-0.1.0.dev1 → polyxios-0.2.0}/LICENSE +0 -0
  14. polyxios-0.2.0/PKG-INFO +227 -0
  15. polyxios-0.2.0/README.md +178 -0
  16. polyxios-0.2.0/docs/Makefile +14 -0
  17. polyxios-0.2.0/docs/api/index.rst +11 -0
  18. polyxios-0.2.0/docs/changelog.rst +3 -0
  19. polyxios-0.2.0/docs/conf.py +29 -0
  20. polyxios-0.2.0/docs/contributing.rst +58 -0
  21. polyxios-0.2.0/docs/development.rst +196 -0
  22. polyxios-0.2.0/docs/index.rst +20 -0
  23. polyxios-0.2.0/docs/installation.rst +32 -0
  24. polyxios-0.2.0/docs/usage.rst +143 -0
  25. polyxios-0.2.0/examples/read_multiblock_vtp.py +202 -0
  26. polyxios-0.2.0/examples/read_parallel_vtk.py +266 -0
  27. polyxios-0.2.0/examples/render_fetched_model.py +33 -0
  28. polyxios-0.2.0/examples/visualize_mesh.py +159 -0
  29. polyxios-0.2.0/meson.build +20 -0
  30. polyxios-0.2.0/polyxios/__init__.py +78 -0
  31. polyxios-0.2.0/polyxios/_backend.py +30 -0
  32. polyxios-0.2.0/polyxios/_core.pxd +12 -0
  33. polyxios-0.2.0/polyxios/_core.pyx +138 -0
  34. polyxios-0.2.0/polyxios/_core_fallback.py +89 -0
  35. polyxios-0.2.0/polyxios/_element_types.py +237 -0
  36. polyxios-0.2.0/polyxios/_registry.py +100 -0
  37. polyxios-0.2.0/polyxios/_types.py +197 -0
  38. polyxios-0.2.0/polyxios/codecs/__init__.py +0 -0
  39. polyxios-0.2.0/polyxios/codecs/_mesh.py +687 -0
  40. polyxios-0.2.0/polyxios/codecs/_obj.py +269 -0
  41. polyxios-0.2.0/polyxios/codecs/_ply.py +722 -0
  42. polyxios-0.2.0/polyxios/codecs/_pvti.py +44 -0
  43. polyxios-0.2.0/polyxios/codecs/_pvtp.py +44 -0
  44. polyxios-0.2.0/polyxios/codecs/_pvtr.py +44 -0
  45. polyxios-0.2.0/polyxios/codecs/_pvts.py +44 -0
  46. polyxios-0.2.0/polyxios/codecs/_pvtu.py +44 -0
  47. polyxios-0.2.0/polyxios/codecs/_splat.py +131 -0
  48. polyxios-0.2.0/polyxios/codecs/_vti.py +229 -0
  49. polyxios-0.2.0/polyxios/codecs/_vtk.py +1868 -0
  50. polyxios-0.2.0/polyxios/codecs/_vtk_parse.pyx +94 -0
  51. polyxios-0.2.0/polyxios/codecs/_vtk_xml.py +316 -0
  52. polyxios-0.2.0/polyxios/codecs/_vtm.py +44 -0
  53. polyxios-0.2.0/polyxios/codecs/_vtp.py +281 -0
  54. polyxios-0.2.0/polyxios/codecs/_vtp_base64.pyx +37 -0
  55. polyxios-0.2.0/polyxios/codecs/_vtr.py +227 -0
  56. polyxios-0.2.0/polyxios/codecs/_vts.py +219 -0
  57. polyxios-0.2.0/polyxios/codecs/_vtu.py +265 -0
  58. polyxios-0.2.0/polyxios/codecs/meson.build +41 -0
  59. polyxios-0.2.0/polyxios/exceptions.py +50 -0
  60. polyxios-0.2.0/polyxios/fetcher.py +185 -0
  61. polyxios-0.2.0/polyxios/meson.build +49 -0
  62. polyxios-0.2.0/polyxios/transforms.py +533 -0
  63. polyxios-0.2.0/polyxios/validate.py +149 -0
  64. polyxios-0.2.0/polyxios/version.py +9 -0
  65. polyxios-0.2.0/pyproject.toml +77 -0
  66. polyxios-0.2.0/tests/__init__.py +0 -0
  67. polyxios-0.2.0/tests/codecs/__init__.py +0 -0
  68. polyxios-0.2.0/tests/codecs/test_mesh.py +224 -0
  69. polyxios-0.2.0/tests/codecs/test_obj.py +83 -0
  70. polyxios-0.2.0/tests/codecs/test_ply.py +181 -0
  71. polyxios-0.2.0/tests/codecs/test_splat.py +111 -0
  72. polyxios-0.2.0/tests/codecs/test_vti.py +109 -0
  73. polyxios-0.2.0/tests/codecs/test_vtk.py +411 -0
  74. polyxios-0.2.0/tests/codecs/test_vtk_meta.py +99 -0
  75. polyxios-0.2.0/tests/codecs/test_vtp.py +91 -0
  76. polyxios-0.2.0/tests/codecs/test_vtr.py +104 -0
  77. polyxios-0.2.0/tests/codecs/test_vts.py +100 -0
  78. polyxios-0.2.0/tests/codecs/test_vtu.py +100 -0
  79. polyxios-0.2.0/tests/test_transforms.py +186 -0
  80. polyxios-0.2.0/tests/test_validate.py +68 -0
  81. polyxios-0.2.0/tests/test_validate_header.py +155 -0
  82. polyxios-0.2.0/tools/commit-msg.py +155 -0
  83. polyxios-0.2.0/tools/github_stats.py +192 -0
  84. polyxios-0.2.0/tools/gitversion.py +86 -0
  85. polyxios-0.1.0.dev1/PKG-INFO +0 -36
  86. polyxios-0.1.0.dev1/README.md +0 -1
  87. polyxios-0.1.0.dev1/pyproject.toml +0 -10
@@ -0,0 +1,15 @@
1
+ # Set update schedule for GitHub Actions
2
+
3
+ version: 2
4
+ updates:
5
+
6
+ - package-ecosystem: "github-actions"
7
+ directory: "/"
8
+ schedule:
9
+ interval: "weekly"
10
+ commit-message:
11
+ prefix: "MNT"
12
+ groups:
13
+ actions:
14
+ patterns:
15
+ - "*"
@@ -0,0 +1,14 @@
1
+ changelog:
2
+ categories:
3
+ - title: Breaking changes
4
+ labels: [breaking]
5
+ - title: New features
6
+ labels: [enhancement, feature, new]
7
+ - title: Bug fixes
8
+ labels: [bug, fix, regression]
9
+ - title: Documentation
10
+ labels: [documentation, docs]
11
+ - title: Maintenance
12
+ labels: [maintenance, dependencies, ci, refactor]
13
+ - title: Other changes
14
+ labels: ['*']
@@ -0,0 +1,44 @@
1
+ name: Build Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 30
16
+
17
+ steps:
18
+ - uses: actions/checkout@v7
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - uses: actions/setup-python@v6
23
+ with:
24
+ python-version: "3.12"
25
+
26
+ - name: Install build dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install "meson-python>=0.15" "Cython>=3.0" "numpy>=1.24" meson ninja
30
+
31
+ - name: Install polyxios with doc extras
32
+ run: pip install --no-build-isolation -e ".[doc]"
33
+
34
+ - name: Build documentation
35
+ run: |
36
+ cd docs
37
+ make html SPHINXOPTS="-W --keep-going"
38
+
39
+ - name: Upload docs artifact
40
+ uses: actions/upload-artifact@v7
41
+ with:
42
+ name: docs-html
43
+ path: docs/_build/html/
44
+ retention-days: 7
@@ -0,0 +1,46 @@
1
+ name: Code Format
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ pre-commit:
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 10
16
+ steps:
17
+ - uses: actions/checkout@v7
18
+ with:
19
+ fetch-depth: 0
20
+
21
+ - uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.12"
24
+
25
+ - uses: pre-commit/action@v3.0.1
26
+
27
+ commit-messages:
28
+ runs-on: ubuntu-latest
29
+ timeout-minutes: 5
30
+ if: github.event_name == 'pull_request'
31
+ steps:
32
+ - uses: actions/checkout@v7
33
+ with:
34
+ fetch-depth: 0
35
+
36
+ - uses: actions/setup-python@v6
37
+ with:
38
+ python-version: "3.12"
39
+
40
+ - name: Check commit messages
41
+ run: |
42
+ for sha in $(git log origin/${{ github.base_ref }}..HEAD --format=%H); do
43
+ git log -1 --format=%B "$sha" > /tmp/commit_msg
44
+ echo "Checking: $(git log -1 --format=%s $sha)"
45
+ python tools/commit-msg.py /tmp/commit_msg || exit 1
46
+ done
@@ -0,0 +1,26 @@
1
+ name: Pre-commit auto-update
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 2 * * Mon" # weekly
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ auto-update:
10
+ if: github.repository_owner == 'fury-gl'
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v7
14
+
15
+ - uses: actions/setup-python@v6
16
+
17
+ - uses: browniebroke/pre-commit-autoupdate-action@v1.0.1
18
+
19
+ - uses: peter-evans/create-pull-request@v8.1.1
20
+ if: always()
21
+ with:
22
+ token: ${{ secrets.GITHUB_TOKEN }}
23
+ branch: update/pre-commit-hooks
24
+ title: "MNT: update pre-commit hooks"
25
+ commit-message: "MNT: update pre-commit hooks"
26
+ body: Update versions of pre-commit hooks to latest.
@@ -0,0 +1,141 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v[0-9]*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ tag:
10
+ description: 'Tag name (use *-test suffix to skip PyPI)'
11
+ required: true
12
+ default: 'v0.0.0-test'
13
+
14
+ env:
15
+ RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
16
+
17
+ concurrency:
18
+ group: release-${{ github.ref }}
19
+ cancel-in-progress: false
20
+
21
+ jobs:
22
+ build_wheels:
23
+ name: Wheels / ${{ matrix.os }}
24
+ runs-on: ${{ matrix.os }}
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ os: [ubuntu-latest, macos-latest, windows-latest]
29
+
30
+ steps:
31
+ - uses: actions/checkout@v7
32
+ with:
33
+ fetch-depth: 0
34
+
35
+ - name: Build wheels
36
+ uses: pypa/cibuildwheel@v4.1.0
37
+
38
+ - uses: actions/upload-artifact@v7
39
+ with:
40
+ name: dist-wheels-${{ matrix.os }}
41
+ path: wheelhouse/*.whl
42
+
43
+ build_sdist:
44
+ name: Source distribution
45
+ runs-on: ubuntu-latest
46
+
47
+ steps:
48
+ - uses: actions/checkout@v7
49
+ with:
50
+ fetch-depth: 0
51
+
52
+ - uses: actions/setup-python@v6
53
+ with:
54
+ python-version: '3.12'
55
+
56
+ - name: Build sdist
57
+ run: |
58
+ pip install build
59
+ python -m build --sdist
60
+
61
+ - uses: actions/upload-artifact@v7
62
+ with:
63
+ name: dist-sdist
64
+ path: dist/*.tar.gz
65
+
66
+ github_release:
67
+ name: GitHub Release
68
+ needs: [build_wheels, build_sdist]
69
+ runs-on: ubuntu-latest
70
+ permissions:
71
+ contents: write
72
+
73
+ steps:
74
+ - uses: actions/checkout@v7
75
+
76
+ - uses: actions/download-artifact@v8
77
+ with:
78
+ pattern: dist-*
79
+ merge-multiple: true
80
+ path: dist/
81
+
82
+ - name: Extract changelog section
83
+ id: changelog
84
+ run: |
85
+ python - <<'EOF'
86
+ import re, os, sys
87
+ tag = os.environ["TAG"].lstrip("v")
88
+ try:
89
+ with open("CHANGES.rst") as f:
90
+ content = f.read()
91
+ pattern = rf"(?ms)^{re.escape(tag)}[^\n]*\n[-]+\n(.*?)(?=\n\S[^\n]*\n[-]+|\Z)"
92
+ m = re.search(pattern, content)
93
+ notes = m.group(1).strip() if m else ""
94
+ except Exception:
95
+ notes = ""
96
+ with open(os.environ["GITHUB_OUTPUT"], "a") as fh:
97
+ print(f"notes<<EOF_NOTES\n{notes}\nEOF_NOTES", file=fh)
98
+ EOF
99
+ env:
100
+ TAG: ${{ env.RELEASE_TAG }}
101
+
102
+ - name: Create release
103
+ env:
104
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105
+ run: |
106
+ NOTES="${{ steps.changelog.outputs.notes }}"
107
+ if [ -n "$NOTES" ]; then
108
+ echo "$NOTES" > release_notes.md
109
+ echo "" >> release_notes.md
110
+ echo "---" >> release_notes.md
111
+ gh release create "${{ env.RELEASE_TAG }}" \
112
+ dist/* \
113
+ --title "polyxios ${{ env.RELEASE_TAG }}" \
114
+ --notes-file release_notes.md \
115
+ --generate-notes
116
+ else
117
+ gh release create "${{ env.RELEASE_TAG }}" \
118
+ dist/* \
119
+ --title "polyxios ${{ env.RELEASE_TAG }}" \
120
+ --generate-notes
121
+ fi
122
+
123
+ publish_pypi:
124
+ name: PyPI
125
+ needs: [github_release]
126
+ if: ${{ !contains(github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name, 'test') }}
127
+ runs-on: ubuntu-latest
128
+ environment:
129
+ name: pypi
130
+ url: https://pypi.org/project/polyxios/
131
+ permissions:
132
+ id-token: write
133
+
134
+ steps:
135
+ - uses: actions/download-artifact@v8
136
+ with:
137
+ pattern: dist-*
138
+ merge-multiple: true
139
+ path: dist/
140
+
141
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,58 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+ schedule:
9
+ - cron: "0 2 * * Mon" # weekly
10
+
11
+ concurrency:
12
+ group: test-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ defaults:
19
+ run:
20
+ shell: bash
21
+
22
+ jobs:
23
+ test:
24
+ if: github.event_name != 'schedule' || github.repository_owner == 'fury-gl'
25
+ runs-on: ${{ matrix.os }}
26
+ timeout-minutes: 30
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ python-version: ["3.11", "3.12", "3.13"]
31
+ os: [ubuntu-latest, macos-latest, windows-latest]
32
+
33
+ steps:
34
+ - uses: actions/checkout@v7
35
+ with:
36
+ fetch-depth: 0
37
+
38
+ - name: Set up Python ${{ matrix.python-version }}
39
+ uses: actions/setup-python@v6
40
+ with:
41
+ python-version: ${{ matrix.python-version }}
42
+
43
+ - name: Install OpenMP (macOS)
44
+ if: runner.os == 'macOS'
45
+ run: |
46
+ brew install libomp
47
+ echo "CC=clang" >> "$GITHUB_ENV"
48
+
49
+ - name: Install build dependencies
50
+ run: |
51
+ python -m pip install --upgrade pip
52
+ pip install "meson-python>=0.15" "Cython>=3.0" "numpy>=1.24" meson ninja
53
+
54
+ - name: Install polyxios
55
+ run: pip install --no-build-isolation -e ".[dev]"
56
+
57
+ - name: Run tests
58
+ run: pytest tests/ -v --durations=10
@@ -197,9 +197,9 @@ cython_debug/
197
197
  .abstra/
198
198
 
199
199
  # Visual Studio Code
200
- # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
200
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
201
201
  # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
202
- # and can be added to the global gitignore or merged into this file. However, if you prefer,
202
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
203
203
  # you could uncomment the following to ignore the entire vscode folder
204
204
  # .vscode/
205
205
  # Temporary file for partial code execution
@@ -208,6 +208,14 @@ tempCodeRunnerFile.py
208
208
  # Ruff stuff:
209
209
  .ruff_cache/
210
210
 
211
+ # Claude Code
212
+ CLAUDE.md
213
+ .claude/
214
+
215
+ # Cython generated C files
216
+ *.c
217
+ *.cpp
218
+
211
219
  # PyPI configuration file
212
220
  .pypirc
213
221
 
@@ -217,4 +225,9 @@ marimo/_lsp/
217
225
  __marimo__/
218
226
 
219
227
  # Streamlit
220
- .streamlit/secrets.toml
228
+ .streamlit/secrets.toml
229
+ prompts/
230
+ tmp/
231
+ generated/
232
+ .vscode/
233
+ AGENTS.md
@@ -0,0 +1,37 @@
1
+ ci:
2
+ autoupdate_schedule: monthly
3
+
4
+ repos:
5
+ - repo: https://github.com/pre-commit/pre-commit-hooks
6
+ rev: v6.0.0
7
+ hooks:
8
+ - id: trailing-whitespace
9
+ - id: end-of-file-fixer
10
+ - id: mixed-line-ending
11
+ - id: check-yaml
12
+ - id: check-toml
13
+ - id: check-added-large-files
14
+ - id: check-case-conflict
15
+ - id: check-merge-conflict
16
+ - id: detect-private-key
17
+
18
+ - repo: https://github.com/astral-sh/ruff-pre-commit
19
+ rev: v0.15.18
20
+ hooks:
21
+ - id: ruff
22
+ args: [--fix, --show-fixes]
23
+ - id: ruff-format
24
+
25
+ - repo: https://github.com/codespell-project/codespell
26
+ rev: v2.4.2
27
+ hooks:
28
+ - id: codespell
29
+ additional_dependencies: [tomli]
30
+
31
+ - repo: local
32
+ hooks:
33
+ - id: polyxios-commit-msg
34
+ name: polyxios commit message
35
+ entry: python tools/commit-msg.py
36
+ language: python
37
+ stages: [commit-msg]