rapid-textrank 0.0.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 (51) hide show
  1. rapid_textrank-0.0.1/.beads/.gitignore +45 -0
  2. rapid_textrank-0.0.1/.beads/README.md +81 -0
  3. rapid_textrank-0.0.1/.beads/config.yaml +67 -0
  4. rapid_textrank-0.0.1/.beads/interactions.jsonl +0 -0
  5. rapid_textrank-0.0.1/.beads/issues.jsonl +15 -0
  6. rapid_textrank-0.0.1/.beads/metadata.json +4 -0
  7. rapid_textrank-0.0.1/.gitattributes +3 -0
  8. rapid_textrank-0.0.1/.github/workflows/CI.yml +172 -0
  9. rapid_textrank-0.0.1/.github/workflows/publish-pypi.yml +93 -0
  10. rapid_textrank-0.0.1/.github/workflows/publish-testpypi.yml +96 -0
  11. rapid_textrank-0.0.1/.gitignore +41 -0
  12. rapid_textrank-0.0.1/AGENTS.md +40 -0
  13. rapid_textrank-0.0.1/CLAUDE.md +1 -0
  14. rapid_textrank-0.0.1/Cargo.lock +987 -0
  15. rapid_textrank-0.0.1/Cargo.toml +44 -0
  16. rapid_textrank-0.0.1/LICENSE +21 -0
  17. rapid_textrank-0.0.1/PKG-INFO +587 -0
  18. rapid_textrank-0.0.1/README.md +551 -0
  19. rapid_textrank-0.0.1/benches/benchmark.rs +212 -0
  20. rapid_textrank-0.0.1/pyproject.toml +51 -0
  21. rapid_textrank-0.0.1/python/rapid_textrank/__init__.py +53 -0
  22. rapid_textrank-0.0.1/python/rapid_textrank/spacy_component.py +239 -0
  23. rapid_textrank-0.0.1/python/tests/test_api.py +282 -0
  24. rapid_textrank-0.0.1/src/errors.rs +117 -0
  25. rapid_textrank-0.0.1/src/graph/builder.rs +806 -0
  26. rapid_textrank-0.0.1/src/graph/csr.rs +228 -0
  27. rapid_textrank-0.0.1/src/graph/mod.rs +7 -0
  28. rapid_textrank-0.0.1/src/lib.rs +55 -0
  29. rapid_textrank-0.0.1/src/nlp/mod.rs +6 -0
  30. rapid_textrank-0.0.1/src/nlp/stopwords.rs +271 -0
  31. rapid_textrank-0.0.1/src/nlp/tokenizer.rs +312 -0
  32. rapid_textrank-0.0.1/src/pagerank/mod.rs +49 -0
  33. rapid_textrank-0.0.1/src/pagerank/personalized.rs +318 -0
  34. rapid_textrank-0.0.1/src/pagerank/standard.rs +307 -0
  35. rapid_textrank-0.0.1/src/phrase/chunker.rs +290 -0
  36. rapid_textrank-0.0.1/src/phrase/dedup.rs +226 -0
  37. rapid_textrank-0.0.1/src/phrase/extraction.rs +311 -0
  38. rapid_textrank-0.0.1/src/phrase/mod.rs +8 -0
  39. rapid_textrank-0.0.1/src/python/json.rs +447 -0
  40. rapid_textrank-0.0.1/src/python/mod.rs +28 -0
  41. rapid_textrank-0.0.1/src/python/native.rs +393 -0
  42. rapid_textrank-0.0.1/src/summarizer/mod.rs +7 -0
  43. rapid_textrank-0.0.1/src/summarizer/selector.rs +364 -0
  44. rapid_textrank-0.0.1/src/summarizer/unit_vector.rs +193 -0
  45. rapid_textrank-0.0.1/src/types.rs +568 -0
  46. rapid_textrank-0.0.1/src/variants/biased_textrank.rs +285 -0
  47. rapid_textrank-0.0.1/src/variants/mod.rs +10 -0
  48. rapid_textrank-0.0.1/src/variants/position_rank.rs +216 -0
  49. rapid_textrank-0.0.1/src/variants/topic_rank.rs +539 -0
  50. rapid_textrank-0.0.1/tests/integration_tests.rs +250 -0
  51. rapid_textrank-0.0.1/tests/property_tests.rs +202 -0
