mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 01:49:13 +00:00
chore: dependencies
This commit is contained in:
parent
dd64959604
commit
a38e8ce9be
7 changed files with 891 additions and 713 deletions
1538
Cargo.lock
generated
1538
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
24
Cargo.toml
24
Cargo.toml
|
@ -8,21 +8,17 @@ license = "MIT OR Apache-2.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
surrealdb = { version = "2.2.1", features = ["protocol-http", "kv-mem"] }
|
surrealdb = { version = "2.3.7", features = ["protocol-http", "kv-mem"] }
|
||||||
tokio = { version = "1.44", features = ["fs", "time", "sync"] }
|
tokio = { version = "1.47", features = ["fs", "time", "sync"] }
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
wikidata = "1.1"
|
wikidata = "1.1"
|
||||||
bzip2 = { version = "0.4", features = ["tokio"] }
|
bzip2 = { version = "0.6" }
|
||||||
indicatif = "0.17"
|
indicatif = "0.18"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
backon = { version = "1.4", features = ["tokio-sleep"] }
|
backon = { version = "1.5", features = ["tokio-sleep"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rstest = "0.22"
|
rstest = "0.26"
|
||||||
surrealdb = { version = "2.2.1", features = ["kv-mem"] }
|
surrealdb = { version = "2.3.7", features = ["kv-mem"] }
|
||||||
criterion = { version = "0.5", features = ["async_tokio"] }
|
criterion = { version = "0.7", features = ["async_tokio"] }
|
||||||
pprof = { version = "0.13", features = ["criterion", "protobuf-codec"] }
|
pprof = { version = "0.15", features = ["criterion", "protobuf-codec"] }
|
||||||
|
|
||||||
[[bench]]
|
|
||||||
name = "bench"
|
|
||||||
harness = false
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
surrealdb:
|
surrealdb:
|
||||||
container_name: surrealdb
|
container_name: surrealdb
|
||||||
image: surrealdb/surrealdb:v2.0.2
|
image: surrealdb/surrealdb:v2.3.7
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
entrypoint:
|
entrypoint:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
surrealdb:
|
surrealdb:
|
||||||
container_name: surrealdb
|
container_name: surrealdb
|
||||||
image: surrealdb/surrealdb:v2.0.2
|
image: surrealdb/surrealdb:v2.3.7
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
entrypoint:
|
entrypoint:
|
||||||
|
|
30
flake.lock
generated
30
flake.lock
generated
|
@ -3,11 +3,11 @@
|
||||||
"advisory-db": {
|
"advisory-db": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741826510,
|
"lastModified": 1753275806,
|
||||||
"narHash": "sha256-VPfsy7Iymk/Gs/sRgAiy5vkZmnJb1r9GmuF46/aiXNg=",
|
"narHash": "sha256-E+Cu/AFVGwoQo4KPgcWmFS9zU7fJgXoK0o25EP3j48g=",
|
||||||
"owner": "rustsec",
|
"owner": "rustsec",
|
||||||
"repo": "advisory-db",
|
"repo": "advisory-db",
|
||||||
"rev": "825bd26e5e14f8906f9314be1ba6734a753341d1",
|
"rev": "c62e71ad8c5256ffa3cafbb1a8c687db60869e98",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -18,11 +18,11 @@
|
||||||
},
|
},
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742394900,
|
"lastModified": 1754269165,
|
||||||
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
|
"narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
|
"rev": "444e81206df3f7d92780680e45858e31d2f07a08",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -39,11 +39,11 @@
|
||||||
"rust-analyzer-src": "rust-analyzer-src"
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742452566,
|
"lastModified": 1754376329,
|
||||||
"narHash": "sha256-sVuLDQ2UIWfXUBbctzrZrXM2X05YjX08K7XHMztt36E=",
|
"narHash": "sha256-Uz90O6qpmXQoNV57bf78yNd+nTxOoV5sjF1MibSdqWg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "7d9ba794daf5e8cc7ee728859bc688d8e26d5f06",
|
"rev": "ee7cae7d4cd68f7f2e78493a1f62212640db223c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -72,11 +72,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742272065,
|
"lastModified": 1754278406,
|
||||||
"narHash": "sha256-ud8vcSzJsZ/CK+r8/v0lyf4yUntVmDq6Z0A41ODfWbE=",
|
"narHash": "sha256-jvIQTMN5EzoOP5RaGztpVese8a3wqy0M/h6tNzycW28=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3549532663732bfd89993204d40543e9edaec4f2",
|
"rev": "6a489c9482ca676ce23c0bcd7f2e1795383325fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -98,11 +98,11 @@
|
||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742296961,
|
"lastModified": 1754320527,
|
||||||
"narHash": "sha256-gCpvEQOrugHWLimD1wTFOJHagnSEP6VYBDspq96Idu0=",
|
"narHash": "sha256-5/EHPlvDFb1MPVcnUwpAcc9sHejhDhAj4uloUU4rthk=",
|
||||||
"owner": "rust-lang",
|
"owner": "rust-lang",
|
||||||
"repo": "rust-analyzer",
|
"repo": "rust-analyzer",
|
||||||
"rev": "15d87419f1a123d8f888d608129c3ce3ff8f13d4",
|
"rev": "978393bae86212f867e0c43872989e1658f7690f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -3,7 +3,7 @@ use backon::Retryable;
|
||||||
use core::panic;
|
use core::panic;
|
||||||
use futures::future::join_all;
|
use futures::future::join_all;
|
||||||
use indicatif::ProgressBar;
|
use indicatif::ProgressBar;
|
||||||
use rand::{Rng, distributions::Alphanumeric};
|
use rand::{Rng, distr::Alphanumeric};
|
||||||
use serde_json::{Value, from_str};
|
use serde_json::{Value, from_str};
|
||||||
use std::{env, io::BufRead};
|
use std::{env, io::BufRead};
|
||||||
use surrealdb::{Connection, Surreal};
|
use surrealdb::{Connection, Surreal};
|
||||||
|
@ -177,13 +177,13 @@ impl CreateVersion {
|
||||||
let filter = tokio::fs::read_to_string(get_filter_path().await).await?;
|
let filter = tokio::fs::read_to_string(get_filter_path().await).await?;
|
||||||
db_mem.query(filter).await?;
|
db_mem.query(filter).await?;
|
||||||
|
|
||||||
let file_name: String = rand::thread_rng()
|
let file_name: String = rand::rng()
|
||||||
.sample_iter(&Alphanumeric)
|
.sample_iter(&Alphanumeric)
|
||||||
.take(30)
|
.take(30)
|
||||||
.map(char::from)
|
.map(char::from)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let file_path = format!("data/temp/{}.surql", file_name);
|
let file_path = format!("data/temp/{file_name}.surql");
|
||||||
|
|
||||||
tokio::fs::create_dir_all("data/temp").await?;
|
tokio::fs::create_dir_all("data/temp").await?;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ async fn inti_db() -> Result<Surreal<Db>, Error> {
|
||||||
async fn init_reader(file_format: &str, file_name: &str) -> Box<dyn BufRead> {
|
async fn init_reader(file_format: &str, file_name: &str) -> Box<dyn BufRead> {
|
||||||
File_Format::new(file_format)
|
File_Format::new(file_format)
|
||||||
.await
|
.await
|
||||||
.reader(&format!("./tests/data/{}.{}", file_name, file_format))
|
.reader(&format!("./tests/data/{file_name}.{file_format}"))
|
||||||
.await
|
.await
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue