Sitelet https://github.com/weso/shaclex/commit/5a2b49a37077f5e775dfea7c6f69bd753fbba63b
Skip to content

Commit 5a2b49a

Browse files
committed
Updated to version 0.1.99
2 parents 4e8ea04 + ce7e55f commit 5a2b49a

13 files changed

Lines changed: 741 additions & 820 deletions

File tree

‎.bsp/sbt.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"sbt","version":"1.5.1","bspVersion":"2.0.0-M5","languages":["scala"],"argv":["/usr/lib/jvm/java-11-openjdk-amd64/bin/java","-Xms100m","-Xmx100m","-classpath","/usr/share/sbt/bin/sbt-launch.jar","xsbt.boot.Boot","-bsp","--sbt-launch-jar=/usr/share/sbt/bin/sbt-launch.jar"]}
1+
{"name":"sbt","version":"1.5.4","bspVersion":"2.0.0-M5","languages":["scala"],"argv":["/usr/lib/jvm/java-12-openjdk-amd64/bin/java","-Xms100m","-Xmx100m","-classpath","/usr/share/sbt/bin/sbt-launch.jar","xsbt.boot.Boot","-bsp","--sbt-launch-jar=/usr/share/sbt/bin/sbt-launch.jar"]}

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ubuntu-latest]
25-
scala: [2.12.12]
25+
scala: [2.12.14]
2626
java: [adopt@1.11]
2727
runs-on: ${{ matrix.os }}
2828
steps:
@@ -70,7 +70,7 @@ jobs:
7070
strategy:
7171
matrix:
7272
os: [ubuntu-latest]
73-
scala: [2.12.12]
73+
scala: [2.12.14]
7474
java: [adopt@1.11]
7575
runs-on: ${{ matrix.os }}
7676
steps:
@@ -96,12 +96,12 @@ jobs:
9696
~/Library/Caches/Coursier/v1
9797
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
9898

99-
- name: Download target directories (2.12.12)
99+
- name: Download target directories (2.12.14)
100100
uses: actions/download-artifact@v2
101101
with:
102-
name: target-${{ matrix.os }}-2.12.12-${{ matrix.java }}
102+
name: target-${{ matrix.os }}-2.12.14-${{ matrix.java }}
103103

104-
- name: Inflate target directories (2.12.12)
104+
- name: Inflate target directories (2.12.14)
105105
run: |
106106
tar xf targets.tar
107107
rm targets.tar

