philoch-bib-sdk 0.3.9__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 (82) hide show
  1. philoch_bib_sdk-0.3.9/Cargo.lock +253 -0
  2. philoch_bib_sdk-0.3.9/Cargo.toml +18 -0
  3. philoch_bib_sdk-0.3.9/LICENSE +21 -0
  4. philoch_bib_sdk-0.3.9/PKG-INFO +15 -0
  5. philoch_bib_sdk-0.3.9/README.md +3 -0
  6. philoch_bib_sdk-0.3.9/docs/fuzzy-matching.md +664 -0
  7. philoch_bib_sdk-0.3.9/docs/python-style-guide.md +471 -0
  8. philoch_bib_sdk-0.3.9/docs/rust-implementation-summary.md +194 -0
  9. philoch_bib_sdk-0.3.9/docs/rust-index-building-spec.md +328 -0
  10. philoch_bib_sdk-0.3.9/docs/rust-scorer.md +104 -0
  11. philoch_bib_sdk-0.3.9/docs/streaming-output.md +198 -0
  12. philoch_bib_sdk-0.3.9/docs/todo/fuzzy-matching-enhanced-output.md +222 -0
  13. philoch_bib_sdk-0.3.9/docs/todo/merge_fuzzy_results.py +197 -0
  14. philoch_bib_sdk-0.3.9/docs/todo/rust-build-index-implementation-plan.md +438 -0
  15. philoch_bib_sdk-0.3.9/philoch_bib_sdk/__init__.py +0 -0
  16. philoch_bib_sdk-0.3.9/philoch_bib_sdk/adapters/io/__init__.py +115 -0
  17. philoch_bib_sdk-0.3.9/philoch_bib_sdk/adapters/io/csv/__init__.py +308 -0
  18. philoch_bib_sdk-0.3.9/philoch_bib_sdk/adapters/io/ods/__init__.py +145 -0
  19. philoch_bib_sdk-0.3.9/philoch_bib_sdk/adapters/plaintext/bibitem_reader.py +0 -0
  20. philoch_bib_sdk-0.3.9/philoch_bib_sdk/adapters/tabular_data/read_journal_volume_number_index.py +58 -0
  21. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/latex.py +6 -0
  22. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/author/formatter.py +34 -0
  23. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/author/parser.py +83 -0
  24. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bib_string_formatter.py +8 -0
  25. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/bibkey_formatter.py +21 -0
  26. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/bibkey_parser.py +158 -0
  27. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/date_formatter.py +37 -0
  28. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/date_parser.py +62 -0
  29. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/formatter.py +182 -0
  30. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/pages_formatter.py +13 -0
  31. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/pages_parser.py +63 -0
  32. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/bibitem/parser.py +415 -0
  33. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/journal/formatter.py +25 -0
  34. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/journal/parser.py +36 -0
  35. philoch_bib_sdk-0.3.9/philoch_bib_sdk/converters/plaintext/shared/renderable_formatter.py +25 -0
  36. philoch_bib_sdk-0.3.9/philoch_bib_sdk/interfaces/cli/__init__.py +3 -0
  37. philoch_bib_sdk-0.3.9/philoch_bib_sdk/interfaces/cli/fuzzy_matching.py +135 -0
  38. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/__init__.py +39 -0
  39. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/default_models.py +315 -0
  40. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/functions/__init__.py +31 -0
  41. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/functions/comparator.py +414 -0
  42. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/functions/fuzzy_matcher.py +796 -0
  43. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/functions/journal_article_matcher.py +44 -0
  44. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/literals.py +98 -0
  45. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/models.py +366 -0
  46. philoch_bib_sdk-0.3.9/philoch_bib_sdk/logic/models_staging.py +173 -0
  47. philoch_bib_sdk-0.3.9/philoch_bib_sdk/procedures/fuzzy_matching.py +112 -0
  48. philoch_bib_sdk-0.3.9/philoch_bib_sdk/py.typed +0 -0
  49. philoch_bib_sdk-0.3.9/philoch_bib_sdk/rust_scorer/Cargo.lock +232 -0
  50. philoch_bib_sdk-0.3.9/philoch_bib_sdk/rust_scorer/Cargo.toml +26 -0
  51. philoch_bib_sdk-0.3.9/philoch_bib_sdk/rust_scorer/pyproject.toml +15 -0
  52. philoch_bib_sdk-0.3.9/philoch_bib_sdk/rust_scorer/rust_scorer.pyi +65 -0
  53. philoch_bib_sdk-0.3.9/philoch_bib_sdk/rust_scorer/src/lib.rs +362 -0
  54. philoch_bib_sdk-0.3.9/poetry.lock +3347 -0
  55. philoch_bib_sdk-0.3.9/pyproject.toml +86 -0
  56. philoch_bib_sdk-0.3.9/run_fuzzy_matching.py +263 -0
  57. philoch_bib_sdk-0.3.9/run_fuzzy_matching_streaming.py +280 -0
  58. philoch_bib_sdk-0.3.9/scripts/format.py +28 -0
  59. philoch_bib_sdk-0.3.9/src/lib.rs +192 -0
  60. philoch_bib_sdk-0.3.9/tests/adapters/test_read_jvn_index_from_ods.py +102 -0
  61. philoch_bib_sdk-0.3.9/tests/converters/plaintext/conftest.py +212 -0
  62. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_author_formatter.py +95 -0
  63. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_author_parser.py +101 -0
  64. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_bibitem_formatter.py +146 -0
  65. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_bibitem_parser.py +658 -0
  66. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_bibkey_formatter.py +22 -0
  67. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_bibkey_parser.py +42 -0
  68. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_date_formatter.py +26 -0
  69. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_date_parser.py +48 -0
  70. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_journal_formatter.py +24 -0
  71. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_journal_parser.py +31 -0
  72. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_page_formatter.py +20 -0
  73. philoch_bib_sdk-0.3.9/tests/converters/plaintext/test_page_parser.py +42 -0
  74. philoch_bib_sdk-0.3.9/tests/logic/functions/test_comparator.py +56 -0
  75. philoch_bib_sdk-0.3.9/tests/logic/functions/test_fuzzy_matcher.py +746 -0
  76. philoch_bib_sdk-0.3.9/tests/logic/functions/test_journal_article_matcher.py +83 -0
  77. philoch_bib_sdk-0.3.9/tests/logic/test_default_models.py +37 -0
  78. philoch_bib_sdk-0.3.9/tests/logic/test_models.py +62 -0
  79. philoch_bib_sdk-0.3.9/tests/logic/test_setup.py +31 -0
  80. philoch_bib_sdk-0.3.9/tests/processing/test_bulk_operation_styles.py +126 -0
  81. philoch_bib_sdk-0.3.9/tests/shared.py +4 -0
  82. philoch_bib_sdk-0.3.9/tests/test_tautology.py +3 -0
