def setUp(self):
        # Set configuration variables.
        self._config = get_config(os.environ["KB_TEST_CONFIG"])

        # Get an authorization token for the test user.
        wsClient = Workspace(self._config["workspace_url"], user_id=self._config["test_user"], password=self._config["test_pwd"])
        self._token = wsClient._headers['AUTHORIZATION']
    def setUp(self):
        # Set configuration variables.
        self._config = get_config(os.environ["KB_TEST_CONFIG"])

        # Get an authorization token for the test user.
        wsClient = Workspace(self._config["workspace_url"],
                             user_id=self._config["test_user"],
                             password=self._config["test_pwd"])
        self._token = wsClient._headers['AUTHORIZATION']
Ejemplo n.º 3
0
      
SEE ALSO
      pa-gendata

AUTHORS
      Matt Benedict, Mike Mundy 
'''

# Main script function
if __name__ == "__main__":

    # Parse arguments.
    parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, prog='pa-savedata', epilog=desc3)
    parser.add_argument('configFilePath', help='path to configuration file', action='store', default=None)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()

    # Get the probabilistic_annotation section from the configuration file.
    config = get_config(args.configFilePath)

    # Create a DataParser object for working with the static database files.
    dataParser = DataParser(config)

    # Store the static database files in Shock.
    paClient = ProbabilisticAnnotation(url=get_url())
    dataParser.storeDatabaseFiles(paClient._headers['AUTHORIZATION'])

    exit(0)
Ejemplo n.º 4
0
 def setUp(self):
     self.cmd = os.path.join(os.environ["KB_TOP"], "bin/pa-url")
     self.config = get_config(os.environ["KB_TEST_CONFIG"])
Ejemplo n.º 5
0
'''

# Main script function
if __name__ == "__main__":

    # Parse arguments.
    parser = argparse.ArgumentParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        prog='pa-savedata',
        epilog=desc3)
    parser.add_argument('configFilePath',
                        help='path to configuration file',
                        action='store',
                        default=None)
    usage = parser.format_usage()
    parser.description = desc1 + '      ' + usage + desc2
    parser.usage = argparse.SUPPRESS
    args = parser.parse_args()

    # Get the probabilistic_annotation section from the configuration file.
    config = get_config(args.configFilePath)

    # Create a DataParser object for working with the static database files.
    dataParser = DataParser(config)

    # Store the static database files in Shock.
    paClient = ProbabilisticAnnotation(url=get_url())
    dataParser.storeDatabaseFiles(paClient._headers['AUTHORIZATION'])

    exit(0)
Ejemplo n.º 6
0
 def setUp(self):
     self.cmd = os.path.join(os.environ["KB_TOP"], "bin/pa-url")
     self.config = get_config(os.environ["KB_TEST_CONFIG"])