‎.github/workflows/release.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [master, main]
5+
tags: ["*"]
6+
jobs:
7+
publish:
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest]
11+
scala: [2.12.13]
12+
java: [adopt@1.11]
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- uses: actions/checkout@v2.3.4
16+
with:
17+
fetch-depth: 0
18+
- uses: olafurpg/setup-scala@v10
19+
with:
20+
java-version: ${{ matrix.java }}
21+
- run: sbt ci-release
22+
env:
23+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
24+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
25+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
26+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
*.class
22
*.log
33
.bloop
4+
.bsp
5+
.bloop/*
46

57
# sbt specific
68
dist/*

‎README.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This project contains an implementation of
99
[![Build Status](https://travis-ci.org/weso/shaclex.svg?branch=master)](https://travis-ci.org/weso/shaclex)
1010
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1c264d2087734a80b4cecf071bb5eaad)](https://www.codacy.com/gh/weso/shaclex?utm_source=github.com&utm_medium=referral&utm_content=weso/shaclex&utm_campaign=Badge_Grade)
1111
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1214239.svg)](https://doi.org/10.5281/zenodo.1214239)
12+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/es.weso/shaclex_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/es.weso/shaclex_2.13)
1213

1314
## Introduction
1415

@@ -212,6 +213,19 @@ This feature is experimental. This [issue tracks the Clingo conversion](https://
212213
* Another online demo based on this library customized for Wikidata is available at [http://wikidata.weso.es](http://wikidata.weso.es).
213214
* This project was based on [ShExcala](http://labra.github.io/ShExcala/) which was focused on Shape Expressions only.
214215

216+
## Publishing to OSS-Sonatype
217+
218+
This project uses [the sbt ci release](https://github.com/olafurpg/sbt-ci-release) plugin for publishing to [OSS Sonatype](https://oss.sonatype.org/).
219+
220+
##### SNAPSHOT Releases
221+
Open a PR and merge it to watch the CI release a -SNAPSHOT version
222+
223+
##### Full Library Releases
224+
1. Push a tag and watch the CI do a regular release
225+
2. `git tag -a v0.1.0 -m "v0.1.0"`
226+
3. `git push origin v0.1.0`
227+
_Note that the tag version MUST start with v._
228+
215229
## Author & contributors
216230

217231
* Author: [Jose Emilio Labra Gayo](http://labra.weso.es)

‎build.sbt‎

Lines changed: 38 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
lazy val scala212 = "2.12.13"
2-
lazy val scala213 = "2.13.5"
1+
lazy val scala212 = "2.12.14"
2+
lazy val scala213 = "2.13.6"
33
lazy val supportedScalaVersions = List(scala212, scala213)
44

5-
val Java11 = "adopt@1.11"
5+
val Java11 = "adopt@1.11"
66

77

88
// Local dependencies
9-
lazy val utilsVersion = "0.1.87"
10-
lazy val srdfVersion = "0.1.100"
11-
lazy val shexVersion = "0.1.90"
12-
lazy val shaclVersion = "0.1.74"
13-
// lazy val shapeMapsVersion = "0.1.82"
9+
lazy val utilsVersion = "0.1.98"
10+
lazy val srdfVersion = "0.1.102"
11+
lazy val shexVersion = "0.1.91"
12+
lazy val shaclVersion = "0.1.75"
1413

1514
// Dependency versions
16-
lazy val catsVersion = "2.5.0"
15+
lazy val catsVersion = "2.6.1"
1716
// lazy val commonsTextVersion = "1.8"
18-
lazy val circeVersion = "0.14.0-M5"
17+
lazy val circeVersion = "0.14.1"
1918
// lazy val diffsonVersion = "4.0.0"
2019
// lazy val effVersion = "4.6.1"
2120
lazy val jenaVersion = "3.16.0"
@@ -24,21 +23,14 @@ lazy val jlineVersion = "3.17.0"
2423
lazy val jnaVersion = "5.6.0"
2524
lazy val logbackVersion = "1.2.3"
2625
lazy val loggingVersion = "3.9.2"
27-
lazy val munitVersion = "0.7.23"
26+
lazy val munitVersion = "0.7.26"
2827
lazy val munitEffectVersion = "1.0.1"
2928
lazy val pprintVersion = "0.6.0"
3029
lazy val rdf4jVersion = "3.0.0"
3130
lazy val scalacheckVersion = "1.14.0"
32-
// lazy val scalacticVersion = "3.2.0"
33-
// lazy val scalaTestVersion = "3.2.0"
34-
// lazy val scalaGraphVersion = "1.11.5"
35-
// lazy val scalatagsVersion = "0.6.7"
3631
lazy val scallopVersion = "3.3.2"
37-
// lazy val seleniumVersion = "2.35.0"
38-
// lazy val sextVersion = "0.2.6"
3932
lazy val shaclTQVersion = "1.3.2"
4033
lazy val typesafeConfigVersion = "1.3.4"
41-
// lazy val xercesVersion = "2.12.0"
4234

4335

4436
// Compiler plugin dependency versions
@@ -63,14 +55,9 @@ lazy val shacl = "es.weso" %% "shacl" %
6355
// Other dependency modules
6456
lazy val catsCore = "org.typelevel" %% "cats-core" % catsVersion
6557
lazy val catsKernel = "org.typelevel" %% "cats-kernel" % catsVersion
66-
//lazy val catsMacros = "org.typelevel" %% "cats-macros" % catsVersion
6758
lazy val circeCore = "io.circe" %% "circe-core" % circeVersion
6859
lazy val circeGeneric = "io.circe" %% "circe-generic" % circeVersion
6960
lazy val circeParser = "io.circe" %% "circe-parser" % circeVersion
70-
// lazy val commonsText = "org.apache.commons" % "commons-text" % commonsTextVersion
71-
// lazy val diffsonCirce = "org.gnieh" %% "diffson-circe" % diffsonVersion
72-
// lazy val eff = "org.atnos" %% "eff" % effVersion
73-
// lazy val jgraphtCore = "org.jgrapht" % "jgrapht-core" % jgraphtVersion
7461
lazy val logbackClassic = "ch.qos.logback" % "logback-classic" % logbackVersion
7562
lazy val jenaArq = "org.apache.jena" % "jena-arq" % jenaVersion
7663
lazy val jenaShacl = "org.apache.jena" % "jena-shacl" % jenaVersion
@@ -86,38 +73,27 @@ lazy val rdf4j_runtime = "org.eclipse.rdf4j" % "rdf4j-runtime"
8673
lazy val shaclTQ = "org.topbraid" % "shacl" % shaclTQVersion
8774
lazy val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % loggingVersion
8875
lazy val scallop = "org.rogach" %% "scallop" % scallopVersion
89-
// lazy val scalactic = "org.scalactic" %% "scalactic" % scalacticVersion
90-
// lazy val scalacheck = "org.scalacheck" %% "scalacheck" % scalacheckVersion
91-
// lazy val scalaTest = "org.scalatest" %% "scalatest" % scalaTestVersion
92-
// lazy val scalatags = "com.lihaoyi" %% "scalatags" % scalatagsVersion
93-
// lazy val selenium = "org.seleniumhq.selenium" % "selenium-java" % seleniumVersion
94-
// lazy val htmlUnit = "org.seleniumhq.selenium" % "htmlunit-driver" % seleniumVersion
95-
// lazy val sext = "com.github.nikita-volkov" % "sext" % sextVersion
9676
lazy val typesafeConfig = "com.typesafe" % "config" % typesafeConfigVersion
97-
// lazy val xercesImpl = "xerces" % "xercesImpl" % xercesVersion
98-
// lazy val simulacrum = "org.typelevel" %% "simulacrum" % simulacrumVersion
9977

10078
ThisBuild / githubWorkflowJavaVersions := Seq(Java11)
101-
ThisBuild / githubOwner := "weso"
102-
ThisBuild / githubRepository := "shaclex"
10379

10480

10581
lazy val shaclex = project
10682
.in(file("."))
10783
.enablePlugins(
108-
ScalaUnidocPlugin,
109-
SiteScaladocPlugin,
110-
AsciidoctorPlugin,
111-
SbtNativePackager,
112-
WindowsPlugin,
113-
JavaAppPackaging,
84+
ScalaUnidocPlugin,
85+
SiteScaladocPlugin,
86+
AsciidoctorPlugin,
87+
SbtNativePackager,
88+
WindowsPlugin,
89+
JavaAppPackaging,
11490
LauncherJarPlugin)
11591
// .disablePlugins(RevolverPlugin)
11692
// .settings(
11793
// buildInfoKeys := BuildInfoKey.ofN(name, version, scalaVersion, sbtVersion),
118-
// buildInfoPackage := "es.weso.shaclex.buildinfo"
94+
// buildInfoPackage := "es.weso.shaclex.buildinfo"
11995
// )
120-
.settings(commonSettings, packagingSettings, publishSettings, ghPagesSettings, wixSettings)
96+
.settings(commonSettings, packagingSettings, ghPagesSettings, publishSettings, wixSettings)
12197
.aggregate(schemaInfer, schema, converter, slang, sgraph)
12298
.dependsOn(schemaInfer, schema, converter, slang, sgraph)
12399
.settings(
@@ -149,8 +125,7 @@ lazy val schemaInfer = project
149125
// .disablePlugins(RevolverPlugin)
150126
.settings(
151127
crossScalaVersions := supportedScalaVersions,
152-
commonSettings,
153-
publishSettings,
128+
commonSettings,
154129
libraryDependencies ++= Seq(srdf)
155130
)
156131
.dependsOn(
@@ -162,8 +137,7 @@ lazy val schema = project
162137
// .disablePlugins(RevolverPlugin)
163138
.settings(
164139
crossScalaVersions := supportedScalaVersions,
165-
commonSettings,
166-
publishSettings,
140+
commonSettings,
167141
libraryDependencies ++= Seq(
168142
srdf,
169143
srdfJena,
@@ -185,7 +159,7 @@ lazy val schema = project
185159
lazy val slang = project
186160
.in(file("modules/slang"))
187161
// .disablePlugins(RevolverPlugin)
188-
.settings(commonSettings, publishSettings)
162+
.settings(commonSettings)
189163
.dependsOn(
190164
)
191165
.settings(
@@ -194,7 +168,7 @@ lazy val slang = project
194168
catsCore,
195169
catsKernel,
196170
// catsMacros,
197-
shex,
171+
shex,
198172
shacl,
199173
utils,
200174
srdf,
@@ -208,8 +182,7 @@ lazy val sgraph = project
208182
// .disablePlugins(RevolverPlugin)
209183
.settings(
210184
crossScalaVersions := supportedScalaVersions,
211-
commonSettings,
212-
publishSettings,
185+
commonSettings,
213186
libraryDependencies ++= Seq(
214187
utils,
215188
utilsTest % Test,
@@ -230,8 +203,7 @@ lazy val converter = project
230203
// .disablePlugins(RevolverPlugin)
231204
.settings(
232205
crossScalaVersions := supportedScalaVersions,
233-
commonSettings,
234-
publishSettings,
206+
commonSettings,
235207
libraryDependencies ++= Seq(
236208
logbackClassic,
237209
scalaLogging,
@@ -251,12 +223,6 @@ lazy val converter = project
251223

252224
lazy val noDocProjects = Seq[ProjectReference]()
253225

254-
lazy val noPublishSettings = Seq(
255-
// publish := (),
256-
// publishLocal := (),
257-
publishArtifact := false
258-
)
259-
260226
lazy val sharedDependencies = Seq(
261227
libraryDependencies ++= Seq(
262228
// scalactic,
@@ -308,9 +274,6 @@ lazy val ghPagesSettings = Seq(
308274
lazy val commonSettings = compilationSettings ++ sharedDependencies ++ Seq(
309275
organization := "es.weso",
310276
resolvers ++= Seq(
311-
// Resolver.bintrayRepo("labra", "maven"),
312-
// Resolver.bintrayRepo("weso", "weso-releases"),
313-
Resolver.githubPackages("weso"),
314277
Resolver.sonatypeRepo("snapshots")
315278
)
316279
)
@@ -329,15 +292,19 @@ lazy val publishSettings = Seq(
329292
<url>https://labra.weso.es/</url>
330293
</developer>
331294
</developers>,
332-
/* scalacOptions in doc ++= Seq(
333-
"-diagrams-debug",
334-
"-doc-source-url",
335-
scmInfo.value.get.browseUrl + "/tree/master€{FILE_PATH}.scala",
336-
"-sourcepath",
337-
baseDirectory.in(LocalRootProject).value.getAbsolutePath,
338-
"-diagrams",
339-
), */
340295
publishMavenStyle := true,
341-
// bintrayRepository in bintray := "weso-releases",
342-
// bintrayOrganization in bintray := Some("weso")
296+
sonatypeProfileName := ("es.weso"),
297+
homepage := Some(url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%2Fcommit%2F%253Cspan%2520class%3D%2522pl-s%2522%253E%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253Ehttps%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253E%253C%2Fspan%253E)),
298+
licenses := Seq("MIT" -> url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%2Fcommit%2F%253Cspan%2520class%3D%2522pl-s%2522%253E%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253Ehttp%3A%2F%2Fopensource.org%2Flicenses%2FMIT%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253E%253C%2Fspan%253E)),
299+
scmInfo := Some(ScmInfo(url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%2Fcommit%2F%253Cspan%2520class%3D%2522pl-s%2522%253E%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253Ehttps%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253E%253C%2Fspan%253E), "scm:git:git@github.com:weso/shaclex.git")),
300+
autoAPIMappings := true,
301+
apiURL := Some(url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%2Fcommit%2F%253Cspan%2520class%3D%2522pl-s%2522%253E%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253Ehttp%3A%2F%2Fweso.github.io%2Fshaclex%2Flatest%2Fapi%2F%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253E%253C%2Fspan%253E)),
302+
autoAPIMappings := true,
303+
developers := List(
304+
Developer(
305+
id="labra",
306+
name="Jose Emilio Labra Gayo",
307+
email="jelabra@gmail.com",
308+
url=url(/sitelet?url=https%3A%2F%2Fgithub.com%2Fweso%2Fshaclex%2Fcommit%2F%253Cspan%2520class%3D%2522pl-s%2522%253E%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253Ehttps%3A%2F%2Fweso.labra.es%253Cspan%2520class%3D%2522pl-pds%2522%253E%26quot%3B%253C%2Fspan%253E%253C%2Fspan%253E)
309+
))
343310
)

