Skip to content

Commit 3e9d00c

Browse files
Sidhant29pdavies011010walliesdependabot[bot]step-security-bot
authored
Tantivy-0.19.2 updates (quickwit-oss#56)
* Tantivy 0.19.2 (quickwit-oss#67) * Adding __init__.py file to the tantivy folder to make maturin happy Add Cargo.lock to the repo Set the git-fetch-with-cli cargo flag so that we can override fetch settings Renaming .cargo/config to .cargo/config.toml Adding github-quiq-sh cargo registry Point dependencies at our github-quiq-sh registry Trying to resolve this build issue, pointing pyo3-build-config at our github-quiq-sh registry SER-21487: Enable support for all standard Tantivy languages plus Chinese + Japanese in tantivy-py SER-21487: Use uname rather than UNAME in the Makefile SER-21487: Fix document date handling SER-23013: Upgrade Tantivy and other dependencies * Upgrade to Tantivy 0.19.1 * Apply rustfmt and fix bug when fast option = None * Upgrade to tantivy-0.19.2 * Standardize around using 'cargo fmt' rather than 'rustfmt' * Reverting to old style dependencies * Linting with clippy * Switching out hashmap for defining tokenizers for an array, and adding test for Spanish indexing * Use cargo fmt instead of rustfmt on the Lint ci step * Add python release build * workflow dispatch * simple * add release * fix publish pipeline * update maturin args * test * maturin config * build * maturin * build(deps): bump step-security/harden-runner from 1.4.4 to 2.0.0 Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 1.4.4 to 2.0.0. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@74b568e...ebacdc2) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump actions/checkout Bumps [actions/checkout](https://github.com/actions/checkout) from d171c3b028d844f2bf14e9fdec0c58114451e4bf to 61b9e3751b92087fd0b06925ba6dd6314e06f089. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@d171c3b...61b9e37) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump alexellis/upload-assets from 0.2.2 to 0.4.0 Bumps [alexellis/upload-assets](https://github.com/alexellis/upload-assets) from 0.2.2 to 0.4.0. - [Release notes](https://github.com/alexellis/upload-assets/releases) - [Commits](alexellis/upload-assets@eaab147...259de51) --- updated-dependencies: - dependency-name: alexellis/upload-assets dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump messense/maturin-action from 1.28.3 to 1.34.0 Bumps [messense/maturin-action](https://github.com/messense/maturin-action) from 1.28.3 to 1.34.0. - [Release notes](https://github.com/messense/maturin-action/releases) - [Commits](PyO3/maturin-action@20111a7...7208c29) --- updated-dependencies: - dependency-name: messense/maturin-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump actions-rs/toolchain Bumps [actions-rs/toolchain](https://github.com/actions-rs/toolchain) from 63eb9591781c46a70274cb3ebdf190fce92702e8 to 16499b5e05bf2e26879000db0c1d13f7e13fa3af. - [Release notes](https://github.com/actions-rs/toolchain/releases) - [Changelog](https://github.com/actions-rs/toolchain/blob/master/CHANGELOG.md) - [Commits](actions-rs/toolchain@63eb959...16499b5) --- updated-dependencies: - dependency-name: actions-rs/toolchain dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * testing * Update publish.yaml * Update publish.yaml * Update publish.yaml * build(deps): bump actions/upload-artifact from 3.1.0 to 3.1.2 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@3cea537...0b7f8ab) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump Swatinem/rust-cache from 2.0.0 to 2.2.0 Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache) from 2.0.0 to 2.2.0. - [Release notes](https://github.com/Swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](Swatinem/rust-cache@6720f05...359a70e) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump messense/maturin-action from 1.34.0 to 1.35.0 Bumps [messense/maturin-action](https://github.com/messense/maturin-action) from 1.34.0 to 1.35.0. - [Release notes](https://github.com/messense/maturin-action/releases) - [Commits](PyO3/maturin-action@7208c29...ac0a1ec) --- updated-dependencies: - dependency-name: messense/maturin-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump actions/setup-python from 4.2.0 to 4.5.0 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.2.0 to 4.5.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v4.2.0...d27e3f3) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump step-security/harden-runner from 2.0.0 to 2.1.0 Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@ebacdc2...18bf8ad) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Added float fields to schema with tests (quickwit-oss#36) * Added float fields to schema with tests * Fixed typo * [StepSecurity] Apply security best practices (quickwit-oss#38) Signed-off-by: StepSecurity Bot <[email protected]> Signed-off-by: StepSecurity Bot <[email protected]> * Harden CI (quickwit-oss#39) * Harden the egress and add dependabot cargo * delete file * harden codeql * build(deps): bump messense/maturin-action from 1.35.0 to 1.35.2 (quickwit-oss#40) Bumps [messense/maturin-action](https://github.com/messense/maturin-action) from 1.35.0 to 1.35.2. - [Release notes](https://github.com/messense/maturin-action/releases) - [Commits](PyO3/maturin-action@ac0a1ec...7559b9d) --- updated-dependencies: - dependency-name: messense/maturin-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github/codeql-action from 2.1.39 to 2.2.1 (quickwit-oss#41) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.39 to 2.2.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@a34ca99...3ebbd71) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: create custom kapiche tokenizer (quickwit-oss#42) * Added a custom Kapiche tokenizer that is inline with the current Tokenizer in Kapiche. * Lint fixes * build(deps): bump messense/maturin-action from 1.35.2 to 1.36.0 (quickwit-oss#47) Bumps [messense/maturin-action](https://github.com/messense/maturin-action) from 1.35.2 to 1.36.0. - [Release notes](https://github.com/messense/maturin-action/releases) - [Commits](PyO3/maturin-action@7559b9d...7c85798) --- updated-dependencies: - dependency-name: messense/maturin-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Tantivy_0.19.1_upgrade (quickwit-oss#48) * Adding __init__.py file to the tantivy folder to make maturin happy Add Cargo.lock to the repo Set the git-fetch-with-cli cargo flag so that we can override fetch settings Renaming .cargo/config to .cargo/config.toml Adding github-quiq-sh cargo registry Point dependencies at our github-quiq-sh registry Trying to resolve this build issue, pointing pyo3-build-config at our github-quiq-sh registry SER-21487: Enable support for all standard Tantivy languages plus Chinese + Japanese in tantivy-py SER-21487: Use uname rather than UNAME in the Makefile SER-21487: Fix document date handling SER-23013: Upgrade Tantivy and other dependencies * Upgrade to Tantivy 0.19.1 * Added changes and fixed issues * Formatting fixes --------- Co-authored-by: Phill Mell-Davies <[email protected]> * build(deps): bump pyo3-build-config from 0.18.0 to 0.18.1 (quickwit-oss#49) Bumps [pyo3-build-config](https://github.com/pyo3/pyo3) from 0.18.0 to 0.18.1. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](PyO3/pyo3@v0.18.0...v0.18.1) --- updated-dependencies: - dependency-name: pyo3-build-config dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump tantivy from 0.19.1 to 0.19.2 (quickwit-oss#53) Bumps [tantivy](https://github.com/quickwit-oss/tantivy) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/quickwit-oss/tantivy/releases) - [Changelog](https://github.com/quickwit-oss/tantivy/blob/main/CHANGELOG.md) - [Commits](quickwit-oss/tantivy@0.19.1...0.19.2) --- updated-dependencies: - dependency-name: tantivy dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github/codeql-action from 2.2.1 to 2.2.4 (quickwit-oss#50) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.1 to 2.2.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@3ebbd71...17573ee) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump serde_json from 1.0.92 to 1.0.93 (quickwit-oss#51) Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.92 to 1.0.93. - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](serde-rs/json@v1.0.92...v1.0.93) --- updated-dependencies: - dependency-name: serde_json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update Cargo.lock * Update Makefile --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: Phill Mell-Davies <[email protected]> Co-authored-by: Cam Parry <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cameron <[email protected]> Co-authored-by: StepSecurity Bot <[email protected]> Co-authored-by: Phill Mell-Davies <[email protected]>
1 parent 36edf27 commit 3e9d00c

File tree

11 files changed

+168
-101
lines changed

11 files changed

+168
-101
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
components: rustfmt
3232

3333
- name: Check Formatting
34-
run: rustfmt --check src/*.rs
34+
run: cargo fmt --check
3535

3636
Test:
3737
strategy:

Cargo.lock

Lines changed: 23 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tantivy"
3-
version = "0.19.1"
3+
version = "0.19.2"
44
readme = "README.md"
55
authors = ["Damir Jelić <[email protected]>"]
66
edition = "2018"
@@ -22,4 +22,4 @@ serde_json = { version = "1.0.93" }
2222

2323
[dependencies.pyo3]
2424
version = "0.18.0"
25-
features = ["extension-module"]
25+
features = ["extension-module"]

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ endif
66

77
source_files := $(wildcard src/*.rs)
88

9-
all: build
9+
all: format lint build test
1010

1111
PHONY: test format
1212

13+
lint:
14+
cargo clippy
15+
1316
test: tantivy/tantivy.$(EXT)
1417
python3 -m pytest
1518

1619
format:
17-
rustfmt src/*.rs
20+
cargo fmt
1821

1922
build:
2023
maturin build --interpreter python3.7 python3.8 python3.9 python3.10 python3.11

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
max_width = 80
1+
max_width = 80

src/document.rs

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,26 @@ fn value_to_py(py: Python, value: &Value) -> PyResult<PyObject> {
5656
// TODO implement me
5757
unimplemented!();
5858
}
59-
Value::Date(d) => PyDateTime::new(
60-
py,
61-
d.into_utc().year(),
62-
d.into_utc().month() as u8,
63-
d.into_utc().day() as u8,
64-
d.into_utc().hour() as u8,
65-
d.into_utc().minute() as u8,
66-
d.into_utc().second() as u8,
67-
d.into_utc().microsecond() as u32,
68-
None,
69-
)?
70-
.into_py(py),
59+
Value::Date(d) => {
60+
let utc = d.into_utc();
61+
PyDateTime::new(
62+
py,
63+
utc.year(),
64+
utc.month() as u8,
65+
utc.day(),
66+
utc.hour(),
67+
utc.minute(),
68+
utc.second(),
69+
utc.microsecond(),
70+
None,
71+
)?
72+
.into_py(py)
73+
}
7174
Value::Facet(f) => Facet { inner: f.clone() }.into_py(py),
7275
Value::JsonObject(json_object) => {
7376
let inner: HashMap<_, _> = json_object
7477
.iter()
75-
.map(|(k, v)| (k, value_to_object(&v, py)))
78+
.map(|(k, v)| (k, value_to_object(v, py)))
7679
.collect();
7780
inner.to_object(py)
7881
}
@@ -84,11 +87,11 @@ fn value_to_py(py: Python, value: &Value) -> PyResult<PyObject> {
8487
fn value_to_string(value: &Value) -> String {
8588
match value {
8689
Value::Str(text) => text.clone(),
87-
Value::U64(num) => format!("{}", num),
88-
Value::I64(num) => format!("{}", num),
89-
Value::F64(num) => format!("{}", num),
90-
Value::Bytes(bytes) => format!("{:?}", bytes),
91-
Value::Date(d) => format!("{:?}", d),
90+
Value::U64(num) => format!("{num}"),
91+
Value::I64(num) => format!("{num}"),
92+
Value::F64(num) => format!("{num}"),
93+
Value::Bytes(bytes) => format!("{bytes:?}"),
94+
Value::Date(d) => format!("{d:?}"),
9295
Value::Facet(facet) => facet.to_string(),
9396
Value::PreTokStr(_pretok) => {
9497
// TODO implement me
@@ -97,7 +100,7 @@ fn value_to_string(value: &Value) -> String {
97100
Value::JsonObject(json_object) => {
98101
serde_json::to_string(&json_object).unwrap()
99102
}
100-
Value::Bool(b) => format!("{}", b),
103+
Value::Bool(b) => format!("{b}"),
101104
Value::IpAddr(i) => format!("{}", *i),
102105
}
103106
}
@@ -145,10 +148,10 @@ impl fmt::Debug for Document {
145148
.chars()
146149
.take(10)
147150
.collect();
148-
format!("{}=[{}]", field_name, values_str)
151+
format!("{field_name}=[{values_str}]")
149152
})
150153
.join(",");
151-
write!(f, "Document({})", doc_str)
154+
write!(f, "Document({doc_str})")
152155
}
153156
}
154157

@@ -189,9 +192,9 @@ pub(crate) fn extract_value(any: &PyAny) -> PyResult<Value> {
189192
)));
190193
}
191194
if let Ok(facet) = any.extract::<Facet>() {
192-
return Ok(Value::Facet(facet.inner.clone()));
195+
return Ok(Value::Facet(facet.inner));
193196
}
194-
Err(to_pyerr(format!("Value unsupported {:?}", any)))
197+
Err(to_pyerr(format!("Value unsupported {any:?}")))
195198
}
196199

197200
fn extract_value_single_or_list(any: &PyAny) -> PyResult<Vec<Value>> {
@@ -404,13 +407,13 @@ impl Document {
404407
}
405408

406409
fn __getitem__(&self, field_name: &str) -> PyResult<Vec<PyObject>> {
407-
return Python::with_gil(|py| -> PyResult<Vec<PyObject>> {
410+
Python::with_gil(|py| -> PyResult<Vec<PyObject>> {
408411
self.get_all(py, field_name)
409-
});
412+
})
410413
}
411414

412415
fn __repr__(&self) -> PyResult<String> {
413-
Ok(format!("{:?}", self))
416+
Ok(format!("{self:?}"))
414417
}
415418
}
416419

src/index.rs

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,17 @@ impl IndexWriter {
133133
Value::Facet(facet) => Term::from_facet(field, &facet),
134134
Value::Bytes(_) => {
135135
return Err(exceptions::PyValueError::new_err(format!(
136-
"Field `{}` is bytes type not deletable.",
137-
field_name
136+
"Field `{field_name}` is bytes type not deletable."
138137
)))
139138
}
140139
Value::PreTokStr(_pretok) => {
141140
return Err(exceptions::PyValueError::new_err(format!(
142-
"Field `{}` is pretokenized. This is not authorized for delete.",
143-
field_name
141+
"Field `{field_name}` is pretokenized. This is not authorized for delete."
144142
)))
145143
}
146144
Value::JsonObject(_) => {
147145
return Err(exceptions::PyValueError::new_err(format!(
148-
"Field `{}` is json object type not deletable.",
149-
field_name
146+
"Field `{field_name}` is json object type not deletable."
150147
)))
151148
},
152149
Value::Bool(b) => Term::from_field_bool(field, b),
@@ -365,16 +362,14 @@ impl Index {
365362
if !field_entry.is_indexed() {
366363
return Err(exceptions::PyValueError::new_err(
367364
format!(
368-
"Field `{}` is not set as indexed in the schema.",
369-
default_field_name
365+
"Field `{default_field_name}` is not set as indexed in the schema."
370366
),
371367
));
372368
}
373369
default_fields.push(field);
374370
} else {
375371
return Err(exceptions::PyValueError::new_err(format!(
376-
"Field `{}` is not defined in the schema.",
377-
default_field_name
372+
"Field `{default_field_name}` is not defined in the schema."
378373
)));
379374
}
380375
}
@@ -395,24 +390,25 @@ impl Index {
395390

396391
impl Index {
397392
fn register_custom_text_analyzers(index: &tv::Index) {
398-
let mut analyzers = HashMap::new();
399-
analyzers.insert("ar_stem", Language::Arabic);
400-
analyzers.insert("da_stem", Language::Danish);
401-
analyzers.insert("nl_stem", Language::Dutch);
402-
analyzers.insert("fi_stem", Language::Finnish);
403-
analyzers.insert("fr_stem", Language::French);
404-
analyzers.insert("de_stem", Language::German);
405-
analyzers.insert("el_stem", Language::Greek);
406-
analyzers.insert("hu_stem", Language::Hungarian);
407-
analyzers.insert("it_stem", Language::Italian);
408-
analyzers.insert("no_stem", Language::Norwegian);
409-
analyzers.insert("pt_stem", Language::Portuguese);
410-
analyzers.insert("ro_stem", Language::Romanian);
411-
analyzers.insert("ru_stem", Language::Russian);
412-
analyzers.insert("es_stem", Language::Spanish);
413-
analyzers.insert("sv_stem", Language::Swedish);
414-
analyzers.insert("ta_stem", Language::Tamil);
415-
analyzers.insert("tr_stem", Language::Turkish);
393+
let analyzers = [
394+
("ar_stem", Language::Arabic),
395+
("da_stem", Language::Danish),
396+
("nl_stem", Language::Dutch),
397+
("fi_stem", Language::Finnish),
398+
("fr_stem", Language::French),
399+
("de_stem", Language::German),
400+
("el_stem", Language::Greek),
401+
("hu_stem", Language::Hungarian),
402+
("it_stem", Language::Italian),
403+
("no_stem", Language::Norwegian),
404+
("pt_stem", Language::Portuguese),
405+
("ro_stem", Language::Romanian),
406+
("ru_stem", Language::Russian),
407+
("es_stem", Language::Spanish),
408+
("sv_stem", Language::Swedish),
409+
("ta_stem", Language::Tamil),
410+
("tr_stem", Language::Turkish),
411+
];
416412

417413
for (name, lang) in &analyzers {
418414
let an = TextAnalyzer::from(SimpleTokenizer)

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use pyo3::{exceptions, prelude::*};
21
#[rustfmt::skip]
32
use ::tantivy as tv;
3+
use pyo3::{exceptions, prelude::*};
44

55
mod document;
66
mod facet;
@@ -90,8 +90,7 @@ pub(crate) fn get_field(
9090
) -> PyResult<tv::schema::Field> {
9191
let field = schema.get_field(field_name).ok_or_else(|| {
9292
exceptions::PyValueError::new_err(format!(
93-
"Field `{}` is not defined in the schema.",
94-
field_name
93+
"Field `{field_name}` is not defined in the schema."
9594
))
9695
})?;
9796

0 commit comments

Comments
 (0)