jazelle 0.5.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.
- jazelle-0.5.0/.github/workflows/build_and_publish.yml +131 -0
- jazelle-0.5.0/.github/workflows/docs.yml +35 -0
- jazelle-0.5.0/.gitignore +210 -0
- jazelle-0.5.0/CMakeLists.txt +144 -0
- jazelle-0.5.0/LICENSE +21 -0
- jazelle-0.5.0/PKG-INFO +338 -0
- jazelle-0.5.0/README.md +294 -0
- jazelle-0.5.0/benchmarks/bench_batching.py +54 -0
- jazelle-0.5.0/benchmarks/bench_formats.py +68 -0
- jazelle-0.5.0/benchmarks/bench_threading.py +36 -0
- jazelle-0.5.0/benchmarks/utils.py +183 -0
- jazelle-0.5.0/bindings/jazelle_cython.pxd +355 -0
- jazelle-0.5.0/bindings/jazelle_cython.pyx +5683 -0
- jazelle-0.5.0/bindings/libcpp/__init__.py +0 -0
- jazelle-0.5.0/bindings/libcpp/chrono.pxd +12 -0
- jazelle-0.5.0/docs/book/banks/event/index.md +6 -0
- jazelle-0.5.0/docs/book/banks/event/phbm.md +80 -0
- jazelle-0.5.0/docs/book/banks/event/phevcl.md +187 -0
- jazelle-0.5.0/docs/book/banks/index.md +7 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/index.md +7 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phchrg.md +95 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phcrid.md +75 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phkchrg.md +129 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phkelid.md +72 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phklus.md +57 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phpoint.md +36 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phpsum.md +41 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phvxov.md +105 -0
- jazelle-0.5.0/docs/book/banks/reconstruction/phwic.md +67 -0
- jazelle-0.5.0/docs/book/banks/truth/index.md +7 -0
- jazelle-0.5.0/docs/book/banks/truth/mcbeam.md +70 -0
- jazelle-0.5.0/docs/book/banks/truth/mchead.md +32 -0
- jazelle-0.5.0/docs/book/banks/truth/mcpart.md +61 -0
- jazelle-0.5.0/docs/book/banks/truth/mcpnt.md +33 -0
- jazelle-0.5.0/docs/book/banks/truth/phkmc1.md +65 -0
- jazelle-0.5.0/docs/book/banks/truth/phwmc.md +65 -0
- jazelle-0.5.0/docs/book/decoding/index.md +7 -0
- jazelle-0.5.0/docs/book/decoding/method.md +130 -0
- jazelle-0.5.0/docs/book/decoding/open-questions.md +48 -0
- jazelle-0.5.0/docs/book/decoding/results.md +92 -0
- jazelle-0.5.0/docs/book/development/adding-a-bank.md +416 -0
- jazelle-0.5.0/docs/book/development/building.md +124 -0
- jazelle-0.5.0/docs/book/development/index.md +6 -0
- jazelle-0.5.0/docs/book/figures/bank-cridhyp.svg +53 -0
- jazelle-0.5.0/docs/book/figures/bank-gap-word.svg +19 -0
- jazelle-0.5.0/docs/book/figures/bank-ieventh.svg +37 -0
- jazelle-0.5.0/docs/book/figures/bank-mcbeam.svg +76 -0
- jazelle-0.5.0/docs/book/figures/bank-mchead.svg +30 -0
- jazelle-0.5.0/docs/book/figures/bank-mcpart.svg +47 -0
- jazelle-0.5.0/docs/book/figures/bank-mcpnt.svg +33 -0
- jazelle-0.5.0/docs/book/figures/bank-phbm.svg +64 -0
- jazelle-0.5.0/docs/book/figures/bank-phchrg.svg +151 -0
- jazelle-0.5.0/docs/book/figures/bank-phcrid.svg +33 -0
- jazelle-0.5.0/docs/book/figures/bank-phevcl.svg +86 -0
- jazelle-0.5.0/docs/book/figures/bank-phkchrg.svg +38 -0
- jazelle-0.5.0/docs/book/figures/bank-phkelid.svg +93 -0
- jazelle-0.5.0/docs/book/figures/bank-phklus.svg +78 -0
- jazelle-0.5.0/docs/book/figures/bank-phkmc1.svg +41 -0
- jazelle-0.5.0/docs/book/figures/bank-phmtoc.svg +75 -0
- jazelle-0.5.0/docs/book/figures/bank-phpoint.svg +21 -0
- jazelle-0.5.0/docs/book/figures/bank-phpsum.svg +39 -0
- jazelle-0.5.0/docs/book/figures/bank-phvxov.svg +103 -0
- jazelle-0.5.0/docs/book/figures/bank-phwic.svg +115 -0
- jazelle-0.5.0/docs/book/figures/bank-phwmc.svg +44 -0
- jazelle-0.5.0/docs/book/figures/bank-record-header.svg +109 -0
- jazelle-0.5.0/docs/book/format/event-record.md +127 -0
- jazelle-0.5.0/docs/book/format/index.md +7 -0
- jazelle-0.5.0/docs/book/format/mc-records.md +125 -0
- jazelle-0.5.0/docs/book/format/numbers.md +60 -0
- jazelle-0.5.0/docs/book/format/records.md +200 -0
- jazelle-0.5.0/docs/book/format/relations.md +81 -0
- jazelle-0.5.0/docs/book/guide/cli.md +152 -0
- jazelle-0.5.0/docs/book/guide/converting.md +161 -0
- jazelle-0.5.0/docs/book/guide/index.md +8 -0
- jazelle-0.5.0/docs/book/guide/known-issues.md +167 -0
- jazelle-0.5.0/docs/book/guide/reading.md +327 -0
- jazelle-0.5.0/docs/book/help.md +92 -0
- jazelle-0.5.0/docs/book/index.md +37 -0
- jazelle-0.5.0/docs/book.yaml +69 -0
- jazelle-0.5.0/docs/data/banks/CRIDHYP.yaml +88 -0
- jazelle-0.5.0/docs/data/banks/GAP_WORD.yaml +12 -0
- jazelle-0.5.0/docs/data/banks/IEVENTH.yaml +69 -0
- jazelle-0.5.0/docs/data/banks/MCBEAM.yaml +18 -0
- jazelle-0.5.0/docs/data/banks/MCHEAD.yaml +87 -0
- jazelle-0.5.0/docs/data/banks/MCPART.yaml +174 -0
- jazelle-0.5.0/docs/data/banks/MCPNT.yaml +104 -0
- jazelle-0.5.0/docs/data/banks/PHBM.yaml +42 -0
- jazelle-0.5.0/docs/data/banks/PHCHRG.yaml +277 -0
- jazelle-0.5.0/docs/data/banks/PHCRID.yaml +64 -0
- jazelle-0.5.0/docs/data/banks/PHEVCL.yaml +39 -0
- jazelle-0.5.0/docs/data/banks/PHKCHRG.yaml +14 -0
- jazelle-0.5.0/docs/data/banks/PHKELID.yaml +224 -0
- jazelle-0.5.0/docs/data/banks/PHKLUS.yaml +134 -0
- jazelle-0.5.0/docs/data/banks/PHKMC1.yaml +18 -0
- jazelle-0.5.0/docs/data/banks/PHMTOC.yaml +122 -0
- jazelle-0.5.0/docs/data/banks/PHPOINT.yaml +62 -0
- jazelle-0.5.0/docs/data/banks/PHPSUM.yaml +71 -0
- jazelle-0.5.0/docs/data/banks/PHVXOV.yaml +39 -0
- jazelle-0.5.0/docs/data/banks/PHWIC.yaml +209 -0
- jazelle-0.5.0/docs/data/banks/PHWMC.yaml +29 -0
- jazelle-0.5.0/docs/data/banks/RECORD_HEADER.yaml +213 -0
- jazelle-0.5.0/docs/requirements.txt +4 -0
- jazelle-0.5.0/docs/scripts/bank_pages.py +658 -0
- jazelle-0.5.0/docs/scripts/tests/conftest.py +6 -0
- jazelle-0.5.0/docs/scripts/tests/test_bank_pages.py +217 -0
- jazelle-0.5.0/examples/T01_quickstart_jazelle.ipynb +1163 -0
- jazelle-0.5.0/examples/T02_Z_Boson_Reconstruction.ipynb +363 -0
- jazelle-0.5.0/include/jazelle/Bank.hpp +80 -0
- jazelle-0.5.0/include/jazelle/BankTraits.hpp +29 -0
- jazelle-0.5.0/include/jazelle/Family.hpp +129 -0
- jazelle-0.5.0/include/jazelle/JazelleEvent.hpp +231 -0
- jazelle-0.5.0/include/jazelle/JazelleFile.hpp +456 -0
- jazelle-0.5.0/include/jazelle/PHMTOC.hpp +63 -0
- jazelle-0.5.0/include/jazelle/RecordStatus.hpp +35 -0
- jazelle-0.5.0/include/jazelle/banks/AllBanks.hpp +36 -0
- jazelle-0.5.0/include/jazelle/banks/CRIDHYP.hpp +43 -0
- jazelle-0.5.0/include/jazelle/banks/IEVENTH.hpp +50 -0
- jazelle-0.5.0/include/jazelle/banks/MCBEAM.hpp +61 -0
- jazelle-0.5.0/include/jazelle/banks/MCHEAD.hpp +49 -0
- jazelle-0.5.0/include/jazelle/banks/MCPART.hpp +64 -0
- jazelle-0.5.0/include/jazelle/banks/MCPNT.hpp +52 -0
- jazelle-0.5.0/include/jazelle/banks/PHBM.hpp +53 -0
- jazelle-0.5.0/include/jazelle/banks/PHCHRG.hpp +88 -0
- jazelle-0.5.0/include/jazelle/banks/PHCRID.hpp +38 -0
- jazelle-0.5.0/include/jazelle/banks/PHEVCL.hpp +118 -0
- jazelle-0.5.0/include/jazelle/banks/PHKCHRG.hpp +56 -0
- jazelle-0.5.0/include/jazelle/banks/PHKELID.hpp +63 -0
- jazelle-0.5.0/include/jazelle/banks/PHKLUS.hpp +52 -0
- jazelle-0.5.0/include/jazelle/banks/PHKMC1.hpp +50 -0
- jazelle-0.5.0/include/jazelle/banks/PHKTRK.hpp +41 -0
- jazelle-0.5.0/include/jazelle/banks/PHPOINT.hpp +65 -0
- jazelle-0.5.0/include/jazelle/banks/PHPSUM.hpp +61 -0
- jazelle-0.5.0/include/jazelle/banks/PHVXOV.hpp +95 -0
- jazelle-0.5.0/include/jazelle/banks/PHWIC.hpp +62 -0
- jazelle-0.5.0/include/jazelle/banks/PHWMC.hpp +68 -0
- jazelle-0.5.0/include/jazelle/banks/PIDVEC.hpp +56 -0
- jazelle-0.5.0/pyproject.toml +59 -0
- jazelle-0.5.0/python/jazelle/__init__.py +74 -0
- jazelle-0.5.0/python/jazelle/_version.py +1 -0
- jazelle-0.5.0/python/jazelle/cli.py +267 -0
- jazelle-0.5.0/python/jazelle/config.py +72 -0
- jazelle-0.5.0/python/jazelle/converters.py +156 -0
- jazelle-0.5.0/python/jazelle/jazelle_file.py +391 -0
- jazelle-0.5.0/python/jazelle/streamers/__init__.py +16 -0
- jazelle-0.5.0/python/jazelle/streamers/base.py +114 -0
- jazelle-0.5.0/python/jazelle/streamers/feather_streamer.py +83 -0
- jazelle-0.5.0/python/jazelle/streamers/hdf5_streamer.py +159 -0
- jazelle-0.5.0/python/jazelle/streamers/json_streamer.py +89 -0
- jazelle-0.5.0/python/jazelle/streamers/parquet_streamer.py +59 -0
- jazelle-0.5.0/python/jazelle/utils.py +522 -0
- jazelle-0.5.0/python/jazelle/vax_clock.py +87 -0
- jazelle-0.5.0/src/DataBuffer.cpp +12 -0
- jazelle-0.5.0/src/DataBuffer.hpp +130 -0
- jazelle-0.5.0/src/JazelleFile.cpp +1089 -0
- jazelle-0.5.0/src/JazelleStream.cpp +361 -0
- jazelle-0.5.0/src/JazelleStream.hpp +191 -0
- jazelle-0.5.0/src/PHMTOC.cpp +37 -0
- jazelle-0.5.0/src/banks/CRIDHYP.cpp +42 -0
- jazelle-0.5.0/src/banks/IEVENTH.cpp +22 -0
- jazelle-0.5.0/src/banks/MCBEAM.cpp +36 -0
- jazelle-0.5.0/src/banks/MCHEAD.cpp +21 -0
- jazelle-0.5.0/src/banks/MCPART.cpp +152 -0
- jazelle-0.5.0/src/banks/MCPNT.cpp +26 -0
- jazelle-0.5.0/src/banks/PHBM.cpp +39 -0
- jazelle-0.5.0/src/banks/PHCHRG.cpp +65 -0
- jazelle-0.5.0/src/banks/PHCRID.cpp +49 -0
- jazelle-0.5.0/src/banks/PHEVCL.cpp +35 -0
- jazelle-0.5.0/src/banks/PHKCHRG.cpp +28 -0
- jazelle-0.5.0/src/banks/PHKELID.cpp +61 -0
- jazelle-0.5.0/src/banks/PHKLUS.cpp +48 -0
- jazelle-0.5.0/src/banks/PHKMC1.cpp +28 -0
- jazelle-0.5.0/src/banks/PHKTRK.cpp +16 -0
- jazelle-0.5.0/src/banks/PHPOINT.cpp +61 -0
- jazelle-0.5.0/src/banks/PHPSUM.cpp +24 -0
- jazelle-0.5.0/src/banks/PHVXOV.cpp +50 -0
- jazelle-0.5.0/src/banks/PHWIC.cpp +59 -0
- jazelle-0.5.0/src/banks/PHWMC.cpp +29 -0
- jazelle-0.5.0/src/banks/PIDVEC.cpp +46 -0
- jazelle-0.5.0/src/utils/BinaryIO.hpp +155 -0
- jazelle-0.5.0/src/utils/ByteDump.cpp +110 -0
- jazelle-0.5.0/src/utils/ByteDump.hpp +83 -0
- jazelle-0.5.0/src/utils/LockFreeQueue.hpp +106 -0
- jazelle-0.5.0/src/utils/ObjectPool.hpp +49 -0
- jazelle-0.5.0/tests/cpp/test_binary_io.cpp +46 -0
- jazelle-0.5.0/tests/cpp/test_record_status.cpp +42 -0
- jazelle-0.5.0/tests/python/conftest.py +37 -0
- jazelle-0.5.0/tests/python/test_buffer_inspection.py +83 -0
- jazelle-0.5.0/tests/python/test_cli.py +24 -0
- jazelle-0.5.0/tests/python/test_core.py +208 -0
- jazelle-0.5.0/tests/python/test_display.py +120 -0
- jazelle-0.5.0/tests/python/test_mcbeam.py +99 -0
- jazelle-0.5.0/tests/python/test_mcpart_charge.py +48 -0
- jazelle-0.5.0/tests/python/test_mcpart_energy.py +87 -0
- jazelle-0.5.0/tests/python/test_phevcl.py +105 -0
- jazelle-0.5.0/tests/python/test_phkchrg.py +30 -0
- jazelle-0.5.0/tests/python/test_phkmc1.py +76 -0
- jazelle-0.5.0/tests/python/test_phvxov.py +132 -0
- jazelle-0.5.0/tests/python/test_phwmc.py +107 -0
- jazelle-0.5.0/tests/python/test_record_status.py +129 -0
- jazelle-0.5.0/tests/python/test_streamers.py +89 -0
- jazelle-0.5.0/tests/python/test_utils.py +158 -0
- jazelle-0.5.0/tests/python/test_vax_clock.py +35 -0
- jazelle-0.5.0/tools/bank_lab/README.md +136 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/__init__.py +1 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/blocks.py +135 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/census.py +132 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/config.py +159 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/profile.py +134 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/sample.py +132 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/tail.py +182 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/vax.py +55 -0
- jazelle-0.5.0/tools/bank_lab/bank_lab/verify.py +323 -0
- jazelle-0.5.0/tools/bank_lab/specs/GAP_WORD.yaml +20 -0
- jazelle-0.5.0/tools/bank_lab/specs/MCBEAM.yaml +125 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHBM.yaml +134 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHEVCL.yaml +277 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHKCHRG_PASS1.yaml +273 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHKCHRG_PASS2.yaml +79 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHKMC1_PASS1.yaml +146 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHKMC1_PASS2.yaml +69 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHVXOV_HEADER.yaml +78 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHVXOV_HIT.yaml +406 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHWMC_HEADER.yaml +75 -0
- jazelle-0.5.0/tools/bank_lab/specs/PHWMC_PAIR.yaml +134 -0
- jazelle-0.5.0/tools/bank_lab/tests/conftest.py +37 -0
- jazelle-0.5.0/tools/bank_lab/tests/test_blocks.py +51 -0
- jazelle-0.5.0/tools/bank_lab/tests/test_census.py +15 -0
- jazelle-0.5.0/tools/bank_lab/tests/test_decoding.py +38 -0
- jazelle-0.5.0/tools/bank_lab/tests/test_specs.py +44 -0
- jazelle-0.5.0/tools/bank_lab/tests/test_tail.py +50 -0
- jazelle-0.5.0/tools/bank_lab/tests/test_verify.py +53 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# .github/workflows/build_and_publish.yml
|
|
2
|
+
name: Build and Publish
|
|
3
|
+
|
|
4
|
+
# Run on pushes and PRs (for testing), and on release (for publishing)
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
# The documentation site has a workflow of its own (docs.yml).
|
|
9
|
+
paths-ignore: [ "docs/**" ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ "main" ]
|
|
12
|
+
paths-ignore: [ "docs/**" ]
|
|
13
|
+
release:
|
|
14
|
+
types: [created] # This is the trigger for publishing
|
|
15
|
+
|
|
16
|
+
# A new commit on a pull request cancels the run for its previous commit.
|
|
17
|
+
# Pushes and releases each get a group of their own, so they are never queued
|
|
18
|
+
# behind another run or cancelled.
|
|
19
|
+
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
# ----------------------------------------
|
|
26
|
+
# JOB 1: Build the Wheels (Your original job)
|
|
27
|
+
# ----------------------------------------
|
|
28
|
+
build_wheels:
|
|
29
|
+
name: Build wheels on ${{ matrix.os }}
|
|
30
|
+
runs-on: ${{ matrix.os }}
|
|
31
|
+
strategy:
|
|
32
|
+
matrix:
|
|
33
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
|
|
38
|
+
- name: Build wheels
|
|
39
|
+
# v3.x builds cp39 through cp314. Note two default changes vs the
|
|
40
|
+
# old v2 pin: the Linux image is now manylinux_2_28, and 32-bit
|
|
41
|
+
# i686 wheels are no longer built by default.
|
|
42
|
+
uses: pypa/cibuildwheel@v3.4.1
|
|
43
|
+
env:
|
|
44
|
+
# Pushes to main and releases build every wheel that PyPI receives:
|
|
45
|
+
# CPython 3.9-3.14, with win32 next to win_amd64 on Windows ("auto").
|
|
46
|
+
# Pull requests build only the oldest and newest CPython, for the
|
|
47
|
+
# runner's 64-bit architecture ("auto64").
|
|
48
|
+
CIBW_BUILD: >-
|
|
49
|
+
${{ github.event_name == 'pull_request'
|
|
50
|
+
&& 'cp39-* cp314-*'
|
|
51
|
+
|| 'cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*' }}
|
|
52
|
+
CIBW_ARCHS: ${{ github.event_name == 'pull_request' && 'auto64' || 'auto' }}
|
|
53
|
+
|
|
54
|
+
# Skip all musllinux builds (simplified from your original)
|
|
55
|
+
CIBW_SKIP: "*-musllinux_*"
|
|
56
|
+
|
|
57
|
+
# Optional: Increase build verbosity for debugging
|
|
58
|
+
CIBW_BUILD_VERBOSITY: 1
|
|
59
|
+
|
|
60
|
+
- uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
# Your original config is perfect.
|
|
63
|
+
# This creates separate artifacts: wheels-ubuntu-latest, wheels-windows-latest, etc.
|
|
64
|
+
name: wheels-${{ matrix.os }}
|
|
65
|
+
path: ./wheelhouse/*.whl
|
|
66
|
+
|
|
67
|
+
# ----------------------------------------
|
|
68
|
+
# JOB 2: Build the source distribution
|
|
69
|
+
# ----------------------------------------
|
|
70
|
+
# pip builds from the sdist where no wheel fits the platform, such as
|
|
71
|
+
# Linux on ARM, musl libc or macOS on Intel.
|
|
72
|
+
# https://cibuildwheel.pypa.io/en/v3.4.1/deliver-to-pypi/
|
|
73
|
+
build_sdist:
|
|
74
|
+
name: Build source distribution
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/checkout@v4
|
|
78
|
+
|
|
79
|
+
- name: Build sdist
|
|
80
|
+
run: pipx run build --sdist
|
|
81
|
+
|
|
82
|
+
# Fails if the sdist lacks a file the build or the import needs.
|
|
83
|
+
- name: Install from the sdist
|
|
84
|
+
run: |
|
|
85
|
+
python -m pip install dist/*.tar.gz
|
|
86
|
+
cd "$RUNNER_TEMP" && python -c "import jazelle"
|
|
87
|
+
|
|
88
|
+
- uses: actions/upload-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: sdist
|
|
91
|
+
path: dist/*.tar.gz
|
|
92
|
+
|
|
93
|
+
# ----------------------------------------
|
|
94
|
+
# JOB 3: Publish to PyPI
|
|
95
|
+
# ----------------------------------------
|
|
96
|
+
publish_to_pypi:
|
|
97
|
+
name: Publish wheels and sdist to PyPI
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
environment: pypi
|
|
100
|
+
# 1. This job MUST wait for all builds to finish
|
|
101
|
+
needs: [build_wheels, build_sdist]
|
|
102
|
+
|
|
103
|
+
# 2. This job ONLY runs when a new release is created
|
|
104
|
+
if: github.event_name == 'release' && github.event.action == 'created'
|
|
105
|
+
|
|
106
|
+
# 3. This permission is REQUIRED for Trusted Publishing
|
|
107
|
+
permissions:
|
|
108
|
+
id-token: write # Grant permission to get an OIDC token
|
|
109
|
+
|
|
110
|
+
steps:
|
|
111
|
+
- name: Download all wheel and sdist artifacts
|
|
112
|
+
uses: actions/download-artifact@v4
|
|
113
|
+
with:
|
|
114
|
+
# No 'name' provided = download ALL artifacts from this workflow run
|
|
115
|
+
# This will download 'wheels-ubuntu-latest', ..., and 'sdist'
|
|
116
|
+
path: dist/ # And put them all into a single 'dist' directory
|
|
117
|
+
|
|
118
|
+
- name: Move wheels and sdist to top-level dist/
|
|
119
|
+
run: find dist -mindepth 2 -type f \( -name "*.whl" -o -name "*.tar.gz" \) -exec mv {} dist/ \;
|
|
120
|
+
|
|
121
|
+
- name: Remove empty artifact directories
|
|
122
|
+
# rmdir fails on a directory that still holds a file
|
|
123
|
+
run: rmdir dist/wheels-* dist/sdist
|
|
124
|
+
|
|
125
|
+
- name: List files (for debugging)
|
|
126
|
+
run: ls -l dist/
|
|
127
|
+
|
|
128
|
+
- name: Publish package to PyPI
|
|
129
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
130
|
+
# No 'user' or 'password' needed! The action handles OIDC auth.
|
|
131
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
# Builds and tests the site. It is published from
|
|
4
|
+
# https://github.com/AlkaidCheng/jazelle_reader_docs, which builds docs/ from main.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: docs-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
defaults:
|
|
22
|
+
run:
|
|
23
|
+
working-directory: docs
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v7
|
|
26
|
+
- uses: actions/setup-python@v7
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
cache: pip
|
|
30
|
+
cache-dependency-path: docs/requirements.txt
|
|
31
|
+
- run: pip install -r requirements.txt
|
|
32
|
+
# The bank tables and byte maps must be up to date and agree with the bank-lab
|
|
33
|
+
# specs, the bindings and the C++ readers.
|
|
34
|
+
- run: python -m pytest scripts/tests
|
|
35
|
+
- run: bookspine build
|
jazelle-0.5.0/.gitignore
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
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
|
+
# 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
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# bookspine build output
|
|
158
|
+
/docs/site/
|
|
159
|
+
|
|
160
|
+
# mypy
|
|
161
|
+
.mypy_cache/
|
|
162
|
+
.dmypy.json
|
|
163
|
+
dmypy.json
|
|
164
|
+
|
|
165
|
+
# Pyre type checker
|
|
166
|
+
.pyre/
|
|
167
|
+
|
|
168
|
+
# pytype static type analyzer
|
|
169
|
+
.pytype/
|
|
170
|
+
|
|
171
|
+
# Cython debug symbols
|
|
172
|
+
cython_debug/
|
|
173
|
+
|
|
174
|
+
# PyCharm
|
|
175
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
176
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
177
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
178
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
179
|
+
#.idea/
|
|
180
|
+
|
|
181
|
+
# Abstra
|
|
182
|
+
# Abstra is an AI-powered process automation framework.
|
|
183
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
184
|
+
# Learn more at https://abstra.io/docs
|
|
185
|
+
.abstra/
|
|
186
|
+
|
|
187
|
+
# Visual Studio Code
|
|
188
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
189
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
190
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
191
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
192
|
+
# .vscode/
|
|
193
|
+
|
|
194
|
+
# Ruff stuff:
|
|
195
|
+
.ruff_cache/
|
|
196
|
+
|
|
197
|
+
# PyPI configuration file
|
|
198
|
+
.pypirc
|
|
199
|
+
|
|
200
|
+
# Cursor
|
|
201
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
202
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
203
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
204
|
+
.cursorignore
|
|
205
|
+
.cursorindexingignore
|
|
206
|
+
|
|
207
|
+
# Marimo
|
|
208
|
+
marimo/_static/
|
|
209
|
+
marimo/_lsp/
|
|
210
|
+
__marimo__/
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# CMakeLists.txt (in jazelle-reader/ root)
|
|
2
|
+
|
|
3
|
+
cmake_minimum_required(VERSION 3.15)
|
|
4
|
+
project(jazelle_reader CXX)
|
|
5
|
+
|
|
6
|
+
set(CMAKE_CXX_STANDARD 20)
|
|
7
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
8
|
+
|
|
9
|
+
# ------------------------------------------------------------------
|
|
10
|
+
# Find Python - required for building Python extensions
|
|
11
|
+
# ------------------------------------------------------------------
|
|
12
|
+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
|
|
13
|
+
|
|
14
|
+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.14")
|
|
15
|
+
# Modern approach: Use FindPython's NumPy component
|
|
16
|
+
find_package(Python REQUIRED COMPONENTS NumPy)
|
|
17
|
+
set(NUMPY_INCLUDE_DIRS ${Python_NumPy_INCLUDE_DIRS})
|
|
18
|
+
else()
|
|
19
|
+
# Fallback for older CMake versions
|
|
20
|
+
execute_process(
|
|
21
|
+
COMMAND "${Python_EXECUTABLE}" -c "import numpy; print(numpy.get_include())"
|
|
22
|
+
OUTPUT_VARIABLE NUMPY_INCLUDE_DIRS
|
|
23
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
24
|
+
)
|
|
25
|
+
endif()
|
|
26
|
+
|
|
27
|
+
# ------------------------------------------------------------------
|
|
28
|
+
# Cythonize the .pyx file
|
|
29
|
+
# ------------------------------------------------------------------
|
|
30
|
+
set(CYTHON_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/bindings/jazelle_cython.pyx)
|
|
31
|
+
set(CYTHON_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/jazelle_cython.cpp)
|
|
32
|
+
|
|
33
|
+
# Use Python to run Cython
|
|
34
|
+
add_custom_command(
|
|
35
|
+
OUTPUT ${CYTHON_OUTPUT}
|
|
36
|
+
COMMAND ${Python_EXECUTABLE} -m cython
|
|
37
|
+
--cplus
|
|
38
|
+
-3
|
|
39
|
+
-I ${CMAKE_CURRENT_SOURCE_DIR}/include # Point to C++ headers
|
|
40
|
+
-I ${CMAKE_CURRENT_SOURCE_DIR}/bindings # Point to .pxd files
|
|
41
|
+
${CYTHON_SOURCE}
|
|
42
|
+
-o ${CYTHON_OUTPUT}
|
|
43
|
+
DEPENDS ${CYTHON_SOURCE}
|
|
44
|
+
COMMENT "Cythonizing ${CYTHON_SOURCE}"
|
|
45
|
+
VERBATIM
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
# ------------------------------------------------------------------
|
|
49
|
+
# 1. Build your C++ static library
|
|
50
|
+
# ------------------------------------------------------------------
|
|
51
|
+
add_library(jazelle_reader_core STATIC
|
|
52
|
+
src/JazelleFile.cpp
|
|
53
|
+
src/JazelleStream.cpp
|
|
54
|
+
src/PHMTOC.cpp
|
|
55
|
+
src/banks/CRIDHYP.cpp
|
|
56
|
+
src/banks/IEVENTH.cpp
|
|
57
|
+
src/banks/MCHEAD.cpp
|
|
58
|
+
src/banks/MCPART.cpp
|
|
59
|
+
src/banks/MCPNT.cpp
|
|
60
|
+
src/banks/PHCHRG.cpp
|
|
61
|
+
src/banks/PHCRID.cpp
|
|
62
|
+
src/banks/PHEVCL.cpp
|
|
63
|
+
src/banks/PHKELID.cpp
|
|
64
|
+
src/banks/PHKLUS.cpp
|
|
65
|
+
src/banks/PHKTRK.cpp
|
|
66
|
+
src/banks/PHPSUM.cpp
|
|
67
|
+
src/banks/PHWIC.cpp
|
|
68
|
+
src/banks/PIDVEC.cpp
|
|
69
|
+
src/banks/PHPOINT.cpp
|
|
70
|
+
src/banks/PHBM.cpp
|
|
71
|
+
src/banks/PHKCHRG.cpp
|
|
72
|
+
src/banks/PHKMC1.cpp
|
|
73
|
+
src/banks/MCBEAM.cpp
|
|
74
|
+
src/banks/PHVXOV.cpp
|
|
75
|
+
src/banks/PHWMC.cpp
|
|
76
|
+
src/utils/ByteDump.cpp
|
|
77
|
+
)
|
|
78
|
+
target_include_directories(jazelle_reader_core PUBLIC include src)
|
|
79
|
+
|
|
80
|
+
set_target_properties(jazelle_reader_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
81
|
+
|
|
82
|
+
# The Visual Studio generator compiles the sources of a target one at a time
|
|
83
|
+
# unless /MP is set. The Python extension below has a single source, so only the
|
|
84
|
+
# core library gains from it.
|
|
85
|
+
# https://learn.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes
|
|
86
|
+
if(MSVC)
|
|
87
|
+
target_compile_options(jazelle_reader_core PRIVATE /MP)
|
|
88
|
+
endif()
|
|
89
|
+
|
|
90
|
+
# ------------------------------------------------------------------
|
|
91
|
+
# 2. Create the Python extension module
|
|
92
|
+
# ------------------------------------------------------------------
|
|
93
|
+
Python_add_library(jazelle_cython MODULE
|
|
94
|
+
${CYTHON_OUTPUT}
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
if(APPLE)
|
|
98
|
+
target_compile_options(jazelle_cython PRIVATE
|
|
99
|
+
-Wno-deprecated-declarations
|
|
100
|
+
)
|
|
101
|
+
endif()
|
|
102
|
+
|
|
103
|
+
# Set the output name to match what Python expects
|
|
104
|
+
set_target_properties(jazelle_cython PROPERTIES
|
|
105
|
+
OUTPUT_NAME "jazelle_cython"
|
|
106
|
+
PREFIX "" # No 'lib' prefix on Unix
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
# ------------------------------------------------------------------
|
|
110
|
+
# 3. Link the Cython module to your C++ static library
|
|
111
|
+
# ------------------------------------------------------------------
|
|
112
|
+
target_link_libraries(jazelle_cython PRIVATE
|
|
113
|
+
jazelle_reader_core
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
# Tell CMake where to find your .pxd and .hpp files
|
|
117
|
+
target_include_directories(jazelle_cython PRIVATE
|
|
118
|
+
${CMAKE_CURRENT_SOURCE_DIR}/bindings
|
|
119
|
+
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
120
|
+
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
121
|
+
${Python_INCLUDE_DIRS}
|
|
122
|
+
${NUMPY_INCLUDE_DIRS}
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
# ------------------------------------------------------------------
|
|
126
|
+
# 4. Install the extension module to the jazelle package
|
|
127
|
+
# ------------------------------------------------------------------
|
|
128
|
+
install(TARGETS jazelle_cython
|
|
129
|
+
LIBRARY DESTINATION jazelle
|
|
130
|
+
RUNTIME DESTINATION jazelle)
|
|
131
|
+
|
|
132
|
+
option(BUILD_TESTS "Build unit tests" OFF)
|
|
133
|
+
|
|
134
|
+
if(BUILD_TESTS)
|
|
135
|
+
enable_testing()
|
|
136
|
+
find_package(GTest REQUIRED)
|
|
137
|
+
|
|
138
|
+
add_executable(jazelle_cpp_tests tests/cpp/test_binary_io.cpp tests/cpp/test_record_status.cpp)
|
|
139
|
+
target_link_libraries(jazelle_cpp_tests PRIVATE GTest::GTest GTest::Main)
|
|
140
|
+
# Include headers from the main library
|
|
141
|
+
target_include_directories(jazelle_cpp_tests PRIVATE include src)
|
|
142
|
+
|
|
143
|
+
add_test(NAME core_cpp_tests COMMAND jazelle_cpp_tests)
|
|
144
|
+
endif()
|
jazelle-0.5.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alkaid Cheng
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|