biopsy 0.0.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.
- biopsy-0.0.2/.github/workflows/ci.yml +30 -0
- biopsy-0.0.2/.github/workflows/release.yml +110 -0
- biopsy-0.0.2/.gitignore +17 -0
- biopsy-0.0.2/.pre-commit-config.yaml +8 -0
- biopsy-0.0.2/.python-version +1 -0
- biopsy-0.0.2/AGENTS.md +3 -0
- biopsy-0.0.2/Cargo.lock +1011 -0
- biopsy-0.0.2/Cargo.toml +22 -0
- biopsy-0.0.2/LICENSE +21 -0
- biopsy-0.0.2/MANIFEST.in +2 -0
- biopsy-0.0.2/PKG-INFO +129 -0
- biopsy-0.0.2/PLAN.md +85 -0
- biopsy-0.0.2/README.md +118 -0
- biopsy-0.0.2/docs/benchmarks/duplicate-python-functions.md +65 -0
- biopsy-0.0.2/docs/intent/duplicate-python-functions.md +8 -0
- biopsy-0.0.2/docs/intent/github-workflows.md +11 -0
- biopsy-0.0.2/justfile +39 -0
- biopsy-0.0.2/pyproject.toml +55 -0
- biopsy-0.0.2/rust-toolchain.toml +4 -0
- biopsy-0.0.2/setup.cfg +4 -0
- biopsy-0.0.2/src/biopsy/__init__.py +3 -0
- biopsy-0.0.2/src/biopsy/__init__.pyi +1 -0
- biopsy-0.0.2/src/biopsy/_cli.py +181 -0
- biopsy-0.0.2/src/biopsy/_native.pyi +10 -0
- biopsy-0.0.2/src/biopsy/py.typed +0 -0
- biopsy-0.0.2/src/biopsy.egg-info/PKG-INFO +129 -0
- biopsy-0.0.2/src/biopsy.egg-info/SOURCES.txt +44 -0
- biopsy-0.0.2/src/biopsy.egg-info/dependency_links.txt +1 -0
- biopsy-0.0.2/src/biopsy.egg-info/entry_points.txt +2 -0
- biopsy-0.0.2/src/biopsy.egg-info/scm_file_list.json +41 -0
- biopsy-0.0.2/src/biopsy.egg-info/scm_version.json +8 -0
- biopsy-0.0.2/src/biopsy.egg-info/top_level.txt +1 -0
- biopsy-0.0.2/src/discovery.rs +913 -0
- biopsy-0.0.2/src/key/literals.rs +379 -0
- biopsy-0.0.2/src/key/schema.rs +303 -0
- biopsy-0.0.2/src/key/tests.rs +205 -0
- biopsy-0.0.2/src/key.rs +181 -0
- biopsy-0.0.2/src/lib.rs +56 -0
- biopsy-0.0.2/src/scan/tests.rs +153 -0
- biopsy-0.0.2/src/scan.rs +216 -0
- biopsy-0.0.2/src/scope/rewrite.rs +231 -0
- biopsy-0.0.2/src/scope/tests.rs +614 -0
- biopsy-0.0.2/src/scope.rs +913 -0
- biopsy-0.0.2/tests/test_check.py +659 -0
- biopsy-0.0.2/tests/test_import.py +10 -0
- biopsy-0.0.2/uv.lock +154 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ci-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
check:
|
|
18
|
+
name: Python and Rust checks
|
|
19
|
+
runs-on: ubuntu-24.04
|
|
20
|
+
timeout-minutes: 30
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0 # setuptools-scm reads Git history and tags.
|
|
25
|
+
persist-credentials: false
|
|
26
|
+
- uses: astral-sh/setup-uv@2a39bcff78b189a5800d31cfcf0205c7a3e8381e # v10.4.1
|
|
27
|
+
- uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4
|
|
28
|
+
- run: uv python install
|
|
29
|
+
- run: rustup show
|
|
30
|
+
- run: just check
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
sdist:
|
|
12
|
+
name: Build source distribution
|
|
13
|
+
runs-on: ubuntu-24.04
|
|
14
|
+
timeout-minutes: 15
|
|
15
|
+
outputs:
|
|
16
|
+
filename: ${{ steps.build.outputs.filename }}
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0 # setuptools-scm reads Git history and tags.
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
- uses: astral-sh/setup-uv@2a39bcff78b189a5800d31cfcf0205c7a3e8381e # v10.4.1
|
|
23
|
+
- id: build
|
|
24
|
+
name: Build and verify tag-derived version
|
|
25
|
+
env:
|
|
26
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
27
|
+
run: |
|
|
28
|
+
uv build --sdist --out-dir dist
|
|
29
|
+
filename="biopsy-${RELEASE_TAG#v}.tar.gz"
|
|
30
|
+
if [[ ! -f "dist/$filename" ]]; then
|
|
31
|
+
echo 'The release tag must match the built package version (for example, v0.1.0).'
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
echo "filename=$filename" >> "$GITHUB_OUTPUT"
|
|
35
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
36
|
+
with:
|
|
37
|
+
name: sdist
|
|
38
|
+
path: dist/*.tar.gz
|
|
39
|
+
if-no-files-found: error
|
|
40
|
+
|
|
41
|
+
wheels:
|
|
42
|
+
name: Wheels (${{ matrix.runner }}, ${{ matrix.arch }})
|
|
43
|
+
needs: sdist
|
|
44
|
+
runs-on: ${{ matrix.runner }}
|
|
45
|
+
timeout-minutes: 60
|
|
46
|
+
strategy:
|
|
47
|
+
fail-fast: false
|
|
48
|
+
matrix:
|
|
49
|
+
include:
|
|
50
|
+
- {runner: ubuntu-24.04, arch: x86_64}
|
|
51
|
+
- {runner: ubuntu-24.04-arm, arch: aarch64}
|
|
52
|
+
- {runner: macos-15-intel, arch: x86_64}
|
|
53
|
+
- {runner: macos-15, arch: arm64}
|
|
54
|
+
- {runner: windows-2025, arch: AMD64}
|
|
55
|
+
- {runner: windows-11-arm, arch: ARM64}
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
58
|
+
with:
|
|
59
|
+
name: sdist
|
|
60
|
+
path: source
|
|
61
|
+
- name: Build and smoke-test wheels from the release sdist
|
|
62
|
+
uses: pypa/cibuildwheel@f9b966cfadf4109556cadc5bb39ddb72d0ce664e # v4.3.5
|
|
63
|
+
with:
|
|
64
|
+
package-dir: source/${{ needs.sdist.outputs.filename }}
|
|
65
|
+
env:
|
|
66
|
+
CIBW_ARCHS: ${{ matrix.arch }}
|
|
67
|
+
CIBW_BUILD: 'cp311-* cp312-* cp313-* cp314-*'
|
|
68
|
+
CIBW_SKIP: '*-musllinux_*'
|
|
69
|
+
CIBW_TEST_COMMAND: python -c "import biopsy._native" && biopsy --help
|
|
70
|
+
# Install Rust inside manylinux and bypass the development-only
|
|
71
|
+
# Clippy/rustfmt components from rust-toolchain.toml.
|
|
72
|
+
CIBW_BEFORE_ALL_LINUX: >-
|
|
73
|
+
curl --retry 3 -fsSLo /tmp/rustup-init.sh https://sh.rustup.rs &&
|
|
74
|
+
sh /tmp/rustup-init.sh -y --default-toolchain stable --profile minimal --no-modify-path &&
|
|
75
|
+
rustc --version
|
|
76
|
+
CIBW_ENVIRONMENT_LINUX: 'RUSTUP_TOOLCHAIN=stable PATH="$HOME/.cargo/bin:$PATH"'
|
|
77
|
+
MACOSX_DEPLOYMENT_TARGET: '11.0'
|
|
78
|
+
- name: Verify all four CPython wheels were built
|
|
79
|
+
shell: bash
|
|
80
|
+
run: |
|
|
81
|
+
shopt -s nullglob
|
|
82
|
+
for python in cp311 cp312 cp313 cp314; do
|
|
83
|
+
wheels=(wheelhouse/biopsy-*-${python}-*.whl)
|
|
84
|
+
if [[ ${#wheels[@]} -ne 1 ]]; then
|
|
85
|
+
echo "Expected exactly one wheel for $python, found ${#wheels[@]}."
|
|
86
|
+
exit 1
|
|
87
|
+
fi
|
|
88
|
+
done
|
|
89
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
90
|
+
with:
|
|
91
|
+
name: wheels-${{ matrix.runner }}
|
|
92
|
+
path: wheelhouse/*.whl
|
|
93
|
+
if-no-files-found: error
|
|
94
|
+
|
|
95
|
+
publish:
|
|
96
|
+
name: Publish distributions
|
|
97
|
+
needs: [sdist, wheels]
|
|
98
|
+
runs-on: ubuntu-24.04
|
|
99
|
+
timeout-minutes: 15
|
|
100
|
+
environment:
|
|
101
|
+
name: pypi
|
|
102
|
+
url: https://pypi.org/project/biopsy/
|
|
103
|
+
permissions:
|
|
104
|
+
id-token: write
|
|
105
|
+
steps:
|
|
106
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
107
|
+
with:
|
|
108
|
+
path: dist
|
|
109
|
+
merge-multiple: true
|
|
110
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
biopsy-0.0.2/.gitignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Python environments, caches, and distributions
|
|
2
|
+
/.venv/
|
|
3
|
+
__pycache__/
|
|
4
|
+
/.pytest_cache/
|
|
5
|
+
/.ruff_cache/
|
|
6
|
+
/dist/
|
|
7
|
+
/build/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
*.so
|
|
10
|
+
*.pyd
|
|
11
|
+
|
|
12
|
+
# Rust build output
|
|
13
|
+
/target/
|
|
14
|
+
|
|
15
|
+
# Local editor and OS files
|
|
16
|
+
/.idea/
|
|
17
|
+
.DS_Store
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14
|
biopsy-0.0.2/AGENTS.md
ADDED