‎modules/schema/src/main/scala/es/weso/schema/Schema.scala‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import es.weso.rdf.nodes._
44
import es.weso.shapemaps.ShapeMap
55
import es.weso.utils.FileUtils
66
import cats.effect._
7+
import es.weso.rdf.jena.RDFAsJenaModel
78

89
abstract class Schema {
910

@@ -27,14 +28,17 @@ abstract class Schema {
2728
optShape: Option[String],
2829
nodePrefixMap: PrefixMap = PrefixMap.empty,
2930
shapesPrefixMap: PrefixMap = pm,
30-
builder: RDFBuilder): IO[Result] = {
31+
builder: Option[RDFBuilder]): IO[Result] = {
3132
val base = Some(FileUtils.currentFolderURL)
3233
ValidationTrigger.findTrigger(triggerMode, shapeMap, base, optNode, optShape, nodePrefixMap, shapesPrefixMap) match {
3334
case Left(err) => {
3435
IO(Result.errStr(s"Cannot get trigger: $err. TriggerMode: $triggerMode, prefixMap: $pm"))
3536
}
36-
case Right(trigger) =>
37-
validate(rdf, trigger, builder)
37+
case Right(trigger) => builder match {
38+
case None => RDFAsJenaModel.empty.flatMap(_.use(builder => validate(rdf,trigger,builder)))
39+
case Some(builder) => validate(rdf, trigger, builder)
40+
41+
}
3842
}
3943
}
4044

‎modules/schema/src/test/scala/es/weso/schema/SchemaTest.scala‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class SchemaTest extends CatsEffectSuite {
4040
optShape = None,
4141
nodePrefixMap = pm,
4242
shapesPrefixMap = schema.pm,
43-
builder = builder)
43+
builder = Some(builder))
4444
} yield result }
4545
} yield vv
4646

@@ -67,7 +67,7 @@ class SchemaTest extends CatsEffectSuite {
6767
vv <- (res1,res2).tupled.use{ case (rdf, builder) => for {
6868
schema <- Schemas.fromString(data,"TURTLE","SHACLEX",None)
6969
pm <- rdf.getPrefixMap
70-
result <- schema.validate(rdf,"TargetDecls","",None,None,pm,schema.pm,builder)
70+
result <- schema.validate(rdf,"TargetDecls","",None,None,pm,schema.pm,Some(builder))
7171
} yield result }
7272
} yield vv
7373

0 commit comments

Comments
 (0)