invisensing 1.0.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.
- invisensing-1.0.0/.github/workflows/ci.yml +56 -0
- invisensing-1.0.0/.github/workflows/docs.yml +37 -0
- invisensing-1.0.0/.github/workflows/release-testpypi.yml +163 -0
- invisensing-1.0.0/.github/workflows/release.yml +176 -0
- invisensing-1.0.0/.gitignore +34 -0
- invisensing-1.0.0/Cargo.toml +33 -0
- invisensing-1.0.0/LICENSE +21 -0
- invisensing-1.0.0/PKG-INFO +431 -0
- invisensing-1.0.0/README.md +378 -0
- invisensing-1.0.0/assets/basic_usage.py +58 -0
- invisensing-1.0.0/assets/invisensing_icon.png +0 -0
- invisensing-1.0.0/assets/invisensing_logo.png +0 -0
- invisensing-1.0.0/pyproject.toml +104 -0
- invisensing-1.0.0/python/invisensing/__init__.py +154 -0
- invisensing-1.0.0/python/invisensing/_formats.py +387 -0
- invisensing-1.0.0/python/invisensing/_legacy.py +174 -0
- invisensing-1.0.0/python/invisensing/_reader.py +746 -0
- invisensing-1.0.0/src/lib.rs +811 -0
- invisensing-1.0.0/tests/test_File.py +81 -0
- invisensing-1.0.0/tests/test_channels.py +493 -0
- invisensing-1.0.0/tests/test_formats.py +145 -0
- invisensing-1.0.0/tests/test_performance.py +263 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Continuous-integration sanity check for every push / PR.
|
|
2
|
+
#
|
|
3
|
+
# Builds the Rust extension on Linux against the currently-supported
|
|
4
|
+
# Python versions and runs the pytest suite. Keeps `release.yml`
|
|
5
|
+
# focused on the publishing pipeline (and avoids paying for the full
|
|
6
|
+
# manylinux + macOS + Windows matrix on every commit — only release
|
|
7
|
+
# tags trigger that).
|
|
8
|
+
|
|
9
|
+
name: CI
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
branches: [master, main]
|
|
14
|
+
pull_request: {}
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ci-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
test:
|
|
22
|
+
name: tests · python ${{ matrix.python }}
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python }}
|
|
34
|
+
|
|
35
|
+
# Build the wheel via maturin-action — it handles the Rust
|
|
36
|
+
# toolchain, the manylinux container, and the venv that recent
|
|
37
|
+
# `maturin develop` requires. Outputs `target/wheels/*.whl`.
|
|
38
|
+
- name: Build wheel
|
|
39
|
+
uses: PyO3/maturin-action@v1
|
|
40
|
+
with:
|
|
41
|
+
command: build
|
|
42
|
+
args: --release --interpreter python${{ matrix.python }} --out target/wheels
|
|
43
|
+
manylinux: auto
|
|
44
|
+
sccache: true
|
|
45
|
+
|
|
46
|
+
# Install the freshly-built wheel + the runtime deps + pytest.
|
|
47
|
+
# We use the wheel rather than `maturin develop` so the test run
|
|
48
|
+
# exercises the exact same artefact that would ship to PyPI.
|
|
49
|
+
- name: Install wheel + test deps
|
|
50
|
+
run: |
|
|
51
|
+
python -m pip install --upgrade pip
|
|
52
|
+
python -m pip install pytest
|
|
53
|
+
python -m pip install --find-links target/wheels invisensing
|
|
54
|
+
|
|
55
|
+
- name: Run the test suite
|
|
56
|
+
run: pytest tests/ -v
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Deploy Doxygen Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout code
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
|
|
15
|
+
- name: Install Doxygen
|
|
16
|
+
run: sudo apt-get install -y doxygen graphviz
|
|
17
|
+
|
|
18
|
+
- name: Generate Documentation
|
|
19
|
+
run: doxygen Doxyfile
|
|
20
|
+
|
|
21
|
+
- name: Check generated files
|
|
22
|
+
run: ls -R ./Docs/html
|
|
23
|
+
|
|
24
|
+
- name: Debug deploy
|
|
25
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
26
|
+
with:
|
|
27
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
28
|
+
publish_dir: ./Docs/html
|
|
29
|
+
publish_branch: gh-pages
|
|
30
|
+
dry_run: true
|
|
31
|
+
|
|
32
|
+
- name: Deploy to GitHub Pages
|
|
33
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
34
|
+
with:
|
|
35
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
36
|
+
publish_dir: ./Docs/html
|
|
37
|
+
publish_branch: gh-pages
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# Build wheels and publish to **TestPyPI** (test.pypi.org) on demand.
|
|
2
|
+
#
|
|
3
|
+
# Trigger:
|
|
4
|
+
# - Manual only (Actions tab → "Release to TestPyPI" → Run workflow).
|
|
5
|
+
# Pick a ref (branch or tag) to build from. No tag push required —
|
|
6
|
+
# useful for verifying the release pipeline without committing to
|
|
7
|
+
# a real version number on PyPI proper.
|
|
8
|
+
#
|
|
9
|
+
# Authentication:
|
|
10
|
+
# - Uses TestPyPI's own Trusted Publishing (OIDC). The trust
|
|
11
|
+
# relationship must be configured separately on test.pypi.org
|
|
12
|
+
# (see the comment on the `publish` job below).
|
|
13
|
+
#
|
|
14
|
+
# Version policy:
|
|
15
|
+
# - PyPI/TestPyPI versions are immutable. If you want to iterate
|
|
16
|
+
# ("rebuild and re-publish") you must bump the version each time.
|
|
17
|
+
# Standard practice: use a pre-release suffix while testing —
|
|
18
|
+
# `1.0.0a1`, `1.0.0rc1`, `1.0.0.dev1`, etc. (PEP 440).
|
|
19
|
+
# - Edit `pyproject.toml` + `Cargo.toml` to a fresh pre-release
|
|
20
|
+
# before running, otherwise TestPyPI will reject the upload as
|
|
21
|
+
# a duplicate.
|
|
22
|
+
|
|
23
|
+
name: Release to TestPyPI
|
|
24
|
+
|
|
25
|
+
on:
|
|
26
|
+
workflow_dispatch: {}
|
|
27
|
+
|
|
28
|
+
concurrency:
|
|
29
|
+
group: release-testpypi-${{ github.ref }}
|
|
30
|
+
cancel-in-progress: false
|
|
31
|
+
|
|
32
|
+
jobs:
|
|
33
|
+
# ── Linux wheels: 2 archs × cp39-cp313 ──
|
|
34
|
+
build-linux:
|
|
35
|
+
name: wheels · linux · ${{ matrix.target }}
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
strategy:
|
|
38
|
+
fail-fast: false
|
|
39
|
+
matrix:
|
|
40
|
+
target: [x86_64, aarch64]
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: "3.x"
|
|
46
|
+
- name: Build wheels (maturin)
|
|
47
|
+
uses: PyO3/maturin-action@v1
|
|
48
|
+
with:
|
|
49
|
+
target: ${{ matrix.target }}
|
|
50
|
+
args: --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13
|
|
51
|
+
manylinux: 2014
|
|
52
|
+
sccache: true
|
|
53
|
+
- uses: actions/upload-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
name: wheels-linux-${{ matrix.target }}
|
|
56
|
+
path: dist/
|
|
57
|
+
|
|
58
|
+
# ── macOS wheels: target × python ──
|
|
59
|
+
build-macos:
|
|
60
|
+
name: wheels · macos · ${{ matrix.target }} · py${{ matrix.python }}
|
|
61
|
+
runs-on: ${{ matrix.target == 'x86_64' && 'macos-13' || 'macos-14' }}
|
|
62
|
+
strategy:
|
|
63
|
+
fail-fast: false
|
|
64
|
+
matrix:
|
|
65
|
+
target: [x86_64, aarch64]
|
|
66
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v4
|
|
69
|
+
- uses: actions/setup-python@v5
|
|
70
|
+
with:
|
|
71
|
+
python-version: ${{ matrix.python }}
|
|
72
|
+
- name: Build wheel (maturin)
|
|
73
|
+
uses: PyO3/maturin-action@v1
|
|
74
|
+
with:
|
|
75
|
+
target: ${{ matrix.target }}
|
|
76
|
+
args: --release --out dist --interpreter python${{ matrix.python }}
|
|
77
|
+
sccache: true
|
|
78
|
+
- uses: actions/upload-artifact@v4
|
|
79
|
+
with:
|
|
80
|
+
name: wheels-macos-${{ matrix.target }}-py${{ matrix.python }}
|
|
81
|
+
path: dist/
|
|
82
|
+
|
|
83
|
+
# ── Windows wheels: x86_64 × python ──
|
|
84
|
+
build-windows:
|
|
85
|
+
name: wheels · windows · py${{ matrix.python }}
|
|
86
|
+
runs-on: windows-latest
|
|
87
|
+
strategy:
|
|
88
|
+
fail-fast: false
|
|
89
|
+
matrix:
|
|
90
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v4
|
|
93
|
+
- uses: actions/setup-python@v5
|
|
94
|
+
with:
|
|
95
|
+
python-version: ${{ matrix.python }}
|
|
96
|
+
- name: Build wheel (maturin)
|
|
97
|
+
uses: PyO3/maturin-action@v1
|
|
98
|
+
with:
|
|
99
|
+
target: x86_64
|
|
100
|
+
args: --release --out dist --interpreter python${{ matrix.python }}
|
|
101
|
+
sccache: true
|
|
102
|
+
- uses: actions/upload-artifact@v4
|
|
103
|
+
with:
|
|
104
|
+
name: wheels-windows-py${{ matrix.python }}
|
|
105
|
+
path: dist/
|
|
106
|
+
|
|
107
|
+
# ── Source distribution ──
|
|
108
|
+
build-sdist:
|
|
109
|
+
name: sdist
|
|
110
|
+
runs-on: ubuntu-latest
|
|
111
|
+
steps:
|
|
112
|
+
- uses: actions/checkout@v4
|
|
113
|
+
- name: Build sdist (maturin)
|
|
114
|
+
uses: PyO3/maturin-action@v1
|
|
115
|
+
with:
|
|
116
|
+
command: sdist
|
|
117
|
+
args: --out dist
|
|
118
|
+
- uses: actions/upload-artifact@v4
|
|
119
|
+
with:
|
|
120
|
+
name: sdist
|
|
121
|
+
path: dist/
|
|
122
|
+
|
|
123
|
+
# ── Publish to TestPyPI ──
|
|
124
|
+
#
|
|
125
|
+
# One-time setup on test.pypi.org:
|
|
126
|
+
# 1. Sign in (separate account from pypi.org — same email is fine).
|
|
127
|
+
# 2. https://test.pypi.org/manage/account/publishing/ → Add a
|
|
128
|
+
# pending publisher with:
|
|
129
|
+
# - PyPI Project Name: invisensing
|
|
130
|
+
# - Owner: invisensing-io
|
|
131
|
+
# - Repository name: python-lib
|
|
132
|
+
# - Workflow name: release-testpypi.yml
|
|
133
|
+
# - Environment name: testpypi
|
|
134
|
+
#
|
|
135
|
+
# One-time setup on GitHub:
|
|
136
|
+
# - Settings → Environments → New environment named "testpypi"
|
|
137
|
+
# (optionally with required reviewers as for the prod env).
|
|
138
|
+
publish:
|
|
139
|
+
name: publish to TestPyPI
|
|
140
|
+
needs: [build-linux, build-macos, build-windows, build-sdist]
|
|
141
|
+
runs-on: ubuntu-latest
|
|
142
|
+
environment:
|
|
143
|
+
name: testpypi
|
|
144
|
+
url: https://test.pypi.org/p/invisensing
|
|
145
|
+
permissions:
|
|
146
|
+
id-token: write
|
|
147
|
+
contents: read
|
|
148
|
+
steps:
|
|
149
|
+
- name: Download all build artefacts
|
|
150
|
+
uses: actions/download-artifact@v4
|
|
151
|
+
with:
|
|
152
|
+
path: dist
|
|
153
|
+
merge-multiple: true
|
|
154
|
+
|
|
155
|
+
- name: List what's about to be published
|
|
156
|
+
run: ls -la dist/
|
|
157
|
+
|
|
158
|
+
- name: Publish to TestPyPI
|
|
159
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
160
|
+
with:
|
|
161
|
+
repository-url: https://test.pypi.org/legacy/
|
|
162
|
+
skip-existing: true
|
|
163
|
+
verbose: true
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Build multi-platform wheels and publish to PyPI on tagged releases.
|
|
2
|
+
#
|
|
3
|
+
# Trigger:
|
|
4
|
+
# - Push a tag matching `v*` (e.g. `v1.0.0`) → CI builds wheels for
|
|
5
|
+
# Linux x86_64/aarch64 + macOS x86_64/arm64 + Windows x86_64 across
|
|
6
|
+
# CPython 3.9–3.13, plus the source distribution, then uploads them
|
|
7
|
+
# all to PyPI in a single atomic publish step.
|
|
8
|
+
#
|
|
9
|
+
# Authentication:
|
|
10
|
+
# - Uses **PyPI Trusted Publishing (OIDC)** — no API token to manage,
|
|
11
|
+
# no secret to leak. The trust relationship is configured once on
|
|
12
|
+
# PyPI side.
|
|
13
|
+
#
|
|
14
|
+
# Manual trigger:
|
|
15
|
+
# - You can also run the workflow from the Actions tab via
|
|
16
|
+
# `workflow_dispatch` to verify the build matrix without publishing
|
|
17
|
+
# (publish job only runs on tag pushes).
|
|
18
|
+
|
|
19
|
+
name: Release to PyPI
|
|
20
|
+
|
|
21
|
+
on:
|
|
22
|
+
push:
|
|
23
|
+
tags:
|
|
24
|
+
- "v*"
|
|
25
|
+
workflow_dispatch: {}
|
|
26
|
+
|
|
27
|
+
# Only one release pipeline at a time per ref. Cancel an in-flight one
|
|
28
|
+
# if a newer tag is pushed (rare but cheap).
|
|
29
|
+
concurrency:
|
|
30
|
+
group: release-${{ github.ref }}
|
|
31
|
+
cancel-in-progress: false
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
# ── Linux wheels: manylinux2014 builds all 5 Python versions per arch ──
|
|
35
|
+
#
|
|
36
|
+
# The manylinux container ships every supported CPython, including
|
|
37
|
+
# 3.14 — but PyO3 0.24 only supports up to 3.13, so we must list the
|
|
38
|
+
# interpreters explicitly (not `--find-interpreter`, which would pull
|
|
39
|
+
# 3.14 and fail with "configured Python interpreter version (3.14)
|
|
40
|
+
# is newer than PyO3's maximum supported version (3.13)").
|
|
41
|
+
build-linux:
|
|
42
|
+
name: wheels · linux · ${{ matrix.target }}
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
strategy:
|
|
45
|
+
fail-fast: false
|
|
46
|
+
matrix:
|
|
47
|
+
target: [x86_64, aarch64]
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
- uses: actions/setup-python@v5
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.x"
|
|
53
|
+
|
|
54
|
+
- name: Build wheels (maturin)
|
|
55
|
+
uses: PyO3/maturin-action@v1
|
|
56
|
+
with:
|
|
57
|
+
target: ${{ matrix.target }}
|
|
58
|
+
# Explicit list — one job builds 5 wheels (cp39-cp313). When
|
|
59
|
+
# we bump to PyO3 >= 0.25 we can add 3.14 here too.
|
|
60
|
+
args: --release --out dist --interpreter 3.9 3.10 3.11 3.12 3.13
|
|
61
|
+
manylinux: 2014
|
|
62
|
+
sccache: true
|
|
63
|
+
|
|
64
|
+
- uses: actions/upload-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
name: wheels-linux-${{ matrix.target }}
|
|
67
|
+
path: dist/
|
|
68
|
+
|
|
69
|
+
# ── macOS wheels: aarch64 only (Apple Silicon native) ──
|
|
70
|
+
#
|
|
71
|
+
# `macos-13` (the last GitHub-hosted Intel runner pool) is heavily
|
|
72
|
+
# saturated — observed >20 min queue time with no runner pickup. The
|
|
73
|
+
# x86_64 axis is dropped from this release; Intel-Mac users install
|
|
74
|
+
# via `pip install invisensing` which falls back to the sdist (needs
|
|
75
|
+
# a Rust toolchain). Add x86_64 back in a follow-up release if there
|
|
76
|
+
# is real demand. Apple Silicon (arm64) ships normally — that's the
|
|
77
|
+
# vast majority of current Mac users.
|
|
78
|
+
build-macos:
|
|
79
|
+
name: wheels · macos · ${{ matrix.target }} · py${{ matrix.python }}
|
|
80
|
+
runs-on: macos-14
|
|
81
|
+
strategy:
|
|
82
|
+
fail-fast: false
|
|
83
|
+
matrix:
|
|
84
|
+
target: [aarch64]
|
|
85
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v4
|
|
88
|
+
- uses: actions/setup-python@v5
|
|
89
|
+
with:
|
|
90
|
+
python-version: ${{ matrix.python }}
|
|
91
|
+
|
|
92
|
+
- name: Build wheel (maturin)
|
|
93
|
+
uses: PyO3/maturin-action@v1
|
|
94
|
+
with:
|
|
95
|
+
target: ${{ matrix.target }}
|
|
96
|
+
args: --release --out dist --interpreter python${{ matrix.python }}
|
|
97
|
+
sccache: true
|
|
98
|
+
|
|
99
|
+
- uses: actions/upload-artifact@v4
|
|
100
|
+
with:
|
|
101
|
+
name: wheels-macos-${{ matrix.target }}-py${{ matrix.python }}
|
|
102
|
+
path: dist/
|
|
103
|
+
|
|
104
|
+
# ── Windows wheels: x86_64 only, one job per Python version ──
|
|
105
|
+
build-windows:
|
|
106
|
+
name: wheels · windows · py${{ matrix.python }}
|
|
107
|
+
runs-on: windows-latest
|
|
108
|
+
strategy:
|
|
109
|
+
fail-fast: false
|
|
110
|
+
matrix:
|
|
111
|
+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@v4
|
|
114
|
+
- uses: actions/setup-python@v5
|
|
115
|
+
with:
|
|
116
|
+
python-version: ${{ matrix.python }}
|
|
117
|
+
|
|
118
|
+
- name: Build wheel (maturin)
|
|
119
|
+
uses: PyO3/maturin-action@v1
|
|
120
|
+
with:
|
|
121
|
+
target: x86_64
|
|
122
|
+
args: --release --out dist --interpreter python${{ matrix.python }}
|
|
123
|
+
sccache: true
|
|
124
|
+
|
|
125
|
+
- uses: actions/upload-artifact@v4
|
|
126
|
+
with:
|
|
127
|
+
name: wheels-windows-py${{ matrix.python }}
|
|
128
|
+
path: dist/
|
|
129
|
+
|
|
130
|
+
# ── Source distribution (single sdist for all platforms) ─────────────
|
|
131
|
+
build-sdist:
|
|
132
|
+
name: sdist
|
|
133
|
+
runs-on: ubuntu-latest
|
|
134
|
+
steps:
|
|
135
|
+
- uses: actions/checkout@v4
|
|
136
|
+
- name: Build sdist (maturin)
|
|
137
|
+
uses: PyO3/maturin-action@v1
|
|
138
|
+
with:
|
|
139
|
+
command: sdist
|
|
140
|
+
args: --out dist
|
|
141
|
+
- uses: actions/upload-artifact@v4
|
|
142
|
+
with:
|
|
143
|
+
name: sdist
|
|
144
|
+
path: dist/
|
|
145
|
+
|
|
146
|
+
# ── Publish: gathers all wheels + sdist and uploads to PyPI ──────────
|
|
147
|
+
#
|
|
148
|
+
# Runs only on tag pushes (skipped on workflow_dispatch). Uses Trusted
|
|
149
|
+
# Publishing — no PYPI_API_TOKEN, no secret. The `id-token: write`
|
|
150
|
+
# permission grants this workflow the OIDC token PyPI verifies.
|
|
151
|
+
publish:
|
|
152
|
+
name: publish to PyPI
|
|
153
|
+
needs: [build-linux, build-macos, build-windows, build-sdist]
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
156
|
+
environment:
|
|
157
|
+
name: pypi
|
|
158
|
+
url: https://pypi.org/p/invisensing
|
|
159
|
+
permissions:
|
|
160
|
+
id-token: write # OIDC token for Trusted Publishing
|
|
161
|
+
contents: read
|
|
162
|
+
steps:
|
|
163
|
+
- name: Download all build artefacts
|
|
164
|
+
uses: actions/download-artifact@v4
|
|
165
|
+
with:
|
|
166
|
+
path: dist
|
|
167
|
+
merge-multiple: true
|
|
168
|
+
|
|
169
|
+
- name: List what's about to be published
|
|
170
|
+
run: ls -la dist/
|
|
171
|
+
|
|
172
|
+
- name: Publish to PyPI
|
|
173
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
174
|
+
with:
|
|
175
|
+
skip-existing: true
|
|
176
|
+
verbose: true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Python build artefacts
|
|
2
|
+
dist/
|
|
3
|
+
build/
|
|
4
|
+
*.egg-info/
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*$py.class
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.tox/
|
|
10
|
+
.coverage
|
|
11
|
+
htmlcov/
|
|
12
|
+
|
|
13
|
+
# Rust build artefacts (maturin / cargo)
|
|
14
|
+
target/
|
|
15
|
+
*.lock
|
|
16
|
+
Cargo.lock
|
|
17
|
+
|
|
18
|
+
# Compiled native extension copied into the package by `maturin develop`
|
|
19
|
+
python/invisensing/*.so
|
|
20
|
+
python/invisensing/*.pyd
|
|
21
|
+
|
|
22
|
+
# IDE / editor
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
*.swp
|
|
26
|
+
|
|
27
|
+
# Test outputs
|
|
28
|
+
tests/output/
|
|
29
|
+
|
|
30
|
+
# Generated docs
|
|
31
|
+
Docs/*
|
|
32
|
+
|
|
33
|
+
# Internal release runbook — kept locally for the maintainer, never pushed
|
|
34
|
+
PUBLISHING.md
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "invisensing-core"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
description = "Native Rust core for the Invisensing Python SDK — fast DAT reader and de-interleave kernels for PCIe7821 DAS acquisitions"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
repository = "https://github.com/invisensing-io/python-lib"
|
|
8
|
+
keywords = ["DAS", "fiber-optic", "demodulation", "audace", "pyo3"]
|
|
9
|
+
categories = ["science"]
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
|
|
12
|
+
[lib]
|
|
13
|
+
# The Python wheel imports this as `invisensing._core` (see lib.rs #[pymodule]).
|
|
14
|
+
name = "_core"
|
|
15
|
+
crate-type = ["cdylib"]
|
|
16
|
+
|
|
17
|
+
[dependencies]
|
|
18
|
+
# PyO3 binds Rust functions to Python; `extension-module` builds a .so/.pyd that
|
|
19
|
+
# Python's import machinery picks up directly (no libpython link at compile time
|
|
20
|
+
# — needed for portable wheels under PEP 599 / manylinux).
|
|
21
|
+
# PyO3 0.24 brings the fix for the `PyString::from_object` buffer
|
|
22
|
+
# overflow advisory (the 0.22.x branch was never patched). Numpy bumps
|
|
23
|
+
# in lockstep — the two crates pin matching versions to each other.
|
|
24
|
+
pyo3 = { version = "0.24", features = ["extension-module"] }
|
|
25
|
+
# numpy gives us zero-copy `PyArray1`/`PyArray2` constructors and lets us return
|
|
26
|
+
# numpy arrays whose memory is owned by Rust without an extra copy.
|
|
27
|
+
numpy = "0.24"
|
|
28
|
+
|
|
29
|
+
[profile.release]
|
|
30
|
+
# Wheels ship release builds; tune for runtime perf over compile time.
|
|
31
|
+
lto = "thin"
|
|
32
|
+
codegen-units = 1
|
|
33
|
+
opt-level = 3
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 Invisensing
|
|
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.
|