INCATools / INCATools/dosdp-tools

Bug - or improvements to exception handling needed for building prototypes owl

Open
#54 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
33
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When building prototypes from here:

https://github.com/obophenotype/Pheno_odk_test/tree/master/src/patterns

`dosdp-tools prototype --obo-prefixes --template=. --outfile=../patterns/pattern.owl`

=>

`Exception in thread "main" java.net.MalformedURLException: no protocol: .
at java.net.URL.(URL.java:593)
at java.net.URL.(URL.java:490)
at java.net.URL.(URL.java:439)
at scala.io.Source$.fromURL(Source.scala:131)
at scala.io.Source$.fromURL(Source.scala:126)
at org.monarchinitiative.dosdp.cli.Common.inputDOSDPFrom(Common.scala:50)
at org.monarchinitiative.dosdp.cli.Common.inputDOSDPFrom$(Common.scala:47)
at org.monarchinitiative.dosdp.cli.Prototype$.inputDOSDPFrom(Prototype.scala:14)
at org.monarchinitiative.dosdp.cli.Prototype$.$anonfun$run$5(Prototype.scala:27)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
at scala.collection.TraversableLike.map(TraversableLike.scala:234)
at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
at scala.collection.SetLike.map(SetLike.scala:101)
at scala.collection.SetLike.map$(SetLike.scala:101)
at scala.collection.AbstractSet.map(Set.scala:47)
at org.monarchinitiative.dosdp.cli.Prototype$.run(Prototype.scala:27)
at org.monarchinitiative.dosdp.cli.Main$.$anonfun$new$1(Main.scala:33)
at org.monarchinitiative.dosdp.cli.Main$.$anonfun$new$1$adapted(Main.scala:33)
at scala.Option.foreach(Option.scala:257)
at org.monarchinitiative.dosdp.cli.Main$.delayedEndpoint$org$monarchinitiative$dosdp$cli$Main$1(Main.scala:33)
at org.monarchinitiative.dosdp.cli.Main$delayedInit$body.apply(Main.scala:29)
at scala.Function0.apply$mcV$sp(Function0.scala:34)
at scala.Function0.apply$mcV$sp$(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App.$anonfun$main$1$adapted(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:389)
at scala.App.main(App.scala:76)
at scala.App.main$(App.scala:74)
at org.monarchinitiative.dosdp.cli.Main$.main(Main.scala:29)
at org.monarchinitiative.dosdp.cli.Main.main(Main.scala)`

The '.' in the java.net.MalformedURLException seems to refer to the path to templates directory as I get '../patterns' in its place if running from src/ontology/Makefile.

The same command works when running via the Makefile on (or directly on a target) from the ontology_development_kit. The latter has only a single YAML file in src/patterns, so I assume the problem is due to one of the YAML files in `Pheno_odk_test/tree/master/src/patterns` but haven't (yet) tracked down which. If so, it would be great if the command could tell me which one (and what's wrong with it).

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the prototype command against src/patterns and compare it with the ontology_development_kit Makefile target. Start with org.monarchinitiative.dosdp.cli.Common.inputDOSDPFrom in Common.scala and the Prototype.scala call site, then inspect the YAML files involved. Done means the offending input is identified and the command reports a useful error instead of only a MalformedURLException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, scala
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.