-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revision of CommandLine #3
Comments
I definitely think that sorting out the possible command line options is a great idea! I have a few thoughts of my own to add to this: However I do think a simple 'frontend tool' that calls both ami and norma could be great! I think we should still provide norma and ami as standalone command line utilities that do their own thing but this doesn't stop us having a third tool (name TBD) that calls both as and when needed. This may be precisely what you were suggesting but I wasn't clear. Perhaps is should even be called cmine (hence why the issue is in this repo?). This new tool should depend on both ami and norma (obviously) but could also even depend on quickscrape and getpapers etc... A sort of one-stop shop for textmining. This should also be the place in which we do post-mining analysis IMHO (making the html tables and so on). In terms of the structure for what the command line arguments should look like I haven't yet got a solid opinion. The current situation with (e.g.)
This obviously changes if we want to run multiple plugins at a single go because we need to know which option goes with which plugin. I'm not sure how best to approach this; perhaps I think this is more intuitive for a command line user than using a '_' as a special character. We also don't need to do any special reservation of commands then. We just look through all plugins in the class path (or perhaps even an external resource (e.g. to keep chemtagger in a seperate jar)) and see if any match those given. If so we load them and pass them all If desired we could have a In any case I think in addition to having a supertool we should look at the state of the command line options in the standard norma and ami binaries for people who want to use them in a standalone fashion. |
Immediate comments:
At present we have a list of formally independent commands:
The general form is therefore
The separation must be syntactic. Else how do we tell that There are the following options:
This is also fragile. I am aware that this will develop into a full language, but at present we can contain it. My current preference is for one/some/all of
as isolated character strings. I agree we drop the |
Have changed
We can easily add another separator if required (e.g. |
I'm already wrapping all this in an electron app which will be cross platform - and my deadline for having it all working is CSVconf in less than a month. I suggest waiting to see if what I produce meets the need. There's no real reason to make a wrapper for the command-line when almost everyone will want to use a GUI. I also think having a new (obscure) way of writing command-line instructions will decrease, rather than increase, usability. |
How will the cross platform app work? Will it just call the local binaries? Or are you some how going to bundle them all together? |
In terms of needing a command separator I think we can avoid it. All we need to do is ensure (probably to be done when we look through how ami processes commands as well) is that the plugins don't take 'free form' text separated by spaces. To alter your command line as an example: This makes the pairs of objects |
@tarrow it will be an electron app (which is already cross-platform) with a plugin system. Each plugin will be a node package that wraps some tool in a consistent API, and automatically gets the right precompiled binaries. |
Thanks, Some immediate points.
... have to go now... On Wed, Apr 6, 2016 at 10:08 AM, Richard Smith-Unna <
Peter Murray-Rust |
The existing tools can be run on a server in Cambridge, no? |
Sure, On Wed, Apr 6, 2016 at 10:58 AM, Richard Smith-Unna <
Peter Murray-Rust |
well I agree that is not ideal - how about only accepting one plugin via commandline arguments, and if the user wants to run multiple plugins they provide a (YAML?) file containing the plugins and their parameters |
I think it's possible to do it by concatenated arguments. My current architecture is:
|
I have continued to refactor I have developed I can create a simple-to-parse syntax, with some agreed conventions.
this is easy to parse and reasonably easy to implement as
Many arguments are inherited from |
The command line has been developed for individual components (
cmine
,norma
,ami
) rather than a complete commandline for chaining these together. We have shown that they can be chained inorg.xmlcml.ami2.plugins.CommandProcessor
. However the syntax was ad hoc, used horrible punctuation, interacted with the shell, was different from the normal style, etc.I put my hand up and ask for forgiveness. (Even I can't remember the syntax).
This is a proposal to deprecate it (it's only 1 month old) and replace by something less complex and more consistent.
PROPOSAL
Each module (including
ami
submodules) has a reserved command starting with_
, i.e.:These can be chained (the newlines are just for prettiness) as:
The structure here is
This will give rise to a single
results.xml
asnote that the duplicated operations (here
_search
and_species
) are independent and in parallel.The normal arguments in
args.xml
can then be appended:Note that the option is optional for some modules.
Generally this will make commandlines simpler.
The text was updated successfully, but these errors were encountered: