matvu 0.1.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 (50) hide show
  1. matvu-0.1.0/.github/workflows/release.yml +47 -0
  2. matvu-0.1.0/.github/workflows/test.yml +32 -0
  3. matvu-0.1.0/.gitignore +25 -0
  4. matvu-0.1.0/CHANGELOG.md +22 -0
  5. matvu-0.1.0/LICENSE +674 -0
  6. matvu-0.1.0/PKG-INFO +194 -0
  7. matvu-0.1.0/README.md +163 -0
  8. matvu-0.1.0/docs/design.md +98 -0
  9. matvu-0.1.0/docs/releasing.md +83 -0
  10. matvu-0.1.0/docs/roadmap.md +174 -0
  11. matvu-0.1.0/examples/palette_preview.py +75 -0
  12. matvu-0.1.0/examples/showcase.py +162 -0
  13. matvu-0.1.0/examples/structures/Cu.POSCAR +12 -0
  14. matvu-0.1.0/examples/structures/MoS2.POSCAR +11 -0
  15. matvu-0.1.0/examples/structures/NaCl.POSCAR +16 -0
  16. matvu-0.1.0/examples/structures/Si.POSCAR +16 -0
  17. matvu-0.1.0/examples/structures/ZnS.POSCAR +16 -0
  18. matvu-0.1.0/examples/structures/benzene.POSCAR +20 -0
  19. matvu-0.1.0/examples/structures/graphene.POSCAR +10 -0
  20. matvu-0.1.0/examples/structures/water.POSCAR +11 -0
  21. matvu-0.1.0/pyproject.toml +63 -0
  22. matvu-0.1.0/src/matvu/__init__.py +45 -0
  23. matvu-0.1.0/src/matvu/__main__.py +8 -0
  24. matvu-0.1.0/src/matvu/backends/__init__.py +46 -0
  25. matvu-0.1.0/src/matvu/backends/base.py +26 -0
  26. matvu-0.1.0/src/matvu/backends/mpl.py +259 -0
  27. matvu-0.1.0/src/matvu/backends/tracer.py +434 -0
  28. matvu-0.1.0/src/matvu/cli.py +313 -0
  29. matvu-0.1.0/src/matvu/elements.py +162 -0
  30. matvu-0.1.0/src/matvu/gallery.py +254 -0
  31. matvu-0.1.0/src/matvu/geometry.py +125 -0
  32. matvu-0.1.0/src/matvu/io/__init__.py +95 -0
  33. matvu-0.1.0/src/matvu/io/vasp.py +99 -0
  34. matvu-0.1.0/src/matvu/palettes.py +104 -0
  35. matvu-0.1.0/src/matvu/render.py +114 -0
  36. matvu-0.1.0/src/matvu/scene.py +273 -0
  37. matvu-0.1.0/src/matvu/structure.py +126 -0
  38. matvu-0.1.0/src/matvu/style.py +89 -0
  39. matvu-0.1.0/src/matvu/theme.py +131 -0
  40. matvu-0.1.0/src/matvu/viewpoint.py +406 -0
  41. matvu-0.1.0/tests/conftest.py +5 -0
  42. matvu-0.1.0/tests/test_examples.py +17 -0
  43. matvu-0.1.0/tests/test_gallery.py +77 -0
  44. matvu-0.1.0/tests/test_geometry.py +76 -0
  45. matvu-0.1.0/tests/test_render.py +104 -0
  46. matvu-0.1.0/tests/test_scene.py +100 -0
  47. matvu-0.1.0/tests/test_theme.py +103 -0
  48. matvu-0.1.0/tests/test_tracer.py +236 -0
  49. matvu-0.1.0/tests/test_vasp.py +77 -0
  50. matvu-0.1.0/tests/test_viewpoint.py +150 -0
@@ -0,0 +1,47 @@
1
+ name: release
2
+
3
+ # Publishing is triggered when a GitHub Release is published (or manually).
4
+ # PyPI upload uses Trusted Publishing (OIDC) - no API token is stored.
5
+
6
+ on:
7
+ release:
8
+ types: [published]
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+
21
+ - name: Build sdist and wheel
22
+ run: |
23
+ python -m pip install --upgrade pip build twine
24
+ python -m build
25
+ python -m twine check dist/*
26
+
27
+ - uses: actions/upload-artifact@v4
28
+ with:
29
+ name: dist
30
+ path: dist/
31
+
32
+ publish:
33
+ needs: build
34
+ runs-on: ubuntu-latest
35
+ environment:
36
+ name: pypi
37
+ url: https://pypi.org/project/matvu/
38
+ permissions:
39
+ id-token: write
40
+ steps:
41
+ - uses: actions/download-artifact@v4
42
+ with:
43
+ name: dist
44
+ path: dist/
45
+
46
+ - name: Publish to PyPI (Trusted Publishing)
47
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,32 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
15
+ env:
16
+ MPLBACKEND: Agg
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Set up Python ${{ matrix.python-version }}
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: ${{ matrix.python-version }}
24
+ cache: pip
25
+
26
+ - name: Install
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ python -m pip install -e ".[dev]"
30
+
31
+ - name: Run tests
32
+ run: python -m pytest -q
matvu-0.1.0/.gitignore ADDED
@@ -0,0 +1,25 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ build/
6
+ dist/
7
+ .venv/
8
+ venv/
9
+
10
+ # Tooling caches
11
+ .pytest_cache/
12
+ .coverage
13
+ htmlcov/
14
+ .mypy_cache/
15
+ .ruff_cache/
16
+
17
+ # Editors / OS
18
+ .DS_Store
19
+ .vscode/
20
+ .idea/
21
+ *.swp
22
+
23
+ # MatVu outputs
24
+ examples/out/
25
+ preview.png
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-10-10)
4
+
5
+ First public release.
6
+
7
+ - `Structure` model with a POSCAR reader and a plugin registry for more formats
8
+ - Automatic viewpoint optimisation:
9
+ - maximin projected-dispersion search for crystals, constrained to a
10
+ comfortable above-horizon elevation band
11
+ - one shared three-quarter view for all cubic lattices
12
+ - ~30 degree tilt for layered 2D materials; face-on views for molecules
13
+ - Two rendering backends:
14
+ - `tracer` (default): pure-numpy analytic ray casting with exact occlusion
15
+ and supersampling, orthographic or perspective camera
16
+ - `matplotlib`: fast preview backend (PNG / PDF / SVG)
17
+ - Look presets: `3d` (shaded), `toon` (cel/animation), `flat` (pure fill)
18
+ - Designed element palettes (`matvu`, `jmol`, `pastel`) and user-editable
19
+ TOML themes covering colours, radii and style overrides
20
+ - Symmetric periodic boundary decoration, unit cell frames for 3D crystals,
21
+ transparent output by default, fixed-canvas option for uniform-scale series
22
+ - CLI: `matvu render`, `matvu info`, `matvu candidates`, `matvu theme`