Package: ro-manager
# Research Object manager command line tool**Author: Graham Klyne (graham.klyne@zoo.ox.ac.uk)**Research Objects are semantically rich aggregations of resources that bringtogether data, methods and people in scientific investigations.  For furtherinformation, see:* What is an RO?- http://www.wf4ever-project.org/wiki/pages/viewpage.action?pageId=2065079* Wf4Ever Research Object Model- http://wf4ever.github.com/ro/Research Object Manager (RO Manager) is a simple command line tool for creating andmanipulating Research Objects in a local file system, and for exchanging them with aResearch Object Digital Library (RODL):* http://www.wf4ever-project.org/wiki/display/docs/RO+management+tool* http://www.wf4ever-project.org/wiki/display/docs/RO+Manager+FAQAdditional installation and deployment information:* Checklist evaluaton service: [https://github.com/wf4ever/ro-manager/blob/master/src/roweb/README.md]()* Overlay Research Object creation service: [https://github.com/wf4ever/ro-manager/blob/master/src/roverlay/README.md]()## Dependencies* Python 2.7.* Linux/Unix type system.This software has not been tested under Windows, but may work.* The sample scripts are written to run under BASH* Python pip utility, or git, depending on the installation option used.## Installation overviewThis is just a summary of the installation options.More detailed explanations can be found below.There are two main options for installation: the first is from the PythonPackage Index (PyPI) which requires that the Python pip utility is installed:pip install ro-managerro-manager-testThe other option is to take a copy of the source code from GitHub, and installfrom that, which requires that the git source code management tool isinstalled:cd (some working directory)git clone https://github.com/wf4ever/ro-manager.git ro-managercd ro-manager/srcpython setup.py buildpython setup.py installro-manager-testFor further information on installing git on various systems, see:* http://git-scm.com/download* http://git-scm.com/book/en/Getting-Started-Installing-Git* http://www.devdaily.com/mac-os-x/how-install-git-mac-os-x-osx* https://help.ubuntu.com/community/GitFor further information on installing pip on various systems, see:* http://stackoverflow.com/questions/4986896/* http://www.saltycrane.com/blog/2010/02/how-install-pip-ubuntu/* http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windowsOnce pip is installed, it can be used to install virtualenv, if needed.## System-wide install from PyPIRO-manager can be installed from the Python Package Index (PyPI) using 'pip'.This is the simplest option for installing RO Manager, and does not requirea copy of the RO Manager code be obtained from GitHub, but generally doesrequire that you have root access on the computer where it is installed:Prerequisites are python 2.7 (http://python.org/download/releases/2.7/) andpip (http://pypi.python.org/pypi/pip, http://www.pip-installer.org/).1. Install:sudo pip install ro-manager(You may be asked for a password to confirm root access privilege.)2. Test:ro help## "Virtual environment" install from PyPIIf you don't have root privileges, or if you want to create a temporaryor local copy of the RO Manager installation, this can be done using thePython "virtual environment" facility.  The following assumes that Python"virtualenv" is installed (http://pypi.python.org/pypi/virtualenv),  Thismethod does not require that a copy of RO Manager software be obtainedfrom GitHub.  A disadvantage of this method is that the Python virtualenvironment must always be activated in order to run RO Manager.You will need to choose a working directory where the Python virtualenvironment will be created.  We'll call this $RO_MANAGER.Prerequisites are python 2.7 (http://python.org/download/releases/2.7/),virtualenv (http://pypi.python.org/pypi/virtualenv) andpip (http://pypi.python.org/pypi/pip, http://www.pip-installer.org/).1. Create and activate virtual environment:cd $RO_Managervirtualenv roenvsource roenv/bin/activateTo subsequently revert to the system default Python environment:deactivateTo remove a temporary virtual environment, including any softwarethat has been installed there:deactivaterm -rf $RO_MANAGER/roenv2. Install RO Manager:pip install ro-manager3. Test:ro help## To install from GitHubRO Manager can also be installed using a copy of the software obtainedfrom GitHub.  This may be advantageous if you need to access the mostrecent version of the software.  (The copy uploaded to PyPI may lag thedevelopment copy in GitHub.)Prerequisites are python 2.7 (http://python.org/download/releases/2.7/) and git (http://git-scm.com/).1. Obtain a copy of software from GitHub:In the first instance, the command used will be a "git clone ...":Choose a working directory where the RO Manager software will bestored:cd (working directory)git clone https://github.com/wf4ever/ro-manager.git ro-managercd ro-managerThe current working directory is now the $RO_MANAGER directory.To obtain subsequent updates, go into the ro-manager directorytree and use "git pull":cd $RO_MANAGERgit pull2. (Optional) Use Python virtualenv to create and activate an environmentfor installing RO manager.  There are two advantages to doing this:(a) not needing root privileges to install ro-manager, and(b) using a Python environment version different from the system default.The main disadvantage of using a new Python virtual environment isthat it must be activated every time before RO Manager can be run.cd $RO_Managervirtualenv roenvsource roenv/bin/activate3. Go to directory $RO_MANAGER/srccd $RO_MANAGER/src4. Build the installation package:python setup.py build5. Install the package and its dependenciesIf installing into a Python virtual environment:python setup.py installIf *not* installing into a Python virtual environment,this command must be run as root:sudo python setup.py install6. Test the installationro-manager-testThe following should be displayed:$ ro-manager-test.......................................................................................................----------------------------------------------------------------------Ran 103 tests in 13.406sOK$Note that (on some systems, including MacOS), if RO Manager is installed underthe system Python environment (i.e. not using virtualenv) then a small number oftest cases that access test data files may fail.  If the majority of tests pass,and the ro command appears to work, the installation is probably fine.7. To run RO manager to display a summary of commands and options:ro help## Using RO ManagerSee also the documentation at http://www.wf4ever-project.org/wiki/display/docs/RO+management+toolDirectory $RO_MANAGER/src/samples contains some bash shell scripts that areexamples for creating, annotating and displaying simple Research Objects.Note that the ro config command needs to be run to set up aconfiguration for your environment, though it can be re-run to updatethe details.  Most ro config values are currently ignored.  The importantvalue is -b <robase>, which indicates a disk area where Research Objectsare managed.Look inside the file $RO_MANAGER/src/samples/ro_sample.sh to see what theindividual commands used look like.For example, to create and manipulate a simple example Research Object:cd $RO_MANAGER/src/samples./ro_sample.shThe output should look something like this:$ ./ro_sample.sh--------ro config -b /usr/workspace/wf4ever-ro-manager/src/rocommand/test/robase-r http://calatola.man.poznan.pl/robox/dropbox_accounts/1/ro_containers/2-p d41d8cd98f00b204e9800998ecf8427e-u Test user -e testuser@example.orgro configuration written to /Users/graham--------mkdir: rocommand/test/robase/test-create-RO: File existscp: /ro-test-1/*: No such file or directoryro create "Test Create RO" -d "rocommand/test/robase/test-create-RO" -i "RO-id-testCreate"ro status -d "rocommand/test/robase/test-create-RO"Research Object statusidentifier:  RO-id-testCreate, title: Test Create ROcreator:     Test user, created: 2011-09-15T15:12:17path:        /usr/workspace/wf4ever-ro-manager/src/rocommand/test/robase/test-create-ROuri:         file:///usr/workspace/wf4ever-ro-manager/src/rocommand/test/robase/test-create-RO/#description: Test Create ROro list -d "rocommand/test/robase/test-create-RO"test-create-RO/.ro/manifest.rdftest-create-RO/README-ro-test-1test-create-RO/subdir1/subdir1-file.txttest-create-RO/subdir2/subdir2-file.txt--------ro annotate rocommand/test/robase/test-create-RO/subdir1/subdir1-file.txt title "subdir1-file.txt title"ro annotations -d "rocommand/test/robase/test-create-RO/subdir1" rocommand/test/robase/test-create-RO/subdir1/subdir1-file.txtfile:///usr/workspace/wf4ever-ro-manager/src/rocommand/test/robase/test-create-RO/subdir1/subdir1-file.txttitle: subdir1-file.txt title--------ro annotate rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txt type "subdir2-file.txt type"ro annotate rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txt keywords "subdir2-file.txt foo,bar"ro annotate rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txt description "subdir2-file.txt description\nline 2"ro annotate rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txt format "subdir2-file.txt format"ro annotate rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txt title "subdir2-file.txt title"ro annotate rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txt created "20110914T12:00:00"ro annotations -d "rocommand/test/robase/test-create-RO/subdir2" rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txtfile:///usr/workspace/wf4ever-ro-manager/src/rocommand/test/robase/test-create-RO/subdir2/subdir2-file.txttype: subdir2-file.txt typetitle: subdir2-file.txt titleformat: subdir2-file.txt formatkeywords: subdir2-file.txt foo,barcreated: 20110914T12:00:00description: subdir2-file.txt description\nline 2--------## Revision history### Changes for 0.2.20* More documentation improvements (including LISC 2013 material added)* Metadata query diagnostic improvements (log query in event of failure)* Enhance Minim model to allow values to be collected from probe query* Update Minim results model to create independent description for each evaluation### Changes for 0.2.19* Documentation updates (not released)### Changes for 0.2.18* Create benchmarking scrpts and result data* Add utility to create RO for benchmarking* Adjust iaeval package to work with PyPI copy of uritemplate* Revise RO access logic to allow 'ro' to display details of RO at arbitrary location* Add project copyright and licencing information.* Add README for Overlay RO service, and update other documentation files.### Changes for 0.2.17* Updates to RODL synchronization.  Includes option to push ZIP file bundle* Provide label for checklist target resource as well as the RO* Overlay RO service documentation updated* Refactoring of HTTP access to ROs (HTTP_Session), and logic to catch and log HTTP connection errors* Fix bug in RO metadata access when nested ROs are used* Rename minim:testedConstraint to minim:testedChecklist in checklist results vocabulary* Fix bug in handling of checklist "miss" option.* Improve diagnostics/logging in several areas, especially the checklist service* Fix listening port error in Overlay RO service* Improve handling of errors when parsing RO annotations### Changes for 0.2.16* Fixed bug in traffic light display when target resource is not the RO* Add HTTP-redirect cache to roverlay server, to reduce use of redirectors* Modify HTTP doRequestr methiods top return URI as string, not rdflib.URIRef* Add retry logic to make Overlay ROs behave more consistently* Minor documentation and script tweaks### Changes for V0.2.15* Tuned "Overlay RO" service and added `roverlay` command line utility* Fixed some bugs in ROSRS URI handling, and tidied URI handling code* Updated documentation for Overlay RO installation* Fixed `ro-manager-test`* Improved user diagnostics when accessing an unavailable RO* Refactored spreadsheet grid access code* Added direct-from-Excel support to mkminim* Added context handler to `HTTP_Session` class### Changes for V0.2.14* `ro list` supports URI argument as alternative to directory* Added initial "Overlay RO" service* Added checklist spreadsheet -> Minim model converter* Refactored HTTP session handling* Code and test enhancements, including HTTP resource mocking* Documentation updates### Changes for V0.2.13* Implement Minim file creator from spreadsheet description (mkminim command)* Renamed library that was clashing with other installations* Fixed bugs in processing of refactored Minim model* Removed all references to minim:derives* Improve escaping of string values in JSON output* Updated REST checklisrt service landing page* Various bug fixes### Changes for V0.2.12* Refactor Minim model and extend checklist evaluation capabilities* Fix queries to work with rdflib 4.0.1 and rdflib-sparql* Fix some bugs in RODL synchronization and evolution* Fix rowebservices handling of URIs containing escaped characters and special characters* Fix problems with extended (non-ASCII) characters in checklist query results### Changes for V0.2.11* Add RO evolution commands; ro snapshot, ro archive, ro freeze### Changes for V0.2.10* Fix problem evaluating RO with space in URI* RDFReport add escaping support; escape quotes in JSON strings* Fix problem with URI liveness test* New RO must have ore:Aggregation class* Allow reporting of missing <forall> entries* Add ro dump command* Ordering of checklist display* Various display formatting enhancements### Changes for V0.2.9* Fix up experiment-workflow checklist### Changes for V0.2.8* Web services to return checklist result as HTML or JSON for rendering by Javascript* RDF output option from checklist evaluation function* Command line evaluation can run against RO accessed using ROSRS API* Various small bug fixes, refactoring and optimizations* Updated sample files and scripts### Changes for V0.2.7* Add `ro remove` command, fix URI escaping problems that were occurring when an RO was created from files containing space or '#' characters* Add `ro link` command; this works just like `ro annotate`, except that the default treatment of the target value (i.e. for unrecognized annotation types) is as a URI, this providing a mechanism to create arbitrary links between RO resources, or between an RO resource and an external resource.* Allow annotation and links  with CURIE (QName) properties.  A predefined set of recognized URI prefixes are defined (see `~/.ro-config`) which can be used to create annotations with CURIES; e.g. `ro link foo rdfs:seeAlso bar`.* Create multiple annotations and links with wildcard resource matching; e.g. `ro link -w "/workflow/.*t2flow$" rdf:type wfdesc:Workflow" will create an rdf:type wfdesc:Workflow link for all aggregated resources in a directory named "/Workflow" and with file extension ".t2flow".* ROSRS (v6) support* Support for checklist evaluation of ROs stored in RODL or some other ROSRS service (used primarily by the `roweb` service component)* Decouple MINIM constraints from target RO.  Allow creation of MINIM descriptions that can be applied to arbitrary ROs:  this paves the way for creating and using checklists that encode community norms for RO quality.----<a rel="license" href="http://creativecommons.org/licenses/by/2.0/uk/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/2.0/uk/80x15.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/2.0/uk/deed.en_US">Creative Commons Attribution 2.0 UK: England &amp; Wales License</a>.