Skip to content

Commit

Permalink
Merge pull request #78 from p2m2/develop
Browse files Browse the repository at this point in the history
n3store / using comunica to manage sparql request from the js facade
  • Loading branch information
ofilangi authored Mar 24, 2021
2 parents d46152c + d9dc785 commit cdc52cf
Show file tree
Hide file tree
Showing 24 changed files with 131,498 additions and 7,752 deletions.
43 changes: 41 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# - NPM_TOKEN : token (from ~/.npmrc) to publish nodejs lib
#
version: 2.1
orbs:
node: circleci/node@4.2.0
workflows:
compile-workflow:
jobs:
Expand All @@ -29,6 +31,12 @@ workflows:
context:
- DOCKER_CONTEXT

- test_js:
requires:
- compile
context:
- DOCKER_CONTEXT

- test_and_coverage_jvm:
requires:
- compile
Expand Down Expand Up @@ -86,6 +94,7 @@ executors:
password: ${DOCKER_PASS}

virtuoso_environment_executor:
working_directory: ~/repo
docker:
- image: circleci/openjdk:8-jdk
auth:
Expand All @@ -109,8 +118,13 @@ executors:
SPARQL_UPDATE: true
DEFAULT_GRAPH: "graph:test:discovery:default:"

orbs:
node: circleci/node@4.1.0
- image: inraep2m2/service-static-file-server:latest
auth:
username: ${DOCKER_USER}
password: ${DOCKER_PASS}
environment:
CORS: "true"
DEBUG: "true"

jobs:
compile:
Expand Down Expand Up @@ -148,6 +162,7 @@ jobs:
- run:
name: fastOptJS
command: cat /dev/null | sbt discoveryJS/fastOptJS

- run:
name: fullOptJS
command: cat /dev/null | sbt discoveryJS/fullOptJS
Expand Down Expand Up @@ -180,6 +195,30 @@ jobs:
- store_artifacts:
path: discovery/jvm/target/test-reports

test_js:
executor: virtuoso_environment_executor
environment:
JVM_OPTS: -Xmx3200m
TERM: dumb
steps:
- checkout
- setup_remote_docker
- node/install
- restore_cache:
keys:
- v1-dependencies-{{ checksum "build.sbt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Test JS
command: sbt discoveryJS/test
#- run:
# name: Set Npm token
# command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
#- run:
# name: Publish package
# command: npm publish

publish_snapshot:
executor: openjdk
steps:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
- display rich information on the web page or console
- offers building blocks to facilitate queries

## SBT confi

```
libraryDependencies += "com.github.p2m2" %%% "discovery" % "0.1.0",
```

### Html/Js example

Expand Down
17 changes: 14 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ lazy val scalaJsDOMVersion = "1.1.0"
lazy val scalaStubVersion = "1.0.0"
lazy val scalatagVersion = "0.9.2"
lazy val rdf4jVersion = "3.6.0-M2"

//https://jitpack.io/
lazy val comunica_actor_init_sparql_rdfjs_version = "1.0.0"
lazy val data_model_rdfjs_version = "1.0.0"
lazy val n3js_facade_version = "1.0.1"
lazy val rdfxml_streaming_parser_version = "1.0.0"
lazy val comunica_version = "1.19.2"

releaseIgnoreUntrackedFiles := true

Expand All @@ -34,7 +37,7 @@ val buildSWDiscoveryVersionAtBuildTimeFile =
def getPackageSetting() = Seq(
name := "discovery",
version := version_build,
scalaVersion := "2.13.4",
scalaVersion := "2.13.5",
organization := "com.github.p2m2",
organizationName := "p2m2",
organizationHomepage := Some(url("https://www6.inrae.fr/p2m2")),
Expand Down Expand Up @@ -106,6 +109,14 @@ lazy val discovery=crossProject(JSPlatform, JVMPlatform).in(file("."))
)
.jsConfigure(_.enablePlugins(ScalaJSBundlerPlugin))
.jsSettings(
npmDependencies in Compile ++= Seq(
"@comunica/utils-datasource" -> comunica_version),
libraryDependencies ++= Seq(
"com.github.p2m2" %%% "comunica-actor-init-sparql-rdfjs" % comunica_actor_init_sparql_rdfjs_version ,
"com.github.p2m2" %%% "data-model-rdfjs" % data_model_rdfjs_version ,
"com.github.p2m2" %%% "n3js" % n3js_facade_version ,
"com.github.p2m2" %%% "rdfxml-streaming-parser" % rdfxml_streaming_parser_version,
),
webpackBundlingMode := BundlingMode.LibraryAndApplication(),
npmDependencies in Compile ++= Seq(
"axios" -> "0.21.1",
Expand Down
2 changes: 1 addition & 1 deletion dist/checksum
Original file line number Diff line number Diff line change
@@ -1 +1 @@
07073491ddf90197fb3d57d3025946f2 -
d926a1e92398f12f978ab25bad89bb7d -
Loading

0 comments on commit cdc52cf

Please sign in to comment.