Skip to content

Commit

Permalink
Merge pull request rudof-project#48 from media-io/feat/impl_shacl
Browse files Browse the repository at this point in the history
Implement SHACL to RDF conversion
  • Loading branch information
labra authored Jun 12, 2024
2 parents 5159ed5 + 9300de7 commit 48adc54
Show file tree
Hide file tree
Showing 56 changed files with 932 additions and 603 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Clippy check
uses: actions-rs/cargo@v1
continue-on-error: true
with:
command: clippy
args: --all-targets --all-features --workspace -- -D warnings
Expand Down
21 changes: 12 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ name = "shapes-rs"
version = "0.0.11"
description = "RDF Data shapes implementation in Rust"
license = "GPL-3.0-or-later"
authors = [
"Jose Emilio Labra Gayo",
"Ángel Iglesias Préstamo <[email protected]>",
authors = [
"Jose Emilio Labra Gayo <[email protected]>",
"Ángel Iglesias Préstamo <[email protected]>",
"Marc-Antoine Arnaud <[email protected]>",
]
repository = "https://github.com/weso/shapes-rs"
homepage = "https://www.weso.es/shapes-rs/"


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

[workspace]
members = [
Expand Down Expand Up @@ -47,15 +48,17 @@ exclude = [
# version = "0.0.6"
edition = "2021"
license = "MIT OR Apache-2.0"
authors = ["Jose Emilio Labra Gayo <[email protected]>",
"Ángel Iglesias Préstamo <[email protected]>",
authors = [
"Jose Emilio Labra Gayo <[email protected]>",
"Ángel Iglesias Préstamo <[email protected]>",
"Marc-Antoine Arnaud <[email protected]>",
]
description = "RDF data shapes implementation in Rust"
repository = "https://github.com/weso/shapes_rs"
repository = "https://github.com/weso/shapes-rs"
homepage = "https://www.weso.es/shapes-rs/"

readme = "./README.md"
keywords = ["rdf", "linked-data", "semantic-web", "shex"]
keywords = ["rdf", "linked-data", "semantic-web", "shex"]
categories = ["rdf"]

[workspace.dependencies]
Expand Down Expand Up @@ -89,4 +92,4 @@ oxrdf = "0.2.0-alpha.2"
serde_json = "1.0"
regex = "1.10.4"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [ "env-filter" ] }
tracing-subscriber = { version = "0.3", features = [ "env-filter" ] }
10 changes: 8 additions & 2 deletions dctap/src/dctap.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{tap_config::TapConfig, tap_error::TapError};
use serde_derive::{Deserialize, Serialize};
use std::path::PathBuf;
use std::path::Path;
use tracing::debug;

#[derive(Debug, Serialize, Deserialize)]
Expand All @@ -11,14 +11,20 @@ pub struct DCTap {
version: String,
}

impl Default for DCTap {
fn default() -> Self {
Self::new()
}
}

impl DCTap {
pub fn new() -> DCTap {
DCTap {
version: "0.1".to_string(),
}
}

pub fn read_buf(path_buf: &PathBuf, config: TapConfig) -> Result<DCTap, TapError> {
pub fn read_buf(_path: &Path, _config: TapConfig) -> Result<DCTap, TapError> {
let dctap = DCTap::new();
debug!("DCTap parsed: {:?}", dctap);
Ok(dctap)
Expand Down
2 changes: 0 additions & 2 deletions dctap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ pub mod tap_statement;

pub use crate::tap_config::*;
pub use crate::tap_error::*;
pub use crate::tap_error::*;
pub use crate::tap_shape::*;
pub use crate::tap_statement::*;
pub use dctap::*;
pub use dctap::*;
8 changes: 1 addition & 7 deletions dctap/src/tap_config.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
use serde_derive::{Deserialize, Serialize};

#[derive(Deserialize, Serialize, Debug, PartialEq, Clone)]
#[derive(Deserialize, Serialize, Debug, PartialEq, Clone, Default)]
pub struct TapConfig {}

impl Default for TapConfig {
fn default() -> Self {
Self {}
}
}
2 changes: 1 addition & 1 deletion iri_s/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ macro_rules! iri {
(
$lit: tt
) => {
IriS::new_unchecked($lit)
$crate::IriS::new_unchecked($lit)
};
}

Expand Down
1 change: 0 additions & 1 deletion rbe_testsuite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ tracing = "0.1"

[dev-dependencies]
indoc = "2"

2 changes: 2 additions & 0 deletions shacl_ast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ serde_json = "1"
const_format = "0.2"
itertools = "0.13"

oxrdf = { version = "0.2.0-alpha.5", features = ["oxsdatatypes"] }

[dev-dependencies]
Loading

0 comments on commit 48adc54

Please sign in to comment.