@@ -0,0 +1,45 @@
1
+ # SQLite databases
2
+ *.db
3
+ *.db?*
4
+ *.db-journal
5
+ *.db-wal
6
+ *.db-shm
7
+
8
+ # Daemon runtime files
9
+ daemon.lock
10
+ daemon.log
11
+ daemon.pid
12
+ bd.sock
13
+ sync-state.json
14
+ last-touched
15
+
16
+ # Local version tracking (prevents upgrade notification spam after git ops)
17
+ .local_version
18
+
19
+ # Legacy database files
20
+ db.sqlite
21
+ bd.db
22
+
23
+ # Worktree redirect file (contains relative path to main repo's .beads/)
24
+ # Must not be committed as paths would be wrong in other clones
25
+ redirect
26
+
27
+ # Merge artifacts (temporary files from 3-way merge)
28
+ beads.base.jsonl
29
+ beads.base.meta.json
30
+ beads.left.jsonl
31
+ beads.left.meta.json
32
+ beads.right.jsonl
33
+ beads.right.meta.json
34
+
35
+ # Sync state (local-only, per-machine)
36
+ # These files are machine-specific and should not be shared across clones
37
+ .sync.lock
38
+ sync_base.jsonl
39
+ export-state/
40
+
41
+ # NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here.
42
+ # They would override fork protection in .git/info/exclude, allowing
43
+ # contributors to accidentally commit upstream issue databases.
44
+ # The JSONL files (issues.jsonl, interactions.jsonl) and config files
45
+ # are tracked by git by default since no pattern above ignores them.
@@ -0,0 +1,81 @@
1
+ # Beads - AI-Native Issue Tracking
2
+
3
+ Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
4
+
5
+ ## What is Beads?
6
+
7
+ Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
8
+
9
+ **Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
10
+
11
+ ## Quick Start
12
+
13
+ ### Essential Commands
14
+
15
+ ```bash
16
+ # Create new issues
17
+ bd create "Add user authentication"
18
+
19
+ # View all issues
20
+ bd list
21
+
22
+ # View issue details
23
+ bd show <issue-id>
24
+
25
+ # Update issue status
26
+ bd update <issue-id> --status in_progress
27
+ bd update <issue-id> --status done
28
+
29
+ # Sync with git remote
30
+ bd sync
31
+ ```
32
+
33
+ ### Working with Issues
34
+
35
+ Issues in Beads are:
36
+ - **Git-native**: Stored in `.beads/issues.jsonl` and synced like code
37
+ - **AI-friendly**: CLI-first design works perfectly with AI coding agents
38
+ - **Branch-aware**: Issues can follow your branch workflow
39
+ - **Always in sync**: Auto-syncs with your commits
40
+
41
+ ## Why Beads?
42
+
43
+ ✨ **AI-Native Design**
44
+ - Built specifically for AI-assisted development workflows
45
+ - CLI-first interface works seamlessly with AI coding agents
46
+ - No context switching to web UIs
47
+
48
+ 🚀 **Developer Focused**
49
+ - Issues live in your repo, right next to your code
50
+ - Works offline, syncs when you push
51
+ - Fast, lightweight, and stays out of your way
52
+
53
+ 🔧 **Git Integration**
54
+ - Automatic sync with git commits
55
+ - Branch-aware issue tracking
56
+ - Intelligent JSONL merge resolution
57
+
58
+ ## Get Started with Beads
59
+
60
+ Try Beads in your own projects:
61
+
62
+ ```bash
63
+ # Install Beads
64
+ curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
65
+
66
+ # Initialize in your repo
67
+ bd init
68
+
69
+ # Create your first issue
70
+ bd create "Try out Beads"
71
+ ```
72
+
73
+ ## Learn More
74
+
75
+ - **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
76
+ - **Quick Start Guide**: Run `bd quickstart`
77
+ - **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
78
+
79
+ ---
80
+
81
+ *Beads: Issue tracking that moves at the speed of thought* ⚡
@@ -0,0 +1,67 @@
1
+ # Beads Configuration File
2
+ # This file configures default behavior for all bd commands in this repository
3
+ # All settings can also be set via environment variables (BD_* prefix)
4
+ # or overridden with command-line flags
5
+
6
+ # Issue prefix for this repository (used by bd init)
7
+ # If not set, bd init will auto-detect from directory name
8
+ # Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
9
+ # issue-prefix: ""
10
+
11
+ # Use no-db mode: load from JSONL, no SQLite, write back after each command
12
+ # When true, bd will use .beads/issues.jsonl as the source of truth
13
+ # instead of SQLite database
14
+ # no-db: false
15
+
16
+ # Disable daemon for RPC communication (forces direct database access)
17
+ # no-daemon: false
18
+
19
+ # Disable auto-flush of database to JSONL after mutations
20
+ # no-auto-flush: false
21
+
22
+ # Disable auto-import from JSONL when it's newer than database
23
+ # no-auto-import: false
24
+
25
+ # Enable JSON output by default
26
+ # json: false
27
+
28
+ # Default actor for audit trails (overridden by BD_ACTOR or --actor)
29
+ # actor: ""
30
+
31
+ # Path to database (overridden by BEADS_DB or --db)
32
+ # db: ""
33
+
34
+ # Auto-start daemon if not running (can also use BEADS_AUTO_START_DAEMON)
35
+ # auto-start-daemon: true
36
+
37
+ # Debounce interval for auto-flush (can also use BEADS_FLUSH_DEBOUNCE)
38
+ # flush-debounce: "5s"
39
+
40
+ # Export events (audit trail) to .beads/events.jsonl on each flush/sync
41
+ # When enabled, new events are appended incrementally using a high-water mark.
42
+ # Use 'bd export --events' to trigger manually regardless of this setting.
43
+ # events-export: false
44
+
45
+ # Git branch for beads commits (bd sync will commit to this branch)
46
+ # IMPORTANT: Set this for team projects so all clones use the same sync branch.
47
+ # This setting persists across clones (unlike database config which is gitignored).
48
+ # Can also use BEADS_SYNC_BRANCH env var for local override.
49
+ # If not set, bd sync will require you to run 'bd config set sync.branch <branch>'.
50
+ sync-branch: "beads-sync"
51
+
52
+ # Multi-repo configuration (experimental - bd-307)
53
+ # Allows hydrating from multiple repositories and routing writes to the correct JSONL
54
+ # repos:
55
+ # primary: "." # Primary repo (where this database lives)
56
+ # additional: # Additional repos to hydrate from (read-only)
57
+ # - ~/beads-planning # Personal planning repo
58
+ # - ~/work-planning # Work planning repo
59
+
60
+ # Integration settings (access with 'bd config get/set')
61
+ # These are stored in the database, not in this file:
62
+ # - jira.url
63
+ # - jira.project
64
+ # - linear.url
65
+ # - linear.api-key
66
+ # - github.org
67
+ # - github.repo
File without changes
@@ -0,0 +1,15 @@
1
+ {"id":"textranker-3vz","title":"Add O(1) lemma lookup to CsrGraph","description":"Add FxHashMap\u003cString, u32\u003e to CsrGraph struct for O(1) lemma→node_id lookups. Currently get_node_by_lemma() does O(N) linear search through Vec\u003cString\u003e. File: src/graph/csr.rs","status":"open","priority":1,"issue_type":"task","owner":"davidten7@gmail.com","created_at":"2026-02-04T12:20:05.421656+08:00","created_by":"David Ten","updated_at":"2026-02-04T12:20:05.421656+08:00"}
2
+ {"id":"textranker-4e9","title":"[P1] Fix include_pos config not being respected","description":"Candidate selection uses hardcoded is_content_word() (includes Verbs) instead of config.include_pos (defaults to Noun/Adj/ProperNoun). GraphBuilder::from_tokens() doesn't receive config. Affects builder.rs, types.rs, extraction.rs, and Python bindings.","status":"closed","priority":1,"issue_type":"bug","owner":"davidten7@gmail.com","created_at":"2026-02-04T09:53:58.536258+08:00","created_by":"David Ten","updated_at":"2026-02-04T10:06:01.177547+08:00","closed_at":"2026-02-04T10:06:01.177547+08:00","close_reason":"Closed"}
3
+ {"id":"textranker-6hg","title":"Phase 4: Phrase \u0026 Summarization (Features 11-13)","description":"Noun chunks, phrase extraction, MMR summarization","status":"closed","priority":1,"issue_type":"epic","owner":"davidten7@gmail.com","created_at":"2026-02-04T01:16:35.942826+08:00","created_by":"David Ten","updated_at":"2026-02-04T01:33:30.210972+08:00","closed_at":"2026-02-04T01:33:30.210972+08:00","close_reason":"All Phase 4 files created: noun chunking, phrase extraction, MMR summarization","dependencies":[{"issue_id":"textranker-6hg","depends_on_id":"textranker-quc","type":"blocks","created_at":"2026-02-04T01:16:46.581925+08:00","created_by":"David Ten"}]}
4
+ {"id":"textranker-9ah","title":"[P2] Fix Python API reporting fake convergence metadata","description":"PyTextRankResult always returns converged=true and iterations=max_iterations regardless of actual PageRank behavior. extract_keyphrases() needs to return PageRankResult tuple. Affects native.rs lines 227, 290, 372.","status":"closed","priority":2,"issue_type":"bug","owner":"davidten7@gmail.com","created_at":"2026-02-04T09:54:01.070422+08:00","created_by":"David Ten","updated_at":"2026-02-04T10:04:02.149281+08:00","closed_at":"2026-02-04T10:04:02.149281+08:00","close_reason":"Closed"}
5
+ {"id":"textranker-9h4","title":"Phase 2: Graph Layer (Features 6-8)","description":"Graph builder, CSR conversion, parallel construction","status":"closed","priority":1,"issue_type":"epic","owner":"davidten7@gmail.com","created_at":"2026-02-04T01:16:35.365316+08:00","created_by":"David Ten","updated_at":"2026-02-04T01:33:24.586195+08:00","closed_at":"2026-02-04T01:33:24.586195+08:00","close_reason":"All Phase 2 files created: graph builder and CSR conversion with parallel support","dependencies":[{"issue_id":"textranker-9h4","depends_on_id":"textranker-sob","type":"blocks","created_at":"2026-02-04T01:16:46.011058+08:00","created_by":"David Ten"}]}
6
+ {"id":"textranker-f83","title":"[P3] Fix incomplete resolve_overlaps function","description":"Higher-score overlap handling in resolve_overlaps() is a no-op (empty condition body at lines 44-49). Function is public but unused in main pipeline (resolve_overlaps_greedy is used). Affects dedup.rs.","status":"closed","priority":3,"issue_type":"bug","owner":"davidten7@gmail.com","created_at":"2026-02-04T09:54:02.44642+08:00","created_by":"David Ten","updated_at":"2026-02-04T09:58:58.948065+08:00","closed_at":"2026-02-04T09:58:58.948065+08:00","close_reason":"Closed"}
7
+ {"id":"textranker-g46","title":"[P1] Fix TopicRank cluster graph having no edges","description":"build_cluster_graph() creates nodes but never adds edges between clusters, making PageRank produce uniform scores. Function needs access to candidates array to determine sentence co-occurrence. Affects topic_rank.rs lines 185-209.","status":"closed","priority":1,"issue_type":"bug","owner":"davidten7@gmail.com","created_at":"2026-02-04T09:53:59.775425+08:00","created_by":"David Ten","updated_at":"2026-02-04T10:06:53.731395+08:00","closed_at":"2026-02-04T10:06:53.731395+08:00","close_reason":"Closed"}
8
+ {"id":"textranker-gmi","title":"Use HashSet for unweighted edge deduplication","description":"When use_edge_weights=false, use HashSet\u003c(Arc\u003cstr\u003e, Arc\u003cstr\u003e)\u003e for automatic deduplication instead of HashMap. File: src/graph/builder.rs","status":"open","priority":2,"issue_type":"task","owner":"davidten7@gmail.com","created_at":"2026-02-04T12:25:38.583711+08:00","created_by":"David Ten","updated_at":"2026-02-04T12:25:38.583711+08:00","dependencies":[{"issue_id":"textranker-gmi","depends_on_id":"textranker-lis","type":"blocks","created_at":"2026-02-04T12:25:42.950985+08:00","created_by":"David Ten"}]}
9
+ {"id":"textranker-k9c","title":"Add pre-filter heuristic to TopicRank clustering","description":"Skip Jaccard similarity computation for disjoint stem sets. Add fast intersection check before computing full Jaccard. File: src/variants/topic_rank.rs lines 166-172","status":"open","priority":2,"issue_type":"task","owner":"davidten7@gmail.com","created_at":"2026-02-04T12:25:38.854221+08:00","created_by":"David Ten","updated_at":"2026-02-04T12:25:38.854221+08:00"}
10
+ {"id":"textranker-kbm","title":"Use direct slice access for chunk tokens","description":"Replace O(T) token filtering with direct slice access tokens[start..end]. Files: src/phrase/extraction.rs, src/phrase/chunker.rs","status":"open","priority":1,"issue_type":"task","owner":"davidten7@gmail.com","created_at":"2026-02-04T12:20:05.952563+08:00","created_by":"David Ten","updated_at":"2026-02-04T12:20:05.952563+08:00"}
11
+ {"id":"textranker-lis","title":"Use Arc\u003cstr\u003e in parallel graph building","description":"Replace String cloning with Arc\u003cstr\u003e for cheap reference counting in parallel edge construction. File: src/graph/builder.rs lines 292-316","status":"open","priority":2,"issue_type":"task","owner":"davidten7@gmail.com","created_at":"2026-02-04T12:20:07.170178+08:00","created_by":"David Ten","updated_at":"2026-02-04T12:20:07.170178+08:00"}
12
+ {"id":"textranker-m9o","title":"[P1] Fix use_edge_weights being ignored in graph builders","description":"Graph builders always add weight 1.0 per co-occurrence regardless of use_edge_weights config. The conditional 'if use_weights { 1.0 } else { 1.0 }' is broken - both branches return 1.0. Affects builder.rs lines 122, 233 and json.rs line 113.","status":"closed","priority":1,"issue_type":"bug","owner":"davidten7@gmail.com","created_at":"2026-02-04T09:53:57.255411+08:00","created_by":"David Ten","updated_at":"2026-02-04T09:58:07.709858+08:00","closed_at":"2026-02-04T09:58:07.709858+08:00","close_reason":"Closed"}
13
+ {"id":"textranker-quc","title":"Phase 3: PageRank Layer (Features 9-10)","description":"Standard PageRank and Personalized PageRank","status":"closed","priority":1,"issue_type":"epic","owner":"davidten7@gmail.com","created_at":"2026-02-04T01:16:35.662445+08:00","created_by":"David Ten","updated_at":"2026-02-04T01:33:27.972693+08:00","closed_at":"2026-02-04T01:33:27.972693+08:00","close_reason":"All Phase 3 files created: standard and personalized PageRank","dependencies":[{"issue_id":"textranker-quc","depends_on_id":"textranker-9h4","type":"blocks","created_at":"2026-02-04T01:16:46.286092+08:00","created_by":"David Ten"}]}
14
+ {"id":"textranker-sob","title":"Phase 1: Foundation (Features 1-5)","description":"Project scaffolding, error types, core types, tokenization, stopwords","status":"closed","priority":0,"issue_type":"epic","owner":"davidten7@gmail.com","created_at":"2026-02-04T01:16:34.918431+08:00","created_by":"David Ten","updated_at":"2026-02-04T01:33:19.57772+08:00","closed_at":"2026-02-04T01:33:19.57772+08:00","close_reason":"All Phase 1 files created: scaffolding, error types, core types, tokenizer, stopwords"}
15
+ {"id":"textranker-t7o","title":"Phase 5: Variants \u0026 Python (Features 14-16)","description":"PositionRank, BiasedTextRank, Python API with spaCy","status":"closed","priority":1,"issue_type":"epic","owner":"davidten7@gmail.com","created_at":"2026-02-04T01:16:36.267263+08:00","created_by":"David Ten","updated_at":"2026-02-04T01:33:34.265292+08:00","closed_at":"2026-02-04T01:33:34.265292+08:00","close_reason":"All Phase 5 files created: PositionRank, BiasedTextRank, TopicRank, Python bindings","dependencies":[{"issue_id":"textranker-t7o","depends_on_id":"textranker-6hg","type":"blocks","created_at":"2026-02-04T01:16:46.809665+08:00","created_by":"David Ten"}]}
@@ -0,0 +1,4 @@
1
+ {
2
+ "database": "beads.db",
3
+ "jsonl_export": "issues.jsonl"
4
+ }
@@ -0,0 +1,3 @@
1
+
2
+ # Use bd merge for beads JSONL files
3
+ .beads/issues.jsonl merge=beads
@@ -0,0 +1,172 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ CARGO_TERM_COLOR: always
11
+
12
+ jobs:
13
+ rust-test:
14
+ name: Rust Tests (${{ matrix.os }})
15
+ runs-on: ${{ matrix.os }}
16
+ env:
17
+ PYO3_PYTHON: python
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os: [ubuntu-latest, macos-latest, windows-latest]
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.12"
29
+
30
+ - name: Set up Rust
31
+ run: |
32
+ rustup default stable
33
+ rustup component add clippy rustfmt
34
+
35
+ - name: Cache cargo
36
+ uses: actions/cache@v4
37
+ with:
38
+ path: |
39
+ ~/.cargo/bin/
40
+ ~/.cargo/registry/index/
41
+ ~/.cargo/registry/cache/
42
+ ~/.cargo/git/db/
43
+ target/
44
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
45
+
46
+ - name: Check formatting
47
+ run: cargo fmt --all -- --check
48
+
49
+ - name: Clippy
50
+ run: cargo clippy --all-targets --no-default-features -- -D warnings
51
+
52
+ - name: Run tests
53
+ run: cargo test --no-default-features --verbose
54
+
55
+ - name: Run property tests
56
+ run: cargo test --test property_tests --no-default-features
57
+
58
+ python-test:
59
+ name: Python Tests (${{ matrix.os }}, Python ${{ matrix.python }})
60
+ runs-on: ${{ matrix.os }}
61
+ strategy:
62
+ fail-fast: false
63
+ matrix:
64
+ os: [ubuntu-latest, macos-latest, windows-latest]
65
+ python: ["3.9", "3.10", "3.11", "3.12"]
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+
69
+ - name: Set up Python
70
+ uses: actions/setup-python@v5
71
+ with:
72
+ python-version: ${{ matrix.python }}
73
+
74
+ - name: Set up Rust
75
+ run: rustup default stable
76
+
77
+ - name: Cache cargo
78
+ uses: actions/cache@v4
79
+ with:
80
+ path: |
81
+ ~/.cargo/registry/index/
82
+ ~/.cargo/registry/cache/
83
+ ~/.cargo/git/db/
84
+ target/
85
+ key: ${{ runner.os }}-cargo-python-${{ matrix.python }}-${{ hashFiles('**/Cargo.lock') }}
86
+
87
+ - name: Install maturin
88
+ run: python -m pip install maturin
89
+
90
+ - name: Build wheel
91
+ run: maturin build --release -i python --out dist
92
+
93
+ - name: Install wheel (Linux/macOS)
94
+ if: matrix.os != 'windows-latest'
95
+ run: python -m pip install dist/*.whl
96
+
97
+ - name: Install wheel (Windows)
98
+ if: matrix.os == 'windows-latest'
99
+ shell: pwsh
100
+ run: |
101
+ $wheel = Get-ChildItem dist/*.whl | Select-Object -First 1
102
+ python -m pip install $wheel.FullName
103
+
104
+ - name: Install test dependencies
105
+ run: pip install pytest
106
+
107
+ - name: Run Python tests
108
+ run: pytest python/tests/ -v
109
+
110
+ benchmark:
111
+ name: Benchmarks
112
+ runs-on: ubuntu-latest
113
+ env:
114
+ PYO3_PYTHON: python
115
+ steps:
116
+ - uses: actions/checkout@v4
117
+
118
+ - name: Set up Python
119
+ uses: actions/setup-python@v5
120
+ with:
121
+ python-version: "3.12"
122
+
123
+ - name: Set up Rust
124
+ run: rustup default stable
125
+
126
+ - name: Run benchmarks
127
+ run: cargo bench --no-default-features
128
+
129
+ build-wheels:
130
+ name: Build wheels (${{ matrix.os }}, Python ${{ matrix.python }})
131
+ runs-on: ${{ matrix.os }}
132
+ strategy:
133
+ matrix:
134
+ os: [ubuntu-latest, macos-latest, windows-latest]
135
+ python: ["3.9", "3.10", "3.11", "3.12"]
136
+ steps:
137
+ - uses: actions/checkout@v4
138
+
139
+ - name: Set up Python
140
+ uses: actions/setup-python@v5
141
+ with:
142
+ python-version: ${{ matrix.python }}
143
+
144
+ - name: Cache cargo
145
+ uses: actions/cache@v4
146
+ with:
147
+ path: |
148
+ ~/.cargo/registry/index/
149
+ ~/.cargo/registry/cache/
150
+ ~/.cargo/git/db/
151
+ target/
152
+ key: ${{ runner.os }}-cargo-wheels-${{ matrix.python }}-${{ hashFiles('**/Cargo.lock') }}
153
+
154
+ - name: Build wheels (Linux)
155
+ if: matrix.os == 'ubuntu-latest'
156
+ uses: PyO3/maturin-action@v1
157
+ with:
158
+ args: --release --out dist -i python${{ matrix.python }}
159
+ manylinux: auto
160
+
161
+ - name: Build wheels (macOS/Windows)
162
+ if: matrix.os != 'ubuntu-latest'
163
+ uses: PyO3/maturin-action@v1
164
+ with:
165
+ args: --release --out dist --interpreter python
166
+ manylinux: auto
167
+
168
+ - name: Upload wheels
169
+ uses: actions/upload-artifact@v4
170
+ with:
171
+ name: wheels-${{ matrix.os }}-py${{ matrix.python }}
172
+ path: dist
@@ -0,0 +1,93 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build-wheels:
14
+ name: Build wheels (${{ matrix.os }}, Python ${{ matrix.python }})
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ matrix:
18
+ os: [ubuntu-latest, macos-latest, windows-latest]
19
+ python: ["3.9", "3.10", "3.11", "3.12"]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python }}
27
+
28
+ - name: Build wheels (Linux)
29
+ if: matrix.os == 'ubuntu-latest'
30
+ uses: PyO3/maturin-action@v1
31
+ with:
32
+ args: --release --out dist -i python${{ matrix.python }}
33
+ manylinux: auto
34
+
35
+ - name: Build wheels (macOS/Windows)
36
+ if: matrix.os != 'ubuntu-latest'
37
+ uses: PyO3/maturin-action@v1
38
+ with:
39
+ args: --release --out dist --interpreter python
40
+ manylinux: auto
41
+
42
+ - name: Upload wheels
43
+ uses: actions/upload-artifact@v4
44
+ with:
45
+ name: wheels-${{ matrix.os }}-py${{ matrix.python }}
46
+ path: dist/*
47
+
48
+ build-sdist:
49
+ name: Build sdist
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+
54
+ - name: Set up Python
55
+ uses: actions/setup-python@v5
56
+ with:
57
+ python-version: "3.12"
58
+
59
+ - name: Build sdist
60
+ run: |
61
+ python -m pip install --upgrade build
62
+ python -m build --sdist
63
+
64
+ - name: Upload sdist
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: sdist
68
+ path: dist/*.tar.gz
69
+
70
+ publish:
71
+ name: Publish to PyPI
72
+ runs-on: ubuntu-latest
73
+ needs: [build-wheels, build-sdist]
74
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
75
+ environment: pypi
76
+ permissions:
77
+ id-token: write
78
+ steps:
79
+ - name: Download wheels
80
+ uses: actions/download-artifact@v4
81
+ with:
82
+ pattern: wheels-*
83
+ path: dist
84
+ merge-multiple: true
85
+
86
+ - name: Download sdist
87
+ uses: actions/download-artifact@v4
88
+ with:
89
+ name: sdist
90
+ path: dist
91
+
92
+ - name: Publish to PyPI
93
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,96 @@
1
+ name: Publish to TestPyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "test-*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build-wheels:
14
+ name: Build wheels (${{ matrix.os }}, Python ${{ matrix.python }})
15
+ runs-on: ${{ matrix.os }}
16
+ strategy:
17
+ matrix:
18
+ os: [ubuntu-latest, macos-latest, windows-latest]
19
+ python: ["3.9", "3.10", "3.11", "3.12"]
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python }}
27
+
28
+ - name: Build wheels (Linux)
29
+ if: matrix.os == 'ubuntu-latest'
30
+ uses: PyO3/maturin-action@v1
31
+ with:
32
+ args: --release --out dist -i python${{ matrix.python }}
33
+ manylinux: auto
34
+
35
+ - name: Build wheels (macOS/Windows)
36
+ if: matrix.os != 'ubuntu-latest'
37
+ uses: PyO3/maturin-action@v1
38
+ with:
39
+ args: --release --out dist --interpreter python
40
+ manylinux: auto
41
+
42
+ - name: Upload wheels
43
+ uses: actions/upload-artifact@v4
44
+ with:
45
+ name: wheels-${{ matrix.os }}-py${{ matrix.python }}
46
+ path: dist/*
47
+
48
+ build-sdist:
49
+ name: Build sdist
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+
54
+ - name: Set up Python
55
+ uses: actions/setup-python@v5
56
+ with:
57
+ python-version: "3.12"
58
+
59
+ - name: Build sdist
60
+ run: |
61
+ python -m pip install --upgrade build
62
+ python -m build --sdist
63
+
64
+ - name: Upload sdist
65
+ uses: actions/upload-artifact@v4
66
+ with:
67
+ name: sdist
68
+ path: dist/*.tar.gz
69
+
70
+ publish:
71
+ name: Publish to TestPyPI
72
+ runs-on: ubuntu-latest
73
+ needs: [build-wheels, build-sdist]
74
+ if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/')
75
+ environment: testpypi
76
+ permissions:
77
+ id-token: write
78
+ steps:
79
+ - name: Download wheels
80
+ uses: actions/download-artifact@v4
81
+ with:
82
+ pattern: wheels-*
83
+ path: dist
84
+ merge-multiple: true
85
+
86
+ - name: Download sdist
87
+ uses: actions/download-artifact@v4
88
+ with:
89
+ name: sdist
90
+ path: dist
91
+
92
+ - name: Publish to TestPyPI
93
+ uses: pypa/gh-action-pypi-publish@release/v1
94
+ with:
95
+ repository-url: https://test.pypi.org/legacy/
96
+ skip-existing: true
@@ -0,0 +1,41 @@
1
+ # bv (beads viewer) local config and caches
2
+ .bv/
3
+
4
+ # Rust
5
+ /target/
6
+ Cargo.lock
7
+
8
+ # Python
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+ *.so
13
+ *.egg-info/
14
+ dist/
15
+ build/
16
+ .eggs/
17
+ *.egg
18
+ *.ipynb
19
+
20
+ # Virtual environments
21
+ .venv/
22
+ venv/
23
+ ENV/
24
+
25
+ # IDE
26
+ .idea/
27
+ .vscode/
28
+ *.swp
29
+ *.swo
30
+
31
+ # OS
32
+ .DS_Store
33
+ Thumbs.db
34
+
35
+ # Testing
36
+ .pytest_cache/
37
+ .coverage
38
+ htmlcov/
39
+
40
+ # Benchmarks
41
+ target/criterion/
@@ -0,0 +1,40 @@
1
+ # Agent Instructions
2
+
3
+ This project uses **bd** (beads) for issue tracking. Run `bd onboard` to get started.
4
+
5
+ ## Quick Reference
6
+
7
+ ```bash
8
+ bd ready # Find available work
9
+ bd show <id> # View issue details
10
+ bd update <id> --status in_progress # Claim work
11
+ bd close <id> # Complete work
12
+ bd sync # Sync with git
13
+ ```
14
+
15
+ ## Landing the Plane (Session Completion)
16
+
17
+ **When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
18
+
19
+ **MANDATORY WORKFLOW:**
20
+
21
+ 1. **File issues for remaining work** - Create issues for anything that needs follow-up
22
+ 2. **Run quality gates** (if code changed) - Tests, linters, builds
23
+ 3. **Update issue status** - Close finished work, update in-progress items
24
+ 4. **PUSH TO REMOTE** - This is MANDATORY:
25
+ ```bash
26
+ git pull --rebase
27
+ bd sync
28
+ git push
29
+ git status # MUST show "up to date with origin"
30
+ ```
31
+ 5. **Clean up** - Clear stashes, prune remote branches
32
+ 6. **Verify** - All changes committed AND pushed
33
+ 7. **Hand off** - Provide context for next session
34
+
35
+ **CRITICAL RULES:**
36
+ - Work is NOT complete until `git push` succeeds
37
+ - NEVER stop before pushing - that leaves work stranded locally
38
+ - NEVER say "ready to push when you are" - YOU must push
39
+ - If push fails, resolve and retry until it succeeds
40
+
@@ -0,0 +1 @@
1
+ Use 'bd' for task tracking