INCATools / dosdp-tools

Utility for working with DOSDP design patterns and OWL ontologies
MIT License
24 stars 5 forks source link

Help figuring out how to run dosdp-tools #338

Open ramonawalls opened 3 years ago

ramonawalls commented 3 years ago

I installed per the instructions and added the executable to my path. If I am in target/universal/stage/bin/ and type dosdp-tools -h I get a reasonable help message, but if I am anywhere else, I get a help message that is not specific to the tool. When I try to run the tool, I get errors like Unrecognized argument: --obo-prefixes.

I guess this has something to do with dependencies, but it is beyond my skill to figure out what, even with google.

Any suggestion, @balhoff?

matentzn commented 3 years ago

Try --obo-prefixes true or --obo-prefixes=true

I think that was a recent change..

Dosdp tools is also in the odk container, just FYI :)

balhoff commented 3 years ago

@ramonawalls did Nico's comment help? Or else can I provide some more info?

ramonawalls commented 3 years ago

@balhoff I'm afraid Nico's comment does not help, because I am already including the --obo-prefixes=true argument. The fact that the command works from within the target/universal/stage/bin/ but not from elsewhere suggests an installation error.

I can indeed use the ODK container, but it seems like one should be able to run the tool without that. So demanding, I know. :)

matentzn commented 3 years ago

Can you provide the complete commend you are running?

balhoff commented 3 years ago

@ramonawalls if I take your original comment very literally it gives me an idea. You said "added the executable to my path"; what you should add to your path is the bin folder and not the executable itself. But maybe this is what you meant.

Also it sounds like you're building the tool yourself. We do have pre-built downloads for particular releases: download the .tgz here: https://github.com/INCATools/dosdp-tools/releases/tag/v0.17

ramonawalls commented 3 years ago

Hmm. I can't remember, but I think I did build the tool myself. I downloaded the pre-built version, unzipped it to my home directory (/Users/rwalls) and added the path (/Users/rwalls/dosdp-tools-0.17/bin) to my PATH. This seems to have fixed the install problem, because now when I am in /Users/rwalls/gh/srpdio/src/ontology and run dosdp-tools --help, I get a helpful message.

The error I was getting before has to do with how the command is formatted. If I run the following

dosdp-tools --obo-prefixes=true --table-format=csv --template=../patterns/chemical_concentration.yaml --outfile=../pattterns/chemical_concentration.tmp.owl generate --infile=../patterns/chemical_concentration.csv

(which uses the dosdp-tools [options] command [command options] syntax specified on https://github.com/INCATools/dosdp-tools/blob/master/README.md), I get the error messages I got before:

Unrecognized argument: --obo-prefixes=true
Unrecognized argument: --table-format=csv
Unrecognized argument: --template=../patterns/chemical_concentration.yaml
Unrecognized argument: --outfile=../pattterns/chemical_concentration.tmp.owl

If I put the command first (which does make more sense) and run

dosdp-tools generate --obo-prefixes=true --table-format=csv --template=../patterns/chemical_concentration.yaml --outfile=../pattterns/chemical_concentration.tmp.owl --infile=../patterns/chemical_concentration.csv

it seems to run, but I don't get any output. That might be an error in my input files, though, which I will check.

So, at a minimum, the readme file should be changed to have the syntax list the command before the options, to something like:

Usage

 dosdp-tools command [options] [command options]

I'll let you know if I can't get my command working, but for now, it seems like it is working, but just the readme file should be updated to reflect the syntax above and to make it clearer that people should use the pre-built version rather than try to build it themselves.

balhoff commented 3 years ago

Thanks Ramona, I see now that the usage info in the readme is very out of date.