llandau 0.3.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 (58) hide show
  1. llandau-0.3.1/.github/workflows/wheels.yml +122 -0
  2. llandau-0.3.1/.gitignore +6 -0
  3. llandau-0.3.1/Cargo.lock +3949 -0
  4. llandau-0.3.1/Cargo.toml +33 -0
  5. llandau-0.3.1/LICENSE +21 -0
  6. llandau-0.3.1/PKG-INFO +210 -0
  7. llandau-0.3.1/README.md +192 -0
  8. llandau-0.3.1/examples/butane.py +24 -0
  9. llandau-0.3.1/examples/explore_butane.py +12 -0
  10. llandau-0.3.1/examples/explore_trpcage.py +35 -0
  11. llandau-0.3.1/examples/live_demo.py +49 -0
  12. llandau-0.3.1/examples/paper_figures.py +82 -0
  13. llandau-0.3.1/examples/render_layers.py +65 -0
  14. llandau-0.3.1/examples/slides.py +40 -0
  15. llandau-0.3.1/pyproject.toml +25 -0
  16. llandau-0.3.1/python/llandau/__init__.py +49 -0
  17. llandau-0.3.1/python/llandau/animation.py +1195 -0
  18. llandau-0.3.1/python/llandau/axes.py +414 -0
  19. llandau-0.3.1/python/llandau/cli.py +83 -0
  20. llandau-0.3.1/python/llandau/colormaps.py +45 -0
  21. llandau-0.3.1/python/llandau/deck.py +135 -0
  22. llandau-0.3.1/python/llandau/elements.py +45 -0
  23. llandau-0.3.1/python/llandau/explorer.py +58 -0
  24. llandau-0.3.1/python/llandau/figure.py +286 -0
  25. llandau-0.3.1/python/llandau/layout.py +271 -0
  26. llandau-0.3.1/python/llandau/live.py +84 -0
  27. llandau-0.3.1/python/llandau/media.py +268 -0
  28. llandau-0.3.1/python/llandau/mobject.py +1156 -0
  29. llandau-0.3.1/python/llandau/pdb.py +31 -0
  30. llandau-0.3.1/python/llandau/plot.py +1344 -0
  31. llandau-0.3.1/python/llandau/scene.py +575 -0
  32. llandau-0.3.1/python/llandau/shapes.py +354 -0
  33. llandau-0.3.1/python/llandau/text.py +146 -0
  34. llandau-0.3.1/python/llandau/theme.py +40 -0
  35. llandau-0.3.1/python/llandau/viewer.py +97 -0
  36. llandau-0.3.1/src/camera.rs +99 -0
  37. llandau-0.3.1/src/clash.rs +73 -0
  38. llandau-0.3.1/src/lib.rs +1173 -0
  39. llandau-0.3.1/src/occlusion.rs +147 -0
  40. llandau-0.3.1/src/protein.rs +53 -0
  41. llandau-0.3.1/src/render.rs +637 -0
  42. llandau-0.3.1/src/scene.rs +544 -0
  43. llandau-0.3.1/src/shaders/lathe.wgsl +137 -0
  44. llandau-0.3.1/src/shaders/mesh.wgsl +98 -0
  45. llandau-0.3.1/src/shaders/slides.wgsl +83 -0
  46. llandau-0.3.1/src/shaders/spheres.wgsl +167 -0
  47. llandau-0.3.1/src/slides/live.rs +317 -0
  48. llandau-0.3.1/src/slides/mod.rs +290 -0
  49. llandau-0.3.1/src/slides/paint.rs +620 -0
  50. llandau-0.3.1/src/slides/player.rs +404 -0
  51. llandau-0.3.1/src/slides/svg.rs +159 -0
  52. llandau-0.3.1/src/slides/timeline.rs +394 -0
  53. llandau-0.3.1/src/surface.rs +198 -0
  54. llandau-0.3.1/src/theme.rs +59 -0
  55. llandau-0.3.1/src/window.rs +784 -0
  56. llandau-0.3.1/tests/test_figure.py +61 -0
  57. llandau-0.3.1/tests/test_render.py +122 -0
  58. llandau-0.3.1/tests/test_slides.py +135 -0
@@ -0,0 +1,122 @@
1
+ # Wheels for macOS and Linux (abi3: one per platform for Python >= 3.10), tested
2
+ # by rendering offscreen (software Vulkan on Linux); a v* tag attaches them to a
3
+ # GitHub release and uploads them to PyPI (trusted publishing: no token, PyPI
4
+ # trusts this workflow in the "pypi" environment). Pushes to main only run the
5
+ # Rust tests; wheels are built for tags, pull requests and manual runs.
6
+ name: wheels
7
+
8
+ on:
9
+ push:
10
+ branches: [main]
11
+ tags: ["v*"]
12
+ pull_request:
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ build:
17
+ if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ include:
22
+ - { os: ubuntu-latest, target: x86_64 }
23
+ - { os: ubuntu-latest, target: aarch64 }
24
+ - { os: macos-latest, target: aarch64 }
25
+ - { os: macos-latest, target: x86_64 }
26
+ runs-on: ${{ matrix.os }}
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: PyO3/maturin-action@v1
30
+ with:
31
+ target: ${{ matrix.target }}
32
+ manylinux: "2_28"
33
+ args: --release --out dist
34
+ sccache: "true"
35
+ env:
36
+ MACOSX_DEPLOYMENT_TARGET: "11.0"
37
+ - uses: actions/upload-artifact@v4
38
+ with:
39
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
40
+ path: dist
41
+
42
+ rust-tests:
43
+ runs-on: ubuntu-latest
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+ - uses: actions/setup-python@v5
47
+ with:
48
+ python-version: "3.12"
49
+ - uses: Swatinem/rust-cache@v2
50
+ - run: cargo test --lib
51
+
52
+ sdist:
53
+ if: github.event_name != 'push' || startsWith(github.ref, 'refs/tags/')
54
+ runs-on: ubuntu-latest
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+ - uses: PyO3/maturin-action@v1
58
+ with:
59
+ command: sdist
60
+ args: --out dist
61
+ - uses: actions/upload-artifact@v4
62
+ with:
63
+ name: sdist
64
+ path: dist
65
+
66
+ test:
67
+ needs: build
68
+ strategy:
69
+ fail-fast: false
70
+ matrix:
71
+ include:
72
+ - { os: ubuntu-latest, wheels: wheels-ubuntu-latest-x86_64 }
73
+ - { os: macos-latest, wheels: wheels-macos-latest-aarch64 }
74
+ runs-on: ${{ matrix.os }}
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+ - uses: actions/setup-python@v5
78
+ with:
79
+ python-version: "3.12"
80
+ - uses: actions/download-artifact@v4
81
+ with:
82
+ name: ${{ matrix.wheels }}
83
+ path: dist
84
+ - name: Software Vulkan (lavapipe), a virtual X server and window libraries
85
+ if: runner.os == 'Linux'
86
+ run: sudo apt-get update && sudo apt-get install -y mesa-vulkan-drivers xvfb libegl1 libxkbcommon0 libxkbcommon-x11-0 libxcursor1 libxi6 libxrandr2 libfontconfig1 libdbus-1-3
87
+ - uses: typst-community/setup-typst@v4
88
+ - run: pip install dist/*.whl pytest pillow
89
+ - name: Test (from outside the source tree, so the installed wheel is used)
90
+ working-directory: tests
91
+ run: ${{ runner.os == 'Linux' && 'xvfb-run -a' || '' }} python -m pytest -v -s .
92
+
93
+ release:
94
+ if: startsWith(github.ref, 'refs/tags/v')
95
+ needs: [build, sdist, test, rust-tests]
96
+ runs-on: ubuntu-latest
97
+ permissions:
98
+ contents: write
99
+ steps:
100
+ - uses: actions/download-artifact@v4
101
+ with:
102
+ path: dist
103
+ merge-multiple: true
104
+ - uses: softprops/action-gh-release@v2
105
+ with:
106
+ files: dist/*
107
+
108
+ pypi:
109
+ if: startsWith(github.ref, 'refs/tags/v')
110
+ needs: [build, sdist, test, rust-tests]
111
+ runs-on: ubuntu-latest
112
+ environment:
113
+ name: pypi
114
+ url: https://pypi.org/p/llandau
115
+ permissions:
116
+ id-token: write
117
+ steps:
118
+ - uses: actions/download-artifact@v4
119
+ with:
120
+ path: dist
121
+ merge-multiple: true
122
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,6 @@
1
+ __pycache__/
2
+ .llandau_cache/
3
+ .venv/
4
+ *.egg-info/
5
+ *.so
6
+ target/