@@ -0,0 +1,253 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "ahash"
7
+ version = "0.8.12"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"
10
+ dependencies = [
11
+ "cfg-if",
12
+ "getrandom",
13
+ "once_cell",
14
+ "version_check",
15
+ "zerocopy",
16
+ ]
17
+
18
+ [[package]]
19
+ name = "autocfg"
20
+ version = "1.5.0"
21
+ source = "registry+https://github.com/rust-lang/crates.io-index"
22
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
23
+
24
+ [[package]]
25
+ name = "cfg-if"
26
+ version = "1.0.4"
27
+ source = "registry+https://github.com/rust-lang/crates.io-index"
28
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
29
+
30
+ [[package]]
31
+ name = "getrandom"
32
+ version = "0.3.4"
33
+ source = "registry+https://github.com/rust-lang/crates.io-index"
34
+ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
35
+ dependencies = [
36
+ "cfg-if",
37
+ "libc",
38
+ "r-efi",
39
+ "wasip2",
40
+ ]
41
+
42
+ [[package]]
43
+ name = "heck"
44
+ version = "0.5.0"
45
+ source = "registry+https://github.com/rust-lang/crates.io-index"
46
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
47
+
48
+ [[package]]
49
+ name = "indoc"
50
+ version = "2.0.7"
51
+ source = "registry+https://github.com/rust-lang/crates.io-index"
52
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
53
+ dependencies = [
54
+ "rustversion",
55
+ ]
56
+
57
+ [[package]]
58
+ name = "libc"
59
+ version = "0.2.177"
60
+ source = "registry+https://github.com/rust-lang/crates.io-index"
61
+ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
62
+
63
+ [[package]]
64
+ name = "memoffset"
65
+ version = "0.9.1"
66
+ source = "registry+https://github.com/rust-lang/crates.io-index"
67
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
68
+ dependencies = [
69
+ "autocfg",
70
+ ]
71
+
72
+ [[package]]
73
+ name = "once_cell"
74
+ version = "1.21.3"
75
+ source = "registry+https://github.com/rust-lang/crates.io-index"
76
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
77
+
78
+ [[package]]
79
+ name = "philoch_bib_sdk"
80
+ version = "0.1.6"
81
+ dependencies = [
82
+ "ahash",
83
+ "pyo3",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "portable-atomic"
88
+ version = "1.11.1"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
91
+
92
+ [[package]]
93
+ name = "proc-macro2"
94
+ version = "1.0.103"
95
+ source = "registry+https://github.com/rust-lang/crates.io-index"
96
+ checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
97
+ dependencies = [
98
+ "unicode-ident",
99
+ ]
100
+
101
+ [[package]]
102
+ name = "pyo3"
103
+ version = "0.22.6"
104
+ source = "registry+https://github.com/rust-lang/crates.io-index"
105
+ checksum = "f402062616ab18202ae8319da13fa4279883a2b8a9d9f83f20dbade813ce1884"
106
+ dependencies = [
107
+ "cfg-if",
108
+ "indoc",
109
+ "libc",
110
+ "memoffset",
111
+ "once_cell",
112
+ "portable-atomic",
113
+ "pyo3-build-config",
114
+ "pyo3-ffi",
115
+ "pyo3-macros",
116
+ "unindent",
117
+ ]
118
+
119
+ [[package]]
120
+ name = "pyo3-build-config"
121
+ version = "0.22.6"
122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
123
+ checksum = "b14b5775b5ff446dd1056212d778012cbe8a0fbffd368029fd9e25b514479c38"
124
+ dependencies = [
125
+ "once_cell",
126
+ "target-lexicon",
127
+ ]
128
+
129
+ [[package]]
130
+ name = "pyo3-ffi"
131
+ version = "0.22.6"
132
+ source = "registry+https://github.com/rust-lang/crates.io-index"
133
+ checksum = "9ab5bcf04a2cdcbb50c7d6105de943f543f9ed92af55818fd17b660390fc8636"
134
+ dependencies = [
135
+ "libc",
136
+ "pyo3-build-config",
137
+ ]
138
+
139
+ [[package]]
140
+ name = "pyo3-macros"
141
+ version = "0.22.6"
142
+ source = "registry+https://github.com/rust-lang/crates.io-index"
143
+ checksum = "0fd24d897903a9e6d80b968368a34e1525aeb719d568dba8b3d4bfa5dc67d453"
144
+ dependencies = [
145
+ "proc-macro2",
146
+ "pyo3-macros-backend",
147
+ "quote",
148
+ "syn",
149
+ ]
150
+
151
+ [[package]]
152
+ name = "pyo3-macros-backend"
153
+ version = "0.22.6"
154
+ source = "registry+https://github.com/rust-lang/crates.io-index"
155
+ checksum = "36c011a03ba1e50152b4b394b479826cad97e7a21eb52df179cd91ac411cbfbe"
156
+ dependencies = [
157
+ "heck",
158
+ "proc-macro2",
159
+ "pyo3-build-config",
160
+ "quote",
161
+ "syn",
162
+ ]
163
+
164
+ [[package]]
165
+ name = "quote"
166
+ version = "1.0.41"
167
+ source = "registry+https://github.com/rust-lang/crates.io-index"
168
+ checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
169
+ dependencies = [
170
+ "proc-macro2",
171
+ ]
172
+
173
+ [[package]]
174
+ name = "r-efi"
175
+ version = "5.3.0"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
178
+
179
+ [[package]]
180
+ name = "rustversion"
181
+ version = "1.0.22"
182
+ source = "registry+https://github.com/rust-lang/crates.io-index"
183
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
184
+
185
+ [[package]]
186
+ name = "syn"
187
+ version = "2.0.108"
188
+ source = "registry+https://github.com/rust-lang/crates.io-index"
189
+ checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
190
+ dependencies = [
191
+ "proc-macro2",
192
+ "quote",
193
+ "unicode-ident",
194
+ ]
195
+
196
+ [[package]]
197
+ name = "target-lexicon"
198
+ version = "0.12.16"
199
+ source = "registry+https://github.com/rust-lang/crates.io-index"
200
+ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
201
+
202
+ [[package]]
203
+ name = "unicode-ident"
204
+ version = "1.0.22"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
207
+
208
+ [[package]]
209
+ name = "unindent"
210
+ version = "0.2.4"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
213
+
214
+ [[package]]
215
+ name = "version_check"
216
+ version = "0.9.5"
217
+ source = "registry+https://github.com/rust-lang/crates.io-index"
218
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
219
+
220
+ [[package]]
221
+ name = "wasip2"
222
+ version = "1.0.1+wasi-0.2.4"
223
+ source = "registry+https://github.com/rust-lang/crates.io-index"
224
+ checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
225
+ dependencies = [
226
+ "wit-bindgen",
227
+ ]
228
+
229
+ [[package]]
230
+ name = "wit-bindgen"
231
+ version = "0.46.0"
232
+ source = "registry+https://github.com/rust-lang/crates.io-index"
233
+ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
234
+
235
+ [[package]]
236
+ name = "zerocopy"
237
+ version = "0.8.27"
238
+ source = "registry+https://github.com/rust-lang/crates.io-index"
239
+ checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
240
+ dependencies = [
241
+ "zerocopy-derive",
242
+ ]
243
+
244
+ [[package]]
245
+ name = "zerocopy-derive"
246
+ version = "0.8.27"
247
+ source = "registry+https://github.com/rust-lang/crates.io-index"
248
+ checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
249
+ dependencies = [
250
+ "proc-macro2",
251
+ "quote",
252
+ "syn",
253
+ ]
@@ -0,0 +1,18 @@
1
+ [package]
2
+ name = "philoch_bib_sdk"
3
+ version = "0.1.6"
4
+ edition = "2021"
5
+ readme = "README.md"
6
+
7
+ [lib]
8
+ name = "_rust"
9
+ crate-type = ["cdylib"]
10
+
11
+ [dependencies]
12
+ pyo3 = { version = "0.22", features = ["extension-module"] }
13
+ ahash = "0.8"
14
+
15
+ [profile.release]
16
+ opt-level = 3
17
+ lto = true
18
+ codegen-units = 1
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Philosophie.ch
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.
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.4
2
+ Name: philoch-bib-sdk
3
+ Version: 0.3.9
4
+ License-File: LICENSE
5
+ Summary: Standard development kit for the Philosophie Bibliography project
6
+ Author-email: Luis Alejandro Bordo García <luis.bordo@philosophie.ch>
7
+ Maintainer-email: Luis Alejandro Bordo García <tech@philosophie.ch>
8
+ License: MIT
9
+ Requires-Python: >=3.13
10
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
11
+
12
+ # Philosophie.ch Bibliography SDK
13
+
14
+ This repository contains the standard development kit for the bibliography project of the [Philosophie.ch](https://philosophie.ch) association.
15
+
@@ -0,0 +1,3 @@
1
+ # Philosophie.ch Bibliography SDK
2
+
3
+ This repository contains the standard development kit for the bibliography project of the [Philosophie.ch](https://philosophie.ch) association.