Revert submission of instance metadata

This commit is contained in:
E Rasche
2017-08-01 10:56:03 +02:00
parent d453231226
commit a0292a46c7
3 changed files with 20 additions and 33 deletions
+11 -4
View File
@@ -5,13 +5,13 @@ See doc/source/admin/grt.rst for more detailed usage information.
"""
from __future__ import print_function
import argparse
import os
import sys
import json
import urllib2
import argparse
import time
import yaml
import re
import logging
import urllib2
sample_config = os.path.abspath(os.path.join(os.path.dirname(__file__), 'grt.yml.sample'))
default_config = os.path.abspath(os.path.join(os.path.dirname(__file__), 'grt.yml'))
@@ -37,9 +37,16 @@ def main(argv):
with open(sample_config) as handle:
config = yaml.load(handle)
REPORT_DIR = args.report_directory
CHECK_POINT_FILE = os.path.join(REPORT_DIR, '.checkpoint')
ARCHIVE_DIR = os.path.join(REPORT_DIR, 'archives')
METADATA_FILE = os.path.join(REPORT_DIR, 'meta.json')
REPORT_BASE = os.path.join(ARCHIVE_DIR, REPORT_IDENTIFIER)
GRT_URL = config['grt']['url']
GRT_INSTANCE_ID = config['grt']['instance_id']
GRT_API_KEY = config['grt']['api_key']
# Contact the server and check auth details.
# TODO: server interaction.
+2 -8
View File
@@ -189,7 +189,6 @@ def main(argv):
REPORT_DIR = args.report_directory
CHECK_POINT_FILE = os.path.join(REPORT_DIR, '.checkpoint')
ARCHIVE_DIR = os.path.join(REPORT_DIR, 'archives')
METADATA_FILE = os.path.join(REPORT_DIR, 'meta.json')
REPORT_IDENTIFIER = str(time.time())
REPORT_BASE = os.path.join(ARCHIVE_DIR, REPORT_IDENTIFIER)
@@ -200,7 +199,7 @@ def main(argv):
last_job_sent = -1
logging.info('Loading Galaxy...')
model, object_store, engine, gxconfig, app = _init(config['galaxy_config'], need_app=config['grt']['metadata']['share_toolbox'])
model, object_store, engine, gxconfig, app = _init(config['galaxy_config'], need_app=config['grt']['share_toolbox'])
sa_session = model.context.current
logging.info('Configuration Loaded')
@@ -285,11 +284,6 @@ def main(argv):
if os.path.exists(REPORT_DIR) and not os.path.exists(ARCHIVE_DIR):
os.makedirs(ARCHIVE_DIR)
_times.append(('job_meta_start', time.time() - _start_time))
with open(METADATA_FILE, 'w') as handle:
json.dump(config['grt']['metadata'], handle, indent=2)
_times.append(('job_meta_end', time.time() - _start_time))
with gzip.open(REPORT_BASE + '.tsv.gz', 'w') as handle:
for job in grt_jobs_data:
handle.write('\t'.join(job))
@@ -302,7 +296,7 @@ def main(argv):
# Now serialize the individual report data.
with open(REPORT_BASE + '.json', 'w') as handle:
if config['grt']['metadata']['share_toolbox']:
if config['grt']['share_toolbox']:
toolbox = [
(tool.id, tool.name, tool.version, tool.tool_shed, tool.repository_id, tool.repository_name)
for tool_id, tool in app.toolbox._tools_by_id.items()
+7 -21
View File
@@ -4,30 +4,16 @@ galaxy_config: config/galaxy.ini
grt:
# Go to https://telescope.galaxyproject.org to obtain an Instance ID and API key
instance_id: None
api_key: None
instance_id: 5f126e1d-d216-493e-a67a-3d6f20a0f1ac
api_key: 9e43e2b9-b54a-418c-9712-36e79f4d9183
# Galaxy Project offers a public galactic-radio-telescope instance, however
# you are free to run your own if you need. We would love it if you were
# willing and able to contribute your data publicly.
url: https://telescope.galaxyproject.org/
# Some metadata about your galaxy instance
metadata:
url: https://example.com/galaxy/
title: NLP Galaxy
description: |
This is our Galaxy instance!
# Is the instance open to the public?
public: False
# Optional Location
latitude: 0.00
longitude: 0.00
# Owners (these are the usernames of users registered with the galactic-radio-telescope system.)
owners:
- jane.doe
# Are you willing to share your toolbox? I.e. what tools are installed.
# If your instance is public, this can help us direct users to your
# instance.
share_toolbox: False
url: http://localhost:8080
# Are you willing to share your toolbox? I.e. what tools are installed.
# If your instance is public, this can help us direct users to your
# instance.
share_toolbox: False
blacklist: