laddu 0.1.2__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 (63) hide show
  1. laddu-0.1.2/.github/workflows/benchmark.yml +13 -0
  2. laddu-0.1.2/.github/workflows/coverage.yml +30 -0
  3. laddu-0.1.2/.github/workflows/maturin.yml +169 -0
  4. laddu-0.1.2/.github/workflows/release-plz.yml +30 -0
  5. laddu-0.1.2/.github/workflows/rust.yml +21 -0
  6. laddu-0.1.2/.gitignore +191 -0
  7. laddu-0.1.2/.justfile +5 -0
  8. laddu-0.1.2/CHANGELOG.md +21 -0
  9. laddu-0.1.2/Cargo.lock +1890 -0
  10. laddu-0.1.2/Cargo.toml +66 -0
  11. laddu-0.1.2/LICENSE-APACHE +202 -0
  12. laddu-0.1.2/LICENSE-MIT +21 -0
  13. laddu-0.1.2/PKG-INFO +296 -0
  14. laddu-0.1.2/README.md +276 -0
  15. laddu-0.1.2/benches/bench.parquet +0 -0
  16. laddu-0.1.2/benches/kmatrix_benchmark.rs +139 -0
  17. laddu-0.1.2/bin/amptools-to-laddu +139 -0
  18. laddu-0.1.2/demo.parquet +0 -0
  19. laddu-0.1.2/docs/docs-header.html +33 -0
  20. laddu-0.1.2/media/logo.png +0 -0
  21. laddu-0.1.2/media/logo.svg +121 -0
  22. laddu-0.1.2/media/wordmark.png +0 -0
  23. laddu-0.1.2/media/wordmark.svg +170 -0
  24. laddu-0.1.2/pyproject.toml +20 -0
  25. laddu-0.1.2/python/laddu/__init__.py +37 -0
  26. laddu-0.1.2/python/laddu/__init__.pyi +36 -0
  27. laddu-0.1.2/python/laddu/amplitudes/__init__.py +19 -0
  28. laddu-0.1.2/python/laddu/amplitudes/__init__.pyi +68 -0
  29. laddu-0.1.2/python/laddu/amplitudes/breit_wigner/__init__.py +3 -0
  30. laddu-0.1.2/python/laddu/amplitudes/breit_wigner/__init__.pyi +14 -0
  31. laddu-0.1.2/python/laddu/amplitudes/common/__init__.py +3 -0
  32. laddu-0.1.2/python/laddu/amplitudes/common/__init__.pyi +5 -0
  33. laddu-0.1.2/python/laddu/amplitudes/kmatrix/__init__.py +3 -0
  34. laddu-0.1.2/python/laddu/amplitudes/kmatrix/__init__.pyi +61 -0
  35. laddu-0.1.2/python/laddu/amplitudes/ylm/__init__.py +3 -0
  36. laddu-0.1.2/python/laddu/amplitudes/ylm/__init__.pyi +25 -0
  37. laddu-0.1.2/python/laddu/amplitudes/zlm/__init__.py +3 -0
  38. laddu-0.1.2/python/laddu/amplitudes/zlm/__init__.pyi +50 -0
  39. laddu-0.1.2/python/laddu/data/__init__.py +3 -0
  40. laddu-0.1.2/python/laddu/data/__init__.pyi +21 -0
  41. laddu-0.1.2/python/laddu/py.typed +0 -0
  42. laddu-0.1.2/python/laddu/utils/__init__.py +3 -0
  43. laddu-0.1.2/python/laddu/utils/variables/__init__.py +3 -0
  44. laddu-0.1.2/python/laddu/utils/variables/__init__.pyi +73 -0
  45. laddu-0.1.2/python/laddu/utils/vectors/__init__.py +3 -0
  46. laddu-0.1.2/src/amplitudes/breit_wigner.rs +87 -0
  47. laddu-0.1.2/src/amplitudes/common.rs +115 -0
  48. laddu-0.1.2/src/amplitudes/kmatrix.rs +803 -0
  49. laddu-0.1.2/src/amplitudes/mod.rs +555 -0
  50. laddu-0.1.2/src/amplitudes/ylm.rs +62 -0
  51. laddu-0.1.2/src/amplitudes/zlm.rs +92 -0
  52. laddu-0.1.2/src/data.rs +368 -0
  53. laddu-0.1.2/src/lib.rs +318 -0
  54. laddu-0.1.2/src/main.rs +89 -0
  55. laddu-0.1.2/src/python.rs +823 -0
  56. laddu-0.1.2/src/resources.rs +431 -0
  57. laddu-0.1.2/src/utils/enums.rs +77 -0
  58. laddu-0.1.2/src/utils/functions.rs +313 -0
  59. laddu-0.1.2/src/utils/mod.rs +10 -0
  60. laddu-0.1.2/src/utils/variables.rs +316 -0
  61. laddu-0.1.2/src/utils/vectors.rs +292 -0
  62. laddu-0.1.2/test_data/data.parquet +0 -0
  63. laddu-0.1.2/test_data/mc.parquet +0 -0
@@ -0,0 +1,13 @@
1
+ on: [pull_request]
2
+ name: benchmark pull requests
3
+ jobs:
4
+ runBenchmark:
5
+ name: run benchmark
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v3
9
+ - uses: boa-dev/criterion-compare-action@v3
10
+ with:
11
+ branchName: ${{ github.base_ref }}
12
+ benchName: "kmatrix_benchmark"
13
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,30 @@
1
+ name: Coverage
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ workflow_call:
7
+ secrets:
8
+ codecov_token:
9
+ required: true
10
+ workflow_dispatch:
11
+ jobs:
12
+ coverage:
13
+ runs-on: ubuntu-latest
14
+ env:
15
+ CARGO_TERM_COLOR: always
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Install Rust
19
+ run: rustup update stable
20
+ - name: Install cargo-llvm-cov
21
+ uses: taiki-e/install-action@cargo-llvm-cov
22
+ - name: Generate code coverage
23
+ run: cargo llvm-cov --workspace --codecov --output-path codecov.json
24
+ - name: Upload coverage to Codecov
25
+ uses: codecov/codecov-action@v4
26
+ with:
27
+ token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
28
+ files: codecov.json
29
+ fail_ci_if_error: true
30
+ verbose: true
@@ -0,0 +1,169 @@
1
+ # This file is autogenerated by maturin v1.7.3
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ linux:
23
+ runs-on: ${{ matrix.platform.runner }}
24
+ strategy:
25
+ matrix:
26
+ platform:
27
+ - runner: ubuntu-latest
28
+ target: x86_64
29
+ - runner: ubuntu-latest
30
+ target: x86
31
+ - runner: ubuntu-latest
32
+ target: aarch64
33
+ - runner: ubuntu-latest
34
+ target: armv7
35
+ - runner: ubuntu-latest
36
+ target: s390x
37
+ - runner: ubuntu-latest
38
+ target: ppc64le
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ - uses: actions/setup-python@v5
42
+ with:
43
+ python-version: 3.x
44
+ - name: Build wheels
45
+ uses: PyO3/maturin-action@v1
46
+ with:
47
+ target: ${{ matrix.platform.target }}
48
+ args: --release --out dist --find-interpreter
49
+ sccache: 'true'
50
+ manylinux: auto
51
+ - name: Upload wheels
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: wheels-linux-${{ matrix.platform.target }}
55
+ path: dist
56
+
57
+ musllinux:
58
+ runs-on: ${{ matrix.platform.runner }}
59
+ strategy:
60
+ matrix:
61
+ platform:
62
+ - runner: ubuntu-latest
63
+ target: x86_64
64
+ - runner: ubuntu-latest
65
+ target: x86
66
+ - runner: ubuntu-latest
67
+ target: aarch64
68
+ - runner: ubuntu-latest
69
+ target: armv7
70
+ steps:
71
+ - uses: actions/checkout@v4
72
+ - uses: actions/setup-python@v5
73
+ with:
74
+ python-version: 3.x
75
+ - name: Build wheels
76
+ uses: PyO3/maturin-action@v1
77
+ with:
78
+ target: ${{ matrix.platform.target }}
79
+ args: --release --out dist --find-interpreter
80
+ sccache: 'true'
81
+ manylinux: musllinux_1_2
82
+ - name: Upload wheels
83
+ uses: actions/upload-artifact@v4
84
+ with:
85
+ name: wheels-musllinux-${{ matrix.platform.target }}
86
+ path: dist
87
+
88
+ windows:
89
+ runs-on: ${{ matrix.platform.runner }}
90
+ strategy:
91
+ matrix:
92
+ platform:
93
+ - runner: windows-latest
94
+ target: x64
95
+ # - runner: windows-latest
96
+ # target: x86
97
+ steps:
98
+ - uses: actions/checkout@v4
99
+ - uses: actions/setup-python@v5
100
+ with:
101
+ python-version: 3.x
102
+ architecture: ${{ matrix.platform.target }}
103
+ - name: Build wheels
104
+ uses: PyO3/maturin-action@v1
105
+ with:
106
+ target: ${{ matrix.platform.target }}
107
+ args: --release --out dist --find-interpreter
108
+ sccache: 'true'
109
+ - name: Upload wheels
110
+ uses: actions/upload-artifact@v4
111
+ with:
112
+ name: wheels-windows-${{ matrix.platform.target }}
113
+ path: dist
114
+
115
+ macos:
116
+ runs-on: ${{ matrix.platform.runner }}
117
+ strategy:
118
+ matrix:
119
+ platform:
120
+ - runner: macos-12
121
+ target: x86_64
122
+ - runner: macos-14
123
+ target: aarch64
124
+ steps:
125
+ - uses: actions/checkout@v4
126
+ - uses: actions/setup-python@v5
127
+ with:
128
+ python-version: 3.x
129
+ - name: Build wheels
130
+ uses: PyO3/maturin-action@v1
131
+ with:
132
+ target: ${{ matrix.platform.target }}
133
+ args: --release --out dist --find-interpreter
134
+ sccache: 'true'
135
+ - name: Upload wheels
136
+ uses: actions/upload-artifact@v4
137
+ with:
138
+ name: wheels-macos-${{ matrix.platform.target }}
139
+ path: dist
140
+
141
+ sdist:
142
+ runs-on: ubuntu-latest
143
+ steps:
144
+ - uses: actions/checkout@v4
145
+ - name: Build sdist
146
+ uses: PyO3/maturin-action@v1
147
+ with:
148
+ command: sdist
149
+ args: --out dist
150
+ - name: Upload sdist
151
+ uses: actions/upload-artifact@v4
152
+ with:
153
+ name: wheels-sdist
154
+ path: dist
155
+
156
+ release:
157
+ name: Release
158
+ runs-on: ubuntu-latest
159
+ # if: "startsWith(github.ref, 'refs/tags/')"
160
+ needs: [linux, musllinux, windows, macos, sdist]
161
+ steps:
162
+ - uses: actions/download-artifact@v4
163
+ - name: Publish to PyPI
164
+ uses: PyO3/maturin-action@v1
165
+ env:
166
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
167
+ with:
168
+ command: upload
169
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,30 @@
1
+ name: Release Plz
2
+
3
+ permissions:
4
+ pull-requests: write
5
+ contents: write
6
+
7
+ on:
8
+ push:
9
+ branches:
10
+ - main
11
+
12
+ jobs:
13
+ release-plz:
14
+ name: Release-plz
15
+ runs-on: ubuntu-latest
16
+ concurrency:
17
+ group: release-plz-${{ github.ref }}
18
+ cancel-in-progress: false
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0
24
+ - name: Install Rust toolchain
25
+ uses: dtolnay/rust-toolchain@stable
26
+ - name: Run release-plz
27
+ uses: MarcoIeni/release-plz-action@v0.5
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
30
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
@@ -0,0 +1,21 @@
1
+ name: Rust
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches: [ "main" ]
7
+
8
+ env:
9
+ CARGO_TERM_COLOR: always
10
+
11
+ jobs:
12
+ build:
13
+
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Build
19
+ run: cargo build -r --verbose
20
+ - name: Run tests
21
+ run: cargo test -r --verbose
laddu-0.1.2/.gitignore ADDED
@@ -0,0 +1,191 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
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
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
110
+ .pdm.toml
111
+ .pdm-python
112
+ .pdm-build/
113
+
114
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115
+ __pypackages__/
116
+
117
+ # Celery stuff
118
+ celerybeat-schedule
119
+ celerybeat.pid
120
+
121
+ # SageMath parsed files
122
+ *.sage.py
123
+
124
+ # Environments
125
+ .env
126
+ .venv
127
+ env/
128
+ venv/
129
+ ENV/
130
+ env.bak/
131
+ venv.bak/
132
+
133
+ # Spyder project settings
134
+ .spyderproject
135
+ .spyproject
136
+
137
+ # Rope project settings
138
+ .ropeproject
139
+
140
+ # mkdocs documentation
141
+ /site
142
+
143
+ # mypy
144
+ .mypy_cache/
145
+ .dmypy.json
146
+ dmypy.json
147
+
148
+ # Pyre type checker
149
+ .pyre/
150
+
151
+ # pytype static type analyzer
152
+ .pytype/
153
+
154
+ # Cython debug symbols
155
+ cython_debug/
156
+
157
+ # PyCharm
158
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
159
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
160
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
161
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
162
+ #.idea/
163
+
164
+ uv.lock
165
+
166
+ .DS_Store
167
+
168
+ # Generated by Cargo
169
+ # will have compiled files and executables
170
+ debug/
171
+ target/
172
+
173
+ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
174
+ # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
175
+ Cargo.lock
176
+
177
+ # These are backup files generated by rustfmt
178
+ **/*.rs.bk
179
+
180
+ # MSVC Windows builds of rustc generate these, which store debugging information
181
+ *.pdb
182
+
183
+ # RustRover
184
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
185
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
186
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
187
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
188
+ #.idea/
189
+
190
+ # Others
191
+ demos/
laddu-0.1.2/.justfile ADDED
@@ -0,0 +1,5 @@
1
+ default:
2
+ just --list
3
+
4
+ develop:
5
+ maturin develop -r --uv --strip
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.2](https://github.com/denehoffman/laddu/compare/v0.1.1...v0.1.2) - 2024-10-17
11
+
12
+ ### Other
13
+
14
+ - remove tag check
15
+
16
+ ## [0.1.1](https://github.com/denehoffman/laddu/compare/v0.1.0...v0.1.1) - 2024-10-17
17
+
18
+ ### Other
19
+
20
+ - remove coverage for f32 feature (for now)
21
+ - remove build for 32-bit Windows due to issue with rust-numpy