Skip to content

Commit

Permalink
Cleanup project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nwagner84 committed Jul 7, 2023
1 parent a18fbb2 commit 16bfa94
Show file tree
Hide file tree
Showing 1,068 changed files with 144 additions and 105 deletions.
73 changes: 32 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
[package]
name = "pica-toolkit"
[workspace]
resolver = "2"
default-members = ["pica-toolkit"]

members = [
"pica-lint",
"pica-matcher",
"pica-path",
"pica-record",
"pica-select",
"pica-toolkit"
]

[workspace.package]
version = "0.17.0"
authors = ["Nico Wagner <[email protected]>"]
edition = "2021"
license = "MIT OR Unlicense"
default-run = "pica"
readme = "./README.md"
keywords = ["PICA+", "code4lib"]
edition = "2021"

[dependencies]
arrow2 = { version = "0.17", features = ["io_ipc", "io_ipc_compression"] }
bstr = "1.5"
clap = { version = "4.3", features = ["cargo", "derive", "wrap_help"] }
[workspace.dependencies]
pica-matcher = { version = "0.17", path = "./pica-matcher" }
pica-path = { version = "0.17", path = "./pica-path" }
pica-record = { version = "0.17", path = "./pica-record" }
pica-select = { version = "0.17", path = "./pica-select" }

anyhow = "1.0"
arrow2 = "0.17"
bstr = "1.6"
chrono = { version = "0.4", default-features = false }
clap = "4.3"
clap_complete = "4.3"
csv = "1.2"
directories = "5.0"
flate2 = "1.0"
nom = "7.1"
quick-xml = "0.29"
rand = "0.8"
regex = "1.8"
serde = { version = "1.0", features = ["derive"] }
regex = "1.9"
serde = "1.0"
serde_json = "1.0"
strsim = "0.10"
termcolor = "1.2"
sha2 = "0.10"
thiserror = "1.0"
toml = "0.7"
unicode-normalization = "0.1"

pica-matcher = { version = "0.1", path = "pica-matcher" }
pica-path = { version = "0.2", path = "pica-path" }
pica-record = { version = "0.1", path = "pica-record" }
pica-select = { version = "0.1", path = "pica-select" }

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.0"
quickcheck = "1.0"
quickcheck_macros = "1.0"
tempfile = "3.2"
trycmd = "0.14"

[[bin]]
path = "src/main.rs"
name = "pica"

[profile.release]
codegen-units = 1
Expand All @@ -50,12 +50,3 @@ lto = true
[profile.dev]
debug = 0

[workspace]

members = [
"pica-lint",
"pica-matcher",
"pica-path",
"pica-record",
"pica-select"
]
36 changes: 19 additions & 17 deletions pica-lint/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
[package]
name = "pica-lint"
version = "0.1.0"
edition = "2021"
authors = ["Nico Wagner <[email protected]>"]
license = "MIT OR Unlicense"
authors.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true

[dependencies]
anyhow = "1.0"
bstr = "1.5"
clap = { version = "4.3", features = ["cargo", "derive", "wrap_help"] }
chrono = { version = "0.4", default-features = false, features = ["clock"] }
csv = "1.2"
flate2 = "1.0"
indicatif = "0.17"
once_cell = "1.17"
serde = { version = "1.0", features = ["derive"] }
sophia = "0.7"
toml = "0.7"
anyhow = { workspace = true }
bstr = { workspace = true }
chrono = { workspace = true, features = ["clock"] }
clap = { workspace = true, features = ["cargo", "derive", "wrap_help"] }
csv = { workspace = true }
flate2 = { workspace = true }
indicatif = { version = "0.17" }
once_cell = { version = "1.17" }
pica-matcher = { workspace = true, features = ["serde"] }
pica-path = { workspace = true, features = ["serde"] }
pica-record = { workspace = true }
serde = { workspace = true, features = ["derive"] }
sophia = { version = "0.7" }
toml = { workspace = true }

pica-matcher = { version = "0.1", path = "../pica-matcher", features = ["serde"] }
pica-path = { version = "0.2", path = "../pica-path", features = ["serde"] }
pica-record = { version = "0.1", path = "../pica-record" }
24 changes: 12 additions & 12 deletions pica-matcher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "pica-matcher"
version = "0.1.0"
license = "MIT OR Unlicense"
authors = ["Nico Wagner <[email protected]>"]
include = ["src/**/*"]
edition = "2021"
version.workspace = true
authors.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true

[dependencies]
bstr = "1.5"
nom = "7.1"
regex = "1.8"
bstr = { workspace = true }
nom = { workspace = true }
pica-record = { workspace = true }
regex = { workspace = true }
serde = { workspace = true, optional = true }
strsim = "0.10"
thiserror = "1.0"
serde = { version = "1.0", optional = true }

pica-record = { version = "0.1", path = "../pica-record" }
thiserror = { workspace = true }

[dev-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion pica-matcher/tests/record_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fn ada_lovelace() -> &'static [u8] {
DATA.get_or_init(|| {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let path = Path::new(&manifest_dir)
.join("../tests/data/119232022.dat");
.join("../pica-toolkit/tests/data/119232022.dat");
eprintln!("{:?}", path);
fs::read_to_string(&path).unwrap().as_bytes().to_vec()
})
Expand Down
23 changes: 12 additions & 11 deletions pica-path/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[package]
name = "pica-path"
version = "0.2.0"
edition = "2021"
authors = ["Nico Wagner <[email protected]>"]
license = "MIT OR Unlicense"
version.workspace = true
authors.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true

[dependencies]
bstr = "1.5"
nom = "7.1"
thiserror = "1.0"
serde = { version = "1.0", optional = true }

pica-matcher = { version = "0.1", path = "../pica-matcher" }
pica-record = { version = "0.1", path = "../pica-record" }
bstr = { workspace = true }
nom = { workspace = true }
pica-matcher = { workspace = true }
pica-record = { workspace = true }
serde = { workspace = true, optional = true }
thiserror = { workspace = true }

[dev-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion pica-path/tests/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn ada_lovelace() -> &'static [u8] {
DATA.get_or_init(|| {
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let path = Path::new(&manifest_dir)
.join("../tests/data/119232022.dat");
.join("../pica-toolkit/tests/data/119232022.dat");
eprintln!("{:?}", path);
fs::read_to_string(&path).unwrap().as_bytes().to_vec()
})
Expand Down
21 changes: 11 additions & 10 deletions pica-record/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
[package]
name = "pica-record"
version = "0.1.0"
license = "MIT OR Unlicense"
authors = ["Nico Wagner <[email protected]>"]
include = ["src/**/*"]
edition = "2021"
version.workspace = true
authors.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true

[dependencies]
bstr = "1.5"
flate2 = "1.0"
nom = "7.1"
sha2 = "0.10"
thiserror = "1.0"
bstr = { workspace = true }
flate2 = { workspace = true }
nom = { workspace = true }
sha2 = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
anyhow = "1.0"
Expand Down
25 changes: 13 additions & 12 deletions pica-select/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[package]
name = "pica-select"
version = "0.1.0"
authors = ["Nico Wagner <[email protected]>"]
edition = "2021"
license = "MIT OR Unlicense"
version.workspace = true
authors.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true

[dependencies]
thiserror = "1.0"
nom = "7.1"

pica-matcher = { version = "0.1", path = "../pica-matcher" }
pica-path = { version = "0.2", path = "../pica-path" }
pica-record = { version = "0.1", path = "../pica-record" }
nom = { workspace = true }
pica-matcher = { workspace = true }
pica-path = { workspace = true }
pica-record = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
bstr = "1.5"
bstr = { workspace = true }
nom-test-helpers = "6.1"
anyhow = "1.0"
anyhow = { workspace = true }
43 changes: 43 additions & 0 deletions pica-toolkit/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[package]
name = "pica-toolkit"
version.workspace = true
authors.workspace = true
license.workspace = true
readme.workspace = true
keywords.workspace = true
edition.workspace = true

[dependencies]
arrow2 = { workspace = true, features = ["io_ipc", "io_ipc_compression"] }
bstr = { workspace = true }
clap = { workspace = true, features = ["cargo", "derive", "wrap_help"] }
clap_complete = { workspace = true }
csv = { workspace = true }
directories = { version = "5.0" }
flate2 = { workspace = true }
nom = { workspace = true }
pica-matcher = { workspace = true }
pica-path = { workspace = true }
pica-record = { workspace = true }
pica-select = { workspace = true }
quick-xml = { version = "0.29" }
rand = { workspace = true }
regex = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
strsim = { version = "0.10" }
termcolor = { version = "1.2" }
toml = { workspace = true }
unicode-normalization = { version = "0.1" }

[dev-dependencies]
assert_cmd = "2.0"
predicates = "3.0"
quickcheck = "1.0"
quickcheck_macros = "1.0"
tempfile = "3.2"
trycmd = "0.14"

[[bin]]
path = "src/main.rs"
name = "pica"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 16bfa94

Please sign in to comment.