arrowspace 0.13.2__tar.gz → 0.15.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.

Potentially problematic release.


This version of arrowspace might be problematic. Click here for more details.

Files changed (71) hide show
  1. arrowspace-0.15.0/.github/workflows/python-publish.yml +137 -0
  2. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/Cargo.lock +7 -4
  3. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/Cargo.toml +2 -2
  4. {arrowspace-0.13.2 → arrowspace-0.15.0}/PKG-INFO +1 -1
  5. {arrowspace-0.13.2 → arrowspace-0.15.0}/pyproject.toml +0 -1
  6. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/test_0.py +7 -6
  7. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/test_2_CVE_db.py +2 -2
  8. arrowspace-0.13.2/arrowspace-rs/.gitignore +0 -2
  9. arrowspace-0.13.2/arrowspace-rs/CITATION.cff +0 -26
  10. arrowspace-0.13.2/arrowspace-rs/CODE_OF_CONDUCT.md +0 -22
  11. arrowspace-0.13.2/arrowspace-rs/CONTRIBUTING.md +0 -44
  12. arrowspace-0.13.2/arrowspace-rs/Cargo.lock +0 -1226
  13. arrowspace-0.13.2/arrowspace-rs/Cargo.toml +0 -51
  14. arrowspace-0.13.2/arrowspace-rs/LICENSE +0 -202
  15. arrowspace-0.13.2/arrowspace-rs/LICENSE_MIT +0 -21
  16. arrowspace-0.13.2/arrowspace-rs/README.md +0 -119
  17. arrowspace-0.13.2/arrowspace-rs/RESEARCH.md +0 -239
  18. arrowspace-0.13.2/arrowspace-rs/benches/base_index_bench.rs +0 -244
  19. arrowspace-0.13.2/arrowspace-rs/benches/base_laplacian_bench.rs +0 -266
  20. arrowspace-0.13.2/arrowspace-rs/benches/baselines/base_index_bench.json +0 -16
  21. arrowspace-0.13.2/arrowspace-rs/benches/baselines/base_laplacian_bench.json +0 -35
  22. arrowspace-0.13.2/arrowspace-rs/benches/index_compute_bench.rs +0 -324
  23. arrowspace-0.13.2/arrowspace-rs/examples/01_compare_cosine.rs +0 -296
  24. arrowspace-0.13.2/arrowspace-rs/examples/02_proteins_lookup.rs +0 -236
  25. arrowspace-0.13.2/arrowspace-rs/examples/common/lib.rs +0 -445
  26. arrowspace-0.13.2/arrowspace-rs/examples/compare_cosine.rs +0 -312
  27. arrowspace-0.13.2/arrowspace-rs/examples/proteins_lookup.rs +0 -233
  28. arrowspace-0.13.2/arrowspace-rs/paper.bib +0 -142
  29. arrowspace-0.13.2/arrowspace-rs/paper.md +0 -161
  30. arrowspace-0.13.2/arrowspace-rs/src/builder.rs +0 -566
  31. arrowspace-0.13.2/arrowspace-rs/src/clustering.rs +0 -507
  32. arrowspace-0.13.2/arrowspace-rs/src/core.rs +0 -1002
  33. arrowspace-0.13.2/arrowspace-rs/src/graph.rs +0 -684
  34. arrowspace-0.13.2/arrowspace-rs/src/laplacian.rs +0 -393
  35. arrowspace-0.13.2/arrowspace-rs/src/lib.rs +0 -39
  36. arrowspace-0.13.2/arrowspace-rs/src/main.rs +0 -3
  37. arrowspace-0.13.2/arrowspace-rs/src/reduction.rs +0 -196
  38. arrowspace-0.13.2/arrowspace-rs/src/sampling.rs +0 -79
  39. arrowspace-0.13.2/arrowspace-rs/src/sparsification.rs +0 -208
  40. arrowspace-0.13.2/arrowspace-rs/src/taumode.rs +0 -350
  41. arrowspace-0.13.2/arrowspace-rs/src/tests/mod.rs +0 -27
  42. arrowspace-0.13.2/arrowspace-rs/src/tests/test_arrow.rs +0 -1142
  43. arrowspace-0.13.2/arrowspace-rs/src/tests/test_builder.rs +0 -375
  44. arrowspace-0.13.2/arrowspace-rs/src/tests/test_clustering.rs +0 -667
  45. arrowspace-0.13.2/arrowspace-rs/src/tests/test_data.rs +0 -6353
  46. arrowspace-0.13.2/arrowspace-rs/src/tests/test_dimensional.rs +0 -94
  47. arrowspace-0.13.2/arrowspace-rs/src/tests/test_graph_factory.rs +0 -384
  48. arrowspace-0.13.2/arrowspace-rs/src/tests/test_helpers.rs +0 -159
  49. arrowspace-0.13.2/arrowspace-rs/src/tests/test_laplacian.rs +0 -804
  50. arrowspace-0.13.2/arrowspace-rs/src/tests/test_laplacian_unnormalised.rs +0 -683
  51. arrowspace-0.13.2/arrowspace-rs/src/tests/test_querying_proj.rs +0 -712
  52. arrowspace-0.13.2/arrowspace-rs/src/tests/test_reduction.rs +0 -330
  53. arrowspace-0.13.2/arrowspace-rs/src/tests/test_taumode.rs +0 -720
  54. arrowspace-0.13.2/pyarrowspace/tests/small_datasets/vectors_data_3000.txt +0 -3000
  55. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/.github/workflows/CI.yml +0 -0
  56. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/.gitignore +0 -0
  57. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/GRAPH_VARIABLES.md +0 -0
  58. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/LICENSE +0 -0
  59. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/NORMALISATION.md +0 -0
  60. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/README.md +0 -0
  61. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/TAUMODE.md +0 -0
  62. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/src/lib.rs +0 -0
  63. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/src/tests.rs +0 -0
  64. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/src/tests_python.rs +0 -0
  65. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/__init__.py +0 -0
  66. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/embeddings_model.py +0 -0
  67. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/requirements.txt +0 -0
  68. {arrowspace-0.13.2/arrowspace-rs/examples/common/datasets → arrowspace-0.15.0/tests/small_datasets}/vectors_data_3000.txt +0 -0
  69. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/svdecomposition.py +0 -0
  70. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/test_1_quora_questions.py +0 -0
  71. {arrowspace-0.13.2/pyarrowspace → arrowspace-0.15.0}/tests/test_3_beir.py +0 -0
@@ -0,0 +1,137 @@
1
+ # .github/workflows/publish.yml
2
+ # Publishes pyarrowspace Python package to PyPI using maturin when a release is created
3
+
4
+ name: Publish to PyPI
5
+
6
+ on:
7
+ release:
8
+ types: [published]
9
+ workflow_dispatch: # Allow manual trigger for testing
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ linux:
16
+ runs-on: ubuntu-latest
17
+ strategy:
18
+ matrix:
19
+ target: [x86_64, aarch64]
20
+ python-version: ["3.11", "3.12", "3.13"]
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - uses: actions/setup-python@v5
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+
28
+ - name: Build wheels
29
+ uses: PyO3/maturin-action@v1
30
+ with:
31
+ target: ${{ matrix.target }}
32
+ args: --release --out dist --find-interpreter
33
+ sccache: 'true'
34
+ manylinux: auto
35
+
36
+ - name: Upload wheels
37
+ uses: actions/upload-artifact@v4
38
+ with:
39
+ name: wheels-linux-${{ matrix.target }}-py${{ matrix.python-version }}
40
+ path: dist
41
+
42
+ windows:
43
+ runs-on: windows-latest
44
+ strategy:
45
+ matrix:
46
+ target: [x64]
47
+ python-version: ["3.11", "3.12", "3.13"]
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+
51
+ - uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ matrix.python-version }}
54
+ architecture: ${{ matrix.target }}
55
+
56
+ - name: Build wheels
57
+ uses: PyO3/maturin-action@v1
58
+ with:
59
+ target: ${{ matrix.target }}
60
+ args: --release --out dist --find-interpreter
61
+ sccache: 'true'
62
+
63
+ - name: Upload wheels
64
+ uses: actions/upload-artifact@v4
65
+ with:
66
+ name: wheels-windows-${{ matrix.target }}-py${{ matrix.python-version }}
67
+ path: dist
68
+
69
+ macos:
70
+ runs-on: macos-latest
71
+ strategy:
72
+ matrix:
73
+ target: [x86_64, aarch64]
74
+ python-version: ["3.11", "3.12", "3.13"]
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+
78
+ - uses: actions/setup-python@v5
79
+ with:
80
+ python-version: ${{ matrix.python-version }}
81
+
82
+ - name: Build wheels
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: ${{ matrix.target }}
86
+ args: --release --out dist --find-interpreter
87
+ sccache: 'true'
88
+
89
+ - name: Upload wheels
90
+ uses: actions/upload-artifact@v4
91
+ with:
92
+ name: wheels-macos-${{ matrix.target }}-py${{ matrix.python-version }}
93
+ path: dist
94
+
95
+ sdist:
96
+ runs-on: ubuntu-latest
97
+ steps:
98
+ - uses: actions/checkout@v4
99
+
100
+ - name: Build sdist
101
+ uses: PyO3/maturin-action@v1
102
+ with:
103
+ command: sdist
104
+ args: --out dist
105
+
106
+ - name: Upload sdist
107
+ uses: actions/upload-artifact@v4
108
+ with:
109
+ name: wheels-sdist
110
+ path: dist
111
+
112
+ release:
113
+ name: Release to PyPI
114
+ runs-on: ubuntu-latest
115
+ needs: [linux, windows, macos, sdist]
116
+ permissions:
117
+ # IMPORTANT: mandatory for trusted publishing
118
+ id-token: write
119
+ environment:
120
+ name: pypi
121
+ url: https://pypi.org/project/pyarrowspace
122
+ steps:
123
+ - name: Download all artifacts
124
+ uses: actions/download-artifact@v4
125
+ with:
126
+ path: dist
127
+ pattern: wheels-*
128
+ merge-multiple: true
129
+
130
+ - name: List distributions
131
+ run: ls -lh dist/
132
+
133
+ - name: Publish to PyPI
134
+ uses: pypa/gh-action-pypi-publish@release/v1
135
+ with:
136
+ skip-existing: true
137
+ verbose: true
@@ -92,7 +92,9 @@ dependencies = [
92
92
 
93
93
  [[package]]
94
94
  name = "arrowspace"
95
- version = "0.13.2"
95
+ version = "0.15.0"
96
+ source = "registry+https://github.com/rust-lang/crates.io-index"
97
+ checksum = "05f0d5ec06ec0ff1d04461bf07210c05a72670b43e3888842cef04567b593b50"
96
98
  dependencies = [
97
99
  "approx 0.5.1",
98
100
  "dashmap",
@@ -513,7 +515,7 @@ dependencies = [
513
515
 
514
516
  [[package]]
515
517
  name = "pyarrowspace"
516
- version = "0.13.2"
518
+ version = "0.15.0"
517
519
  dependencies = [
518
520
  "arrowspace",
519
521
  "numpy",
@@ -762,8 +764,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
762
764
 
763
765
  [[package]]
764
766
  name = "smartcore"
765
- version = "0.4.3"
766
- source = "git+https://github.com/tuned-org-uk/smartcore.git?branch=main#d6e210e6ed5babafc3d11bec617e50395c8aab71"
767
+ version = "0.4.5"
768
+ source = "registry+https://github.com/rust-lang/crates.io-index"
769
+ checksum = "9e569eba50db04f51f83ad1ad2186cc1cf88bb68de052177bda165f6cdcf8d81"
767
770
  dependencies = [
768
771
  "approx 0.5.1",
769
772
  "cfg-if",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pyarrowspace"
3
- version = "0.13.2"
3
+ version = "0.15.0"
4
4
  edition = "2024"
5
5
  readme = "README.md"
6
6
 
@@ -14,6 +14,6 @@ name = "arrowspace"
14
14
  crate-type = ["cdylib"]
15
15
 
16
16
  [dependencies]
17
- arrowspace = { path = "../arrowspace-rs"}
17
+ arrowspace = "0.15.0"
18
18
  pyo3 = { version = "*", features = ["extension-module"] }
19
19
  numpy = "0.19"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arrowspace
3
- Version: 0.13.2
3
+ Version: 0.15.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -13,4 +13,3 @@ classifiers = [
13
13
  dynamic = ["version"]
14
14
  [tool.maturin]
15
15
  features = ["pyo3/extension-module"]
16
- manifest-path = "pyarrowspace/Cargo.toml"
@@ -24,6 +24,7 @@ aspace, gl = ArrowSpaceBuilder.build(graph_params, items)
24
24
  query1 = np.array(items[2] * 1.05, dtype=np.float64)
25
25
  hits = aspace.search(query1, gl, 1.0) # list[(idx, score)]
26
26
 
27
+
27
28
  print(hits)
28
29
  assert(len(hits) == 3)
29
30
  assert(hits[0][0] == 2)
@@ -37,8 +38,8 @@ hits = aspace.search(query2, gl, 0.9) # list[(idx, score)]
37
38
  print(hits)
38
39
  assert(len(hits) == 3)
39
40
  assert(hits[0][0] == 1)
40
- assert(hits[1][0] == 4)
41
- assert(hits[2][0] == 2)
41
+ assert(hits[1][0] == 2)
42
+ assert(hits[2][0] == 0)
42
43
 
43
44
  # Search comparable items (defaults: k = nitems, alpha = 0.6, beta = 0.4)
44
45
  query3 = np.array(items[2] * 1.05, dtype=np.float64)
@@ -47,8 +48,8 @@ hits = aspace.search(query3, gl, 0.6) # list[(idx, score)]
47
48
  print(hits)
48
49
  assert(len(hits) == 3)
49
50
  assert(hits[0][0] == 1)
50
- assert(hits[1][0] == 4)
51
- assert(hits[2][0] == 0)
51
+ assert(hits[1][0] == 3)
52
+ assert(hits[2][0] == 2)
52
53
 
53
54
  query4 = np.array(items[2] * 1.05, dtype=np.float64)
54
55
  hits = aspace.search(query4, gl, 0.55) # list[(idx, score)]
@@ -56,5 +57,5 @@ hits = aspace.search(query4, gl, 0.55) # list[(idx, score)]
56
57
  print(hits)
57
58
  assert(len(hits) == 3)
58
59
  assert(hits[0][0] == 1)
59
- assert(hits[1][0] == 4)
60
- assert(hits[2][0] == 0)
60
+ assert(hits[1][0] == 3)
61
+ assert(hits[2][0] == 2)
@@ -20,8 +20,8 @@ from arrowspace import ArrowSpaceBuilder, set_debug
20
20
 
21
21
  set_debug(True) # optional: Rust-side debug prints to stderr
22
22
 
23
- START_YEAR = 2020
24
- END_YEAR = 2020
23
+ START_YEAR = 1999
24
+ END_YEAR = 1999
25
25
 
26
26
  def iter_cve_json(root_dir, start=START_YEAR, end=END_YEAR):
27
27
  for path in glob.glob(os.path.join(root_dir, "**", "*.json"), recursive=True):
@@ -1,2 +0,0 @@
1
- /target
2
- TODOs.md
@@ -1,26 +0,0 @@
1
- cff-version: "1.2.0"
2
- authors:
3
- - family-names: Moriondo
4
- given-names: Lorenzo
5
- orcid: "https://orcid.org/0000-0002-8804-2963"
6
- doi: 10.5281/zenodo.17213264
7
- message: If you use this software, please cite our article in the
8
- Journal of Open Source Software.
9
- preferred-citation:
10
- authors:
11
- - family-names: Moriondo
12
- given-names: Lorenzo
13
- orcid: "https://orcid.org/0000-0002-8804-2963"
14
- date-published: 2025-09-27
15
- doi: 10.21105/joss.09002
16
- issn: 2475-9066
17
- issue: 113
18
- journal: Journal of Open Source Software
19
- publisher:
20
- name: Open Journals
21
- start: 9002
22
- title: "ArrowSpace: introducing Spectral Indexing for vector search"
23
- type: article
24
- url: "https://joss.theoj.org/papers/10.21105/joss.09002"
25
- volume: 10
26
- title: "ArrowSpace: introducing Spectral Indexing for vector search"
@@ -1,22 +0,0 @@
1
- # Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
-
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6
-
7
- Examples of unacceptable behavior by participants include:
8
-
9
- * The use of sexualized language or imagery
10
- * Personal attacks
11
- * Trolling or insulting/derogatory comments
12
- * Public or private harassment
13
- * Publishing other's private information, such as physical or electronic addresses, without explicit permission
14
- * Other unethical or unprofessional conduct.
15
-
16
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17
-
18
- This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
19
-
20
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
21
-
22
- This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
@@ -1,44 +0,0 @@
1
- # **Contributing**
2
-
3
- When contributing to this repository, please first discuss the change you wish to make via issue,
4
- email, or any other method with the owners of this repository before making a change.
5
-
6
- Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.
7
-
8
- ## Pull Request Process
9
-
10
- 1. Open a PR following the template (erase the part of the template you don't need).
11
- 2. Pull Request can be merged in once you have the sign-off of a code owner, or if you do not have permission to do that you may request the reviewer to merge it for you.
12
-
13
- ### generic guidelines
14
- Take a look to the conventions established by existing code:
15
- * Every module should come with some reference to scientific literature that allows relating the code to research. Use the `//!` comments at the top of the module to tell readers about the basics of the procedure you are implementing.
16
- * Every module should provide a Rust doctest, a brief test embedded with the documentation that explains how to use the procedure implemented.
17
- * Run `cargo doc --no-deps --open` and read the generated documentation in the browser to be sure that your changes reflects in the documentation and new code is documented.
18
-
19
- ## Issue Report Process
20
-
21
- 1. Go to the project's issues.
22
- 2. Select the template that better fits your issue.
23
- 3. Read carefully the instructions and write within the template guidelines.
24
- 4. Submit it and wait for support.
25
-
26
- ## Reviewing process
27
-
28
- 1. After a PR is opened maintainers are notified
29
- 2. Probably changes will be required to comply with the workflow, these commands are run automatically and all tests shall pass:
30
- * **Formatting**: run `rustfmt src/*.rs` to apply automatic formatting
31
- * **Linting**: `clippy` is used with command `cargo clippy --all-features -- -Drust-2018-idioms -Dwarnings`
32
- * **Testing**: multiple test pipelines are run for different targets
33
- 3. When everything is OK and the PR is accepted, code is merged.
34
-
35
-
36
- ## Contribution Best Practices
37
-
38
- * Read this [how-to about Github workflow here](https://guides.github.com/introduction/flow/) if you are not familiar with.
39
-
40
- * Read this [how-to about writing a PR](https://github.com/blog/1943-how-to-write-the-perfect-pull-request) and this [other how-to about writing a issue](https://wiredcraft.com/blog/how-we-write-our-github-issues/)
41
-
42
- * **read history**: search past open or closed issues for your problem before opening a new issue.
43
-
44
- * **testing**: everything should work and be tested as defined in the workflow. If any is failing for non-related reasons, annotate the test failure in the PR comment.