Open sabahzero opened 3 years ago
As an additional data point, I tried compiling on my computer as well (WSL on Windows 10) and got the following log messages. Different than @sabahzero's, but similarly couldn't find a wdsub
binary that I was expecting. Hope that's useful...
$ sbt packageBin
[info] welcome to sbt 1.5.5 (AdoptOpenJDK Java 1.8.0_292)
[info] loading settings for project wdsub-build-build-build from metals.sbt ...
[info] loading project definition from /home/asu/Science/wdsub/project/project/project
[info] loading settings for project wdsub-build-build from metals.sbt ...
[info] loading project definition from /home/asu/Science/wdsub/project/project
[success] Generated .bloop/wdsub-build-build.json
[success] Total time: 3 s, completed Sep 7, 2021 11:09:36 AM
[info] loading settings for project wdsub-build from metals.sbt,plugins.sbt ...
[info] loading project definition from /home/asu/Science/wdsub/project
[success] Generated .bloop/wdsub-build.json
[success] Total time: 5 s, completed Sep 7, 2021 11:09:47 AM
/home/asu/Science/wdsub/build.sbt:189: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
mainClass in Compile := Some("es.weso.wdsubmain.Main"),
^
/home/asu/Science/wdsub/build.sbt:190: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
mainClass in assembly := Some("es.weso.wdsubmain.Main"),
^
/home/asu/Science/wdsub/build.sbt:191: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
test in assembly := {},
^
/home/asu/Science/wdsub/build.sbt:192: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
assemblyJarName in assembly := "wdsub.jar",
^
/home/asu/Science/wdsub/build.sbt:193: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
packageSummary in Linux := name.value,
^
/home/asu/Science/wdsub/build.sbt:194: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
packageSummary in Windows := name.value,
^
/home/asu/Science/wdsub/build.sbt:236: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
daemonUserUid in Docker := Some("0"),
^
/home/asu/Science/wdsub/build.sbt:237: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
daemonUser in Docker := "root"
^
/home/asu/Science/wdsub/build.sbt:243: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
scalacOptions in (Compile, console) ~= { _.filterNot(Set("-Ywarn-unused-import", "-Ywarn-unused:imports")) },
^
/home/asu/Science/wdsub/build.sbt:244: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value
^
/home/asu/Science/wdsub/build.sbt:244: warning: method in in trait ScopingSetting is deprecated (since 1.5.0): `in` is deprecated; migrate to slash syntax - https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value
^
[info] loading settings for project wdsubRoot from build.sbt,version.sbt ...
[info] set current project to wdsubRoot (in build file:/home/asu/Science/wdsub/)
[info] Updating
https://repo1.maven.org/maven2/org/typelevel/cats-effect_2.12/3.2.2/cats-effect_2.12-3.2.2.pom
100.0% [##########] 3.7 KiB (3.0 KiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-effect-kernel_2.12/3.2.2/cats-effect-kernel_2.12-3.2.2.pom
100.0% [##########] 3.6 KiB (18.4 KiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-effect-std_2.12/3.2.2/cats-effect-std_2.12-3.2.2.pom
100.0% [##########] 3.6 KiB (19.2 KiB / s)
[info] Resolved dependencies
[info] Fetching artifacts of
https://repo1.maven.org/maven2/org/typelevel/cats-effect_2.12/3.2.2/cats-effect_2.12-3.2.2.jar
100.0% [##########] 357.5 KiB (1.1 MiB / s)
https://repo1.maven.org/maven2/org/typelevel/cats-effect-std_2.12/3.2.2/cats-effect-std_2.12-3.2.2.jar
100.0% [##########] 273.0 KiB (665.8 KiB / s)
[info] Fetched artifacts of
[info] compiling 24 Scala sources to /home/asu/Science/wdsub/modules/wdsub/target/scala-2.12/classes ...
[warn] /home/asu/Science/wdsub/modules/wdsub/src/main/scala/es/weso/wshex/ShEx2WShEx.scala:79:90: Exhaustivity analysis reached max recursion depth, not all missing cases are reported.
[warn] (Please try with scalac -Ypatmat-exhaust-depth 40 or -Ypatmat-exhaust-depth off.)
[warn] private def convertTripleExpr(te: shex.TripleExpr): Either[ConvertError, TripleExpr] = te match {
[warn] ^
[warn] /home/asu/Science/wdsub/modules/wdsub/src/main/scala/es/weso/wshex/ShEx2WShEx.scala:85:108: Exhaustivity analysis reached max recursion depth, not all missing cases are reported.
[warn] (Please try with scalac -Ypatmat-exhaust-depth 40 or -Ypatmat-exhaust-depth off.)
[warn] private def convertTripleConstraint(tc: shex.TripleConstraint): Either[ConvertError, TripleConstraint] = tc match {
[warn] ^
[warn] two warnings found
[info] compiling 2 Scala sources to /home/asu/Science/wdsub/target/scala-2.12/classes ...
[success] Total time: 38 s, completed Sep 7, 2021 11:10:39 AM
Ops, I missed the first issue raised by Sabah. You were right that the README was not ok. The instructions to generate the binary were wrong, instead of sbt packageBin
, it should be sbt universal:packageBin
.
Once you run:
sbt universal:packageBin
The binary will be available as a compressed file at:
target/universal/wdsubroot-0.0.16.zip
If you uncompress that file, the running scripts are at folder bin
$ bin/wdsubroot --help
Usage: wdsub extract
wdsub help
. . .
I have updated the README to repair that mistake.
Thanks a lot for using wdsub
and let me know of any further issues you encounter.
Thank you! And no worries, I know I submitted a few that same day so I thought the tag might help.
After following your instructions, now I get
(base) sulhasan@wireless-185-65 wdsub % ls
LICENSE build.sbt modules src version.sbt wdsubroot-0.0.16
README.md docs project target wdsub-docs website
(base) sulhasan@wireless-185-65 wdsub % cd target/universal
(base) sulhasan@wireless-185-65 universal % ls
scripts wdsubroot-0.0.16 wdsubroot-0.0.16.zip
(base) sulhasan@wireless-185-65 universal % cd wdsubroot-0.0.16
(base) sulhasan@wireless-185-65 wdsubroot-0.0.16 % bin/wdsubroot --help
Usage:
wdsub extract
wdsub dump
Wikidata subsetting command line tool
Options and flags:
--help
Display this help text.
--version, -v
Print the version number and exit.
Subcommands:
extract
Show information about an entity.
dump
Process example dump file.
(base) sulhasan@wireless-185-65 wdsubroot-0.0.16 % wdsub extract
zsh: command not found: wdsub
(base) sulhasan@wireless-185-65 wdsubroot-0.0.16 %
You mean that wdsub
doesn't work directly from the folder you are at? In your case, what you would need to do is just:
$ bin/wdsubroot dump --help
Usage:
wdsub dump --count [--out <file>] [--verbose] [--processor <string>] <dumpFile>
wdsub dump --show [--maxStatements <integer>] [--out <file>] [--verbose] [--processor <string>] <dumpFile>
wdsub dump --schema <file> [--out <file>] [--verbose] [--processor <string>] <dumpFile>
Process example dump file.
Options and flags:
--help
Display this help text.
--count
count entities
--show
show entities
--maxStatements <integer>
max statements to show
--schema <file>, -s <file>
ShEx schema
--out <file>, -o <file>
output path
--verbose
Verbose mode
--processor <string>
Dump processor library. Possible values: Fs2,WDTK
Assuming you have a dump file located, for example, at folder examples
and a schema cities.shex
located in that same folder, a typical execution would be:
$ bin/wdsubroot dump --schema examples/cities.shex --processor WDTK --out out/cities.json.gz examples/dump.json.gz
which would generate the subset cities.json.gz
in the folder out
.
If you want to play with that same example, you can use the following schema:
prefix : <http://www.wikidata.org/entity/>
<City> {
:P31 [ :Q515 ]
}
and this example dump: https://github.com/weso/sparkwdsub/blob/master/examples/dump.json.gz
Hi @labra, @andrewsu pointed out to me that I could be more clear in my compilation output from the
sbt packageBin
command (see below). Still unable to find the wdsub command for execution. Thoughts?Many thanks!