diff --git a/.gitignore b/.gitignore index 9fbaa7c97f3..e52c67610a4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ database/files database/jobs_directory database/job_working_directory database/pbs +database/shed_tools database/test_errors database/tmp database/*.sqlite diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84fe45dc6e3..4c9fb28c3a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,5 +112,5 @@ If no existing Galaxy issue seems appropriate, a new issue can be opened using this repository - please checkout the [tools-iuc](https://github.com/galaxyproject/tools-iuc) repository on GitHub. - More information about tool development can be found [on the comunity + More information about tool development can be found [on the community hub](https://galaxyproject.org/develop). diff --git a/client/galaxy/scripts/components/xrefs.vue b/client/galaxy/scripts/components/xrefs.vue new file mode 100644 index 00000000000..13c005243ba --- /dev/null +++ b/client/galaxy/scripts/components/xrefs.vue @@ -0,0 +1,53 @@ + + diff --git a/client/galaxy/scripts/mvc/tool/tool-form-base.js b/client/galaxy/scripts/mvc/tool/tool-form-base.js index ceb1a0dd109..b98d5f1929b 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-base.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-base.js @@ -12,6 +12,7 @@ import Ui from "mvc/ui/ui-misc"; import FormBase from "mvc/form/form-view"; import Webhooks from "mvc/webhooks"; import Citations from "components/Citations.vue"; +import xrefs from "components/xrefs.vue"; import Vue from "vue"; import axios from "axios"; @@ -279,6 +280,17 @@ export default FormBase.extend({ } }).$mount(vm); } + if (options.xrefs) { + var xrefInstance = Vue.extend(xrefs); + vm = document.createElement("div"); + $el.append(vm); + new xrefInstance({ + propsData: { + id: options.id, + source: "tools" + } + }).$mount(vm); + } return $el; }, diff --git a/doc/schema_template.md b/doc/schema_template.md index a08c3fc12ec..681ca56a5fe 100644 --- a/doc/schema_template.md +++ b/doc/schema_template.md @@ -18,6 +18,8 @@ $tag:tool|description://element[@name='tool']//element[@name='description'] $tag:tool|macros://complexType[@name='Macros'] $tag:tool|edam_topics://complexType[@name='EdamTopics'] $tag:tool|edam_operations://complexType[@name='EdamOperations'] +$tag:tool|xrefs://complexType[@name='xrefs'] +$tag:tool|xrefs|xref://complexType[@name='xref'] $tag:tool|requirements://complexType[@name='Requirements'] $tag:tool|requirements|requirement://complexType[@name='Requirement'] $tag:tool|requirements|container://complexType[@name='Container'] diff --git a/lib/galaxy/jobs/__init__.py b/lib/galaxy/jobs/__init__.py index 7ec38255bb9..4d1582a936c 100644 --- a/lib/galaxy/jobs/__init__.py +++ b/lib/galaxy/jobs/__init__.py @@ -2394,22 +2394,3 @@ class NoopQueue(object): def shutdown(self): return - - -class ParallelismInfo(object): - """ - Stores the information (if any) for running multiple instances of the tool in parallel - on the same set of inputs. - """ - - def __init__(self, tag): - self.method = tag.get('method') - if isinstance(tag, dict): - items = tag.items() - else: - items = tag.attrib.items() - self.attributes = dict([item for item in items if item[0] != 'method']) - if len(self.attributes) == 0: - # legacy basic mode - provide compatible defaults - self.attributes['split_size'] = 20 - self.attributes['split_mode'] = 'number_of_parts' diff --git a/lib/galaxy/tool_util/deps/dockerfiles.py b/lib/galaxy/tool_util/deps/dockerfiles.py index 67944dcbc04..72a44e9a2c7 100644 --- a/lib/galaxy/tool_util/deps/dockerfiles.py +++ b/lib/galaxy/tool_util/deps/dockerfiles.py @@ -1,11 +1,11 @@ import logging import os -from ..deps import commands -from ..deps import docker_util -from ..deps.container_classes import docker_cache_path -from ..deps.requirements import parse_requirements_from_xml -from ...tools import loader_directory +from galaxy.tool_util.deps import commands +from galaxy.tool_util.deps import docker_util +from galaxy.tool_util.deps.container_classes import docker_cache_path +from galaxy.tool_util.deps.requirements import parse_requirements_from_xml +from galaxy.tool_util.loader_directory import load_tool_elements_from_path log = logging.getLogger(__name__) @@ -22,7 +22,7 @@ def docker_host_args(**kwds): def dockerfile_build(path, dockerfile=None, error=log.error, **kwds): expected_container_names = set() tool_directories = set() - for (tool_path, tool_xml) in loader_directory.load_tool_elements_from_path(path): + for (tool_path, tool_xml) in load_tool_elements_from_path(path): requirements, containers = parse_requirements_from_xml(tool_xml) for container in containers: if container.type == "docker": diff --git a/lib/galaxy/tools/loader_directory.py b/lib/galaxy/tool_util/loader_directory.py similarity index 100% rename from lib/galaxy/tools/loader_directory.py rename to lib/galaxy/tool_util/loader_directory.py diff --git a/lib/galaxy/tool_util/parser/xml.py b/lib/galaxy/tool_util/parser/xml.py index 24eca5a78a4..1182fac116c 100644 --- a/lib/galaxy/tool_util/parser/xml.py +++ b/lib/galaxy/tool_util/parser/xml.py @@ -95,6 +95,12 @@ class XmlToolSource(ToolSource): return [] return [edam_topic.text for edam_topic in edam_topics.findall("edam_topic")] + def parse_xrefs(self): + xrefs = self.root.find("xrefs") + if xrefs is None: + return [] + return [dict(value=xref.text.strip(), reftype=xref.attrib['type']) for xref in xrefs.findall("xref") if xref.get("type")] + def parse_description(self): return xml_text(self.root, "description") @@ -191,7 +197,6 @@ class XmlToolSource(ToolSource): parallelism = self.root.find("parallelism") parallelism_info = None if parallelism is not None and parallelism.get("method"): - from galaxy.jobs import ParallelismInfo return ParallelismInfo(parallelism) return parallelism_info @@ -1092,3 +1097,22 @@ class XmlInputSource(InputSource): case_page_source = XmlPageSource(case_elem) sources.append((value, case_page_source)) return sources + + +class ParallelismInfo(object): + """ + Stores the information (if any) for running multiple instances of the tool in parallel + on the same set of inputs. + """ + + def __init__(self, tag): + self.method = tag.get('method') + if isinstance(tag, dict): + items = tag.items() + else: + items = tag.attrib.items() + self.attributes = dict([item for item in items if item[0] != 'method']) + if len(self.attributes) == 0: + # legacy basic mode - provide compatible defaults + self.attributes['split_size'] = 20 + self.attributes['split_mode'] = 'number_of_parts' diff --git a/lib/galaxy/tool_util/parser/yaml.py b/lib/galaxy/tool_util/parser/yaml.py index d13331cd768..8790c0419ea 100644 --- a/lib/galaxy/tool_util/parser/yaml.py +++ b/lib/galaxy/tool_util/parser/yaml.py @@ -40,6 +40,10 @@ class YamlToolSource(ToolSource): def parse_edam_topics(self): return self.root_dict.get("edam_topics", []) + def parse_xrefs(self): + xrefs = self.root_dict.get("xrefs", []) + return [dict(value=xref["value"], reftype=xref["type"]) for xref in xrefs if xref["type"]] + def parse_is_multi_byte(self): return self.root_dict.get("is_multi_byte", self.default_is_multi_byte) diff --git a/lib/galaxy/tool_util/xsd/galaxy.xsd b/lib/galaxy/tool_util/xsd/galaxy.xsd index a9c208e62ca..2f4e839d557 100644 --- a/lib/galaxy/tool_util/xsd/galaxy.xsd +++ b/lib/galaxy/tool_util/xsd/galaxy.xsd @@ -47,6 +47,7 @@ A ``data_source`` tool contains a few more relevant attributes. + @@ -5581,14 +5582,60 @@ A tool can have any number of EDAM operation references. ]]> - - - - - - - - - + + + + + + + + + + + + `` tags. +A tool can refer multiple reference IDs. + +```xml + + + seqtk + + +``` + +]]> + + + + + + + + + The ``xref`` element specifies reference +information according to a catalog. + + + + + + Type of reference - currently ``bio.tools`` +is the only supported options. + + + + + + + + Type of Reference. + + + + + + diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index a6c9581a3be..a5892132aee 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -797,6 +797,7 @@ class Tool(Dictifiable): self.containers = containers self.citations = self._parse_citations(tool_source) + self.xrefs = tool_source.parse_xrefs() # Determine if this tool can be used in workflows self.is_workflow_compatible = self.check_workflow_compatible(tool_source) @@ -1865,6 +1866,7 @@ class Tool(Dictifiable): tool_dict["edam_operations"] = self.edam_operations tool_dict["edam_topics"] = self.edam_topics + tool_dict["xrefs"] = self.xrefs # Fill in ToolShedRepository info if hasattr(self, 'tool_shed') and self.tool_shed: diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index df38375939d..ae9757bb1d3 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -12,7 +12,7 @@ from six.moves.urllib.parse import urlparse from galaxy.exceptions import MessageException, ObjectNotFound from galaxy.tool_util.deps import build_dependency_manager -from galaxy.tools.loader_directory import looks_like_a_tool +from galaxy.tool_util.loader_directory import looks_like_a_tool from galaxy.util import ( ExecutionTimer, listify, diff --git a/lib/galaxy/webapps/galaxy/api/tools.py b/lib/galaxy/webapps/galaxy/api/tools.py index d86a11d5b9b..cee0fc78524 100644 --- a/lib/galaxy/webapps/galaxy/api/tools.py +++ b/lib/galaxy/webapps/galaxy/api/tools.py @@ -403,6 +403,11 @@ class ToolsController(BaseAPIController, UsesVisualizationMixin): rval.append(citation.to_dict('bibtex')) return rval + @expose_api_anonymous_and_sessionless + def xrefs(self, trans, id, **kwds): + tool = self._get_tool(id, user=trans.user) + return tool.xrefs + @web.legacy_expose_api_raw @web.require_admin def download(self, trans, id, **kwds): diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index d754e7c09bb..6daf8803c00 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -349,6 +349,7 @@ def populate_api_routes(webapp, app): webapp.mapper.connect('/api/tools/{id:.+?}/test_data', action='test_data', controller="tools") webapp.mapper.connect('/api/tools/{id:.+?}/diagnostics', action='diagnostics', controller="tools") webapp.mapper.connect('/api/tools/{id:.+?}/citations', action='citations', controller="tools") + webapp.mapper.connect('/api/tools/{id:.+?}/xrefs', action='xrefs', controller="tools") webapp.mapper.connect('/api/tools/{id:.+?}/download', action='download', controller="tools") webapp.mapper.connect('/api/tools/{id:.+?}/requirements', action='requirements', controller="tools") webapp.mapper.connect('/api/tools/{id:.+?}/install_dependencies', action='install_dependencies', controller="tools", conditions=dict(method=["POST"])) diff --git a/lib/tool_shed/metadata/metadata_generator.py b/lib/tool_shed/metadata/metadata_generator.py index 7aa5b0007f6..a37ddac7b0c 100644 --- a/lib/tool_shed/metadata/metadata_generator.py +++ b/lib/tool_shed/metadata/metadata_generator.py @@ -6,9 +6,9 @@ import tempfile from sqlalchemy import and_ from galaxy import util +from galaxy.tool_util.loader_directory import looks_like_a_tool from galaxy.tool_util.parser.interface import TestCollectionDef from galaxy.tools.data_manager.manager import DataManager -from galaxy.tools.loader_directory import looks_like_a_tool from galaxy.tools.repositories import ValidationContext from galaxy.web import url_for from tool_shed.repository_types import util as rt_util diff --git a/packages/app/HISTORY.rst b/packages/app/HISTORY.rst new file mode 100644 index 00000000000..ec2f0e746e9 --- /dev/null +++ b/packages/app/HISTORY.rst @@ -0,0 +1,12 @@ +.. :changelog: + +History +------- + +.. to_doc + +--------------------- +19.9.0.dev0 +--------------------- + +* Initial import from dev branch of Galaxy during 19.09 development cycle. diff --git a/packages/app/LICENSE b/packages/app/LICENSE new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/packages/app/LICENSE @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/packages/app/MANIFEST.in b/packages/app/MANIFEST.in new file mode 100644 index 00000000000..c74cefe0942 --- /dev/null +++ b/packages/app/MANIFEST.in @@ -0,0 +1 @@ +include *.rst LICENSE diff --git a/packages/app/Makefile b/packages/app/Makefile new file mode 120000 index 00000000000..37af8bae5ba --- /dev/null +++ b/packages/app/Makefile @@ -0,0 +1 @@ +../package.Makefile \ No newline at end of file diff --git a/packages/app/README.rst b/packages/app/README.rst new file mode 100644 index 00000000000..898b0262617 --- /dev/null +++ b/packages/app/README.rst @@ -0,0 +1,14 @@ + +.. image:: https://badge.fury.io/py/galaxy-app.svg + :target: https://pypi.org/project/galaxy-app/ + + +Overview +-------- + +The Galaxy_ application logic (backend). + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/packages/app/dev-requirements.txt b/packages/app/dev-requirements.txt new file mode 120000 index 00000000000..467b90d7a23 --- /dev/null +++ b/packages/app/dev-requirements.txt @@ -0,0 +1 @@ +../package-dev-requirements.txt \ No newline at end of file diff --git a/packages/app/galaxy/__init__.py b/packages/app/galaxy/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/packages/app/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/packages/app/galaxy/actions b/packages/app/galaxy/actions new file mode 120000 index 00000000000..0a3660ca78f --- /dev/null +++ b/packages/app/galaxy/actions @@ -0,0 +1 @@ +../../../lib/galaxy/actions \ No newline at end of file diff --git a/packages/app/galaxy/forms b/packages/app/galaxy/forms new file mode 120000 index 00000000000..b15f3ec2fa6 --- /dev/null +++ b/packages/app/galaxy/forms @@ -0,0 +1 @@ +../../../lib/galaxy/forms \ No newline at end of file diff --git a/packages/app/galaxy/project_galaxy_app.py b/packages/app/galaxy/project_galaxy_app.py new file mode 100644 index 00000000000..95cac65f339 --- /dev/null +++ b/packages/app/galaxy/project_galaxy_app.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +__version__ = '19.9.0.dev0' + +PROJECT_NAME = "galaxy-app" +PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" +PROJECT_URL = "https://github.com/galaxyproject/galaxy" +PROJECT_AUTHOR = 'Galaxy Project and Community' +PROJECT_DESCRIPTION = 'Galaxy Application (backend)' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' +RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( + PROJECT_USERAME, PROJECT_NAME +) diff --git a/packages/app/galaxy/tours b/packages/app/galaxy/tours new file mode 120000 index 00000000000..4cb21b13e3a --- /dev/null +++ b/packages/app/galaxy/tours @@ -0,0 +1 @@ +../../../lib/galaxy/tours \ No newline at end of file diff --git a/packages/app/galaxy/webhooks b/packages/app/galaxy/webhooks new file mode 120000 index 00000000000..4f76d9fd9ea --- /dev/null +++ b/packages/app/galaxy/webhooks @@ -0,0 +1 @@ +../../../lib/galaxy/webhooks \ No newline at end of file diff --git a/packages/app/requirements.txt b/packages/app/requirements.txt new file mode 100644 index 00000000000..9c87be95eff --- /dev/null +++ b/packages/app/requirements.txt @@ -0,0 +1,3 @@ +galaxy-auth +galaxy-job-execution + diff --git a/packages/app/scripts b/packages/app/scripts new file mode 120000 index 00000000000..9aec9dc5a06 --- /dev/null +++ b/packages/app/scripts @@ -0,0 +1 @@ +../build_scripts \ No newline at end of file diff --git a/packages/app/setup.cfg b/packages/app/setup.cfg new file mode 120000 index 00000000000..eb7cf09393f --- /dev/null +++ b/packages/app/setup.cfg @@ -0,0 +1 @@ +../../setup.cfg \ No newline at end of file diff --git a/packages/app/setup.py b/packages/app/setup.py new file mode 100644 index 00000000000..73e771657f8 --- /dev/null +++ b/packages/app/setup.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import ast +import os +import re +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +SOURCE_DIR = "galaxy" + +_version_re = re.compile(r'__version__\s+=\s+(.*)') + +project_short_name = os.path.basename(os.path.dirname(os.path.realpath(__file__))) +with open('%s/project_galaxy_%s.py' % (SOURCE_DIR, project_short_name), 'rb') as f: + init_contents = f.read().decode('utf-8') + + def get_var(var_name): + pattern = re.compile(r'%s\s+=\s+(.*)' % var_name) + match = pattern.search(init_contents).group(1) + return str(ast.literal_eval(match)) + + version = get_var("__version__") + PROJECT_NAME = get_var("PROJECT_NAME") + PROJECT_URL = get_var("PROJECT_URL") + PROJECT_AUTHOR = get_var("PROJECT_AUTHOR") + PROJECT_EMAIL = get_var("PROJECT_EMAIL") + PROJECT_DESCRIPTION = get_var("PROJECT_DESCRIPTION") + +TEST_DIR = 'tests' +PACKAGES = [ + 'galaxy', + 'galaxy.actions', + 'galaxy.forms', + 'galaxy.tours', + 'galaxy.webhooks', +] +ENTRY_POINTS = ''' + [console_scripts] +''' +PACKAGE_DATA = { + # Be sure to update MANIFEST.in for source dist. + 'galaxy': [ + ], +} +PACKAGE_DIR = { + SOURCE_DIR: SOURCE_DIR, +} + +readme = open('README.rst').read() +history = open('HISTORY.rst').read().replace('.. :changelog:', '') + +if os.path.exists("requirements.txt"): + requirements = open("requirements.txt").read().split("\n") +else: + # In tox, it will cover them anyway. + requirements = [] + + +test_requirements = [ + # TODO: put package test requirements here +] + + +setup( + name=PROJECT_NAME, + version=version, + description=PROJECT_DESCRIPTION, + long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', + author=PROJECT_AUTHOR, + author_email=PROJECT_EMAIL, + url=PROJECT_URL, + packages=PACKAGES, + entry_points=ENTRY_POINTS, + package_data=PACKAGE_DATA, + package_dir=PACKAGE_DIR, + include_package_data=True, + install_requires=requirements, + license="AFL", + zip_safe=False, + keywords='galaxy', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Environment :: Console', + 'License :: OSI Approved :: Academic Free License (AFL)', + 'Operating System :: POSIX', + 'Topic :: Software Development', + 'Topic :: Software Development :: Code Generators', + 'Topic :: Software Development :: Testing', + 'Natural Language :: English', + "Programming Language :: Python :: 2", + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + test_suite=TEST_DIR, + tests_require=test_requirements +) diff --git a/packages/auth/HISTORY.rst b/packages/auth/HISTORY.rst new file mode 100644 index 00000000000..ec2f0e746e9 --- /dev/null +++ b/packages/auth/HISTORY.rst @@ -0,0 +1,12 @@ +.. :changelog: + +History +------- + +.. to_doc + +--------------------- +19.9.0.dev0 +--------------------- + +* Initial import from dev branch of Galaxy during 19.09 development cycle. diff --git a/packages/auth/LICENSE b/packages/auth/LICENSE new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/packages/auth/LICENSE @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/packages/auth/MANIFEST.in b/packages/auth/MANIFEST.in new file mode 100644 index 00000000000..c74cefe0942 --- /dev/null +++ b/packages/auth/MANIFEST.in @@ -0,0 +1 @@ +include *.rst LICENSE diff --git a/packages/auth/Makefile b/packages/auth/Makefile new file mode 120000 index 00000000000..37af8bae5ba --- /dev/null +++ b/packages/auth/Makefile @@ -0,0 +1 @@ +../package.Makefile \ No newline at end of file diff --git a/packages/auth/README.rst b/packages/auth/README.rst new file mode 100644 index 00000000000..b493770764f --- /dev/null +++ b/packages/auth/README.rst @@ -0,0 +1,14 @@ + +.. image:: https://badge.fury.io/py/galaxy-auth.svg + :target: https://pypi.org/project/galaxy-auth/ + + +Overview +-------- + +The Galaxy_ auth framework and default plugins. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/packages/auth/dev-requirements.txt b/packages/auth/dev-requirements.txt new file mode 120000 index 00000000000..467b90d7a23 --- /dev/null +++ b/packages/auth/dev-requirements.txt @@ -0,0 +1 @@ +../package-dev-requirements.txt \ No newline at end of file diff --git a/packages/auth/galaxy/__init__.py b/packages/auth/galaxy/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/packages/auth/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/packages/auth/galaxy/auth b/packages/auth/galaxy/auth new file mode 120000 index 00000000000..9c9b6bf2e30 --- /dev/null +++ b/packages/auth/galaxy/auth @@ -0,0 +1 @@ +../../../lib/galaxy/auth \ No newline at end of file diff --git a/packages/auth/galaxy/project_galaxy_auth.py b/packages/auth/galaxy/project_galaxy_auth.py new file mode 100644 index 00000000000..dbd94f1ced5 --- /dev/null +++ b/packages/auth/galaxy/project_galaxy_auth.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +__version__ = '19.9.0.dev0' + +PROJECT_NAME = "galaxy-auth" +PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" +PROJECT_URL = "https://github.com/galaxyproject/galaxy" +PROJECT_AUTHOR = 'Galaxy Project and Community' +PROJECT_DESCRIPTION = 'Galaxy Auth Framework and Implementations' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' +RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( + PROJECT_USERAME, PROJECT_NAME +) diff --git a/packages/auth/requirements.txt b/packages/auth/requirements.txt new file mode 100644 index 00000000000..7dcf8f4def7 --- /dev/null +++ b/packages/auth/requirements.txt @@ -0,0 +1 @@ +galaxy-data diff --git a/packages/auth/scripts b/packages/auth/scripts new file mode 120000 index 00000000000..9aec9dc5a06 --- /dev/null +++ b/packages/auth/scripts @@ -0,0 +1 @@ +../build_scripts \ No newline at end of file diff --git a/packages/auth/setup.cfg b/packages/auth/setup.cfg new file mode 120000 index 00000000000..eb7cf09393f --- /dev/null +++ b/packages/auth/setup.cfg @@ -0,0 +1 @@ +../../setup.cfg \ No newline at end of file diff --git a/packages/auth/setup.py b/packages/auth/setup.py new file mode 100644 index 00000000000..63367f57581 --- /dev/null +++ b/packages/auth/setup.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import ast +import os +import re +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +SOURCE_DIR = "galaxy" + +_version_re = re.compile(r'__version__\s+=\s+(.*)') + +project_short_name = os.path.basename(os.path.dirname(os.path.realpath(__file__))) +with open('%s/project_galaxy_%s.py' % (SOURCE_DIR, project_short_name), 'rb') as f: + init_contents = f.read().decode('utf-8') + + def get_var(var_name): + pattern = re.compile(r'%s\s+=\s+(.*)' % var_name) + match = pattern.search(init_contents).group(1) + return str(ast.literal_eval(match)) + + version = get_var("__version__") + PROJECT_NAME = get_var("PROJECT_NAME") + PROJECT_URL = get_var("PROJECT_URL") + PROJECT_AUTHOR = get_var("PROJECT_AUTHOR") + PROJECT_EMAIL = get_var("PROJECT_EMAIL") + PROJECT_DESCRIPTION = get_var("PROJECT_DESCRIPTION") + +TEST_DIR = 'tests' +PACKAGES = [ + 'galaxy', + 'galaxy.auth', + 'galaxy.auth.providers', +] +ENTRY_POINTS = ''' + [console_scripts] +''' +PACKAGE_DATA = { + # Be sure to update MANIFEST.in for source dist. + 'galaxy': [ + ], +} +PACKAGE_DIR = { + SOURCE_DIR: SOURCE_DIR, +} + +readme = open('README.rst').read() +history = open('HISTORY.rst').read().replace('.. :changelog:', '') + +if os.path.exists("requirements.txt"): + requirements = open("requirements.txt").read().split("\n") +else: + # In tox, it will cover them anyway. + requirements = [] + + +test_requirements = [ + # TODO: put package test requirements here +] + + +setup( + name=PROJECT_NAME, + version=version, + description=PROJECT_DESCRIPTION, + long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', + author=PROJECT_AUTHOR, + author_email=PROJECT_EMAIL, + url=PROJECT_URL, + packages=PACKAGES, + entry_points=ENTRY_POINTS, + package_data=PACKAGE_DATA, + package_dir=PACKAGE_DIR, + include_package_data=True, + install_requires=requirements, + license="AFL", + zip_safe=False, + keywords='galaxy', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Environment :: Console', + 'License :: OSI Approved :: Academic Free License (AFL)', + 'Operating System :: POSIX', + 'Topic :: Software Development', + 'Topic :: Software Development :: Code Generators', + 'Topic :: Software Development :: Testing', + 'Natural Language :: English', + "Programming Language :: Python :: 2", + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + test_suite=TEST_DIR, + tests_require=test_requirements +) diff --git a/packages/authnz/HISTORY.rst b/packages/authnz/HISTORY.rst new file mode 100644 index 00000000000..ec2f0e746e9 --- /dev/null +++ b/packages/authnz/HISTORY.rst @@ -0,0 +1,12 @@ +.. :changelog: + +History +------- + +.. to_doc + +--------------------- +19.9.0.dev0 +--------------------- + +* Initial import from dev branch of Galaxy during 19.09 development cycle. diff --git a/packages/authnz/LICENSE b/packages/authnz/LICENSE new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/packages/authnz/LICENSE @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/packages/authnz/MANIFEST.in b/packages/authnz/MANIFEST.in new file mode 100644 index 00000000000..c74cefe0942 --- /dev/null +++ b/packages/authnz/MANIFEST.in @@ -0,0 +1 @@ +include *.rst LICENSE diff --git a/packages/authnz/Makefile b/packages/authnz/Makefile new file mode 120000 index 00000000000..37af8bae5ba --- /dev/null +++ b/packages/authnz/Makefile @@ -0,0 +1 @@ +../package.Makefile \ No newline at end of file diff --git a/packages/authnz/README.rst b/packages/authnz/README.rst new file mode 100644 index 00000000000..5f94cd6f231 --- /dev/null +++ b/packages/authnz/README.rst @@ -0,0 +1,14 @@ + +.. image:: https://badge.fury.io/py/galaxy-authnz.svg + :target: https://pypi.org/project/galaxy-authnz/ + + +Overview +-------- + +The Galaxy_ authnz module. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/packages/authnz/dev-requirements.txt b/packages/authnz/dev-requirements.txt new file mode 120000 index 00000000000..467b90d7a23 --- /dev/null +++ b/packages/authnz/dev-requirements.txt @@ -0,0 +1 @@ +../package-dev-requirements.txt \ No newline at end of file diff --git a/packages/authnz/galaxy/__init__.py b/packages/authnz/galaxy/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/packages/authnz/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/packages/authnz/galaxy/authnz b/packages/authnz/galaxy/authnz new file mode 120000 index 00000000000..801410c14dc --- /dev/null +++ b/packages/authnz/galaxy/authnz @@ -0,0 +1 @@ +../../../lib/galaxy/authnz \ No newline at end of file diff --git a/packages/authnz/galaxy/project_galaxy_authnz.py b/packages/authnz/galaxy/project_galaxy_authnz.py new file mode 100644 index 00000000000..bf401824d4f --- /dev/null +++ b/packages/authnz/galaxy/project_galaxy_authnz.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +__version__ = '19.9.0.dev0' + +PROJECT_NAME = "galaxy-authnz" +PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" +PROJECT_URL = "https://github.com/galaxyproject/galaxy" +PROJECT_AUTHOR = 'Galaxy Project and Community' +PROJECT_DESCRIPTION = 'Galaxy AuthNZ' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' +RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( + PROJECT_USERAME, PROJECT_NAME +) diff --git a/packages/authnz/requirements.txt b/packages/authnz/requirements.txt new file mode 100644 index 00000000000..353d6bbd324 --- /dev/null +++ b/packages/authnz/requirements.txt @@ -0,0 +1,7 @@ +galaxy-data +pyjwt +cloudauthz +# Following three shouldn't be needed, cloudauthz should be updated to require them +google-api-python-client +httplib2 +oauth2client diff --git a/packages/authnz/scripts b/packages/authnz/scripts new file mode 120000 index 00000000000..9aec9dc5a06 --- /dev/null +++ b/packages/authnz/scripts @@ -0,0 +1 @@ +../build_scripts \ No newline at end of file diff --git a/packages/authnz/setup.cfg b/packages/authnz/setup.cfg new file mode 120000 index 00000000000..eb7cf09393f --- /dev/null +++ b/packages/authnz/setup.cfg @@ -0,0 +1 @@ +../../setup.cfg \ No newline at end of file diff --git a/packages/authnz/setup.py b/packages/authnz/setup.py new file mode 100644 index 00000000000..8c8f3053e79 --- /dev/null +++ b/packages/authnz/setup.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import ast +import os +import re +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + +SOURCE_DIR = "galaxy" + +_version_re = re.compile(r'__version__\s+=\s+(.*)') + +project_short_name = os.path.basename(os.path.dirname(os.path.realpath(__file__))) +with open('%s/project_galaxy_%s.py' % (SOURCE_DIR, project_short_name), 'rb') as f: + init_contents = f.read().decode('utf-8') + + def get_var(var_name): + pattern = re.compile(r'%s\s+=\s+(.*)' % var_name) + match = pattern.search(init_contents).group(1) + return str(ast.literal_eval(match)) + + version = get_var("__version__") + PROJECT_NAME = get_var("PROJECT_NAME") + PROJECT_URL = get_var("PROJECT_URL") + PROJECT_AUTHOR = get_var("PROJECT_AUTHOR") + PROJECT_EMAIL = get_var("PROJECT_EMAIL") + PROJECT_DESCRIPTION = get_var("PROJECT_DESCRIPTION") + +TEST_DIR = 'tests' +PACKAGES = [ + 'galaxy', + 'galaxy.authnz', +] +ENTRY_POINTS = ''' + [console_scripts] +''' +PACKAGE_DATA = { + # Be sure to update MANIFEST.in for source dist. + 'galaxy': [ + ], +} +PACKAGE_DIR = { + SOURCE_DIR: SOURCE_DIR, +} + +readme = open('README.rst').read() +history = open('HISTORY.rst').read().replace('.. :changelog:', '') + +if os.path.exists("requirements.txt"): + requirements = open("requirements.txt").read().split("\n") +else: + # In tox, it will cover them anyway. + requirements = [] + + +test_requirements = [ + # TODO: put package test requirements here +] + + +setup( + name=PROJECT_NAME, + version=version, + description=PROJECT_DESCRIPTION, + long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', + author=PROJECT_AUTHOR, + author_email=PROJECT_EMAIL, + url=PROJECT_URL, + packages=PACKAGES, + entry_points=ENTRY_POINTS, + package_data=PACKAGE_DATA, + package_dir=PACKAGE_DIR, + include_package_data=True, + install_requires=requirements, + license="AFL", + zip_safe=False, + keywords='galaxy', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Environment :: Console', + 'License :: OSI Approved :: Academic Free License (AFL)', + 'Operating System :: POSIX', + 'Topic :: Software Development', + 'Topic :: Software Development :: Code Generators', + 'Topic :: Software Development :: Testing', + 'Natural Language :: English', + "Programming Language :: Python :: 2", + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + test_suite=TEST_DIR, + tests_require=test_requirements +) diff --git a/packages/authnz/tests/test_custos_authnz.py b/packages/authnz/tests/test_custos_authnz.py new file mode 120000 index 00000000000..d41840c35c6 --- /dev/null +++ b/packages/authnz/tests/test_custos_authnz.py @@ -0,0 +1 @@ +../../../test/unit/authnz/test_custos_authnz.py \ No newline at end of file diff --git a/packages/containers/README.rst b/packages/containers/README.rst index ed360aeef60..90be9b0a80a 100644 --- a/packages/containers/README.rst +++ b/packages/containers/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-containers.svg - :target: https://pypi.python.org/pypi/galaxy-containers/ + :target: https://pypi.org/project/galaxy-containers/ Overview diff --git a/packages/containers/galaxy/project_galaxy_containers.py b/packages/containers/galaxy/project_galaxy_containers.py index 6442c8261bb..aaa2331fcce 100644 --- a/packages/containers/galaxy/project_galaxy_containers.py +++ b/packages/containers/galaxy/project_galaxy_containers.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Container Modeling and Interaction Abstractions' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/packages/data/README.rst b/packages/data/README.rst index 4deccf230e9..daf960bc982 100644 --- a/packages/data/README.rst +++ b/packages/data/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-data.svg - :target: https://pypi.python.org/pypi/galaxy-data/ + :target: https://pypi.org/project/galaxy-data/ Overview diff --git a/packages/data/galaxy/project_galaxy_data.py b/packages/data/galaxy/project_galaxy_data.py index b7c780d82ab..1a2efe784b6 100644 --- a/packages/data/galaxy/project_galaxy_data.py +++ b/packages/data/galaxy/project_galaxy_data.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Datatype Framework and Datatypes' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/packages/data/galaxy/quota b/packages/data/galaxy/quota new file mode 120000 index 00000000000..a16f2ec8773 --- /dev/null +++ b/packages/data/galaxy/quota @@ -0,0 +1 @@ +../../../lib/galaxy/quota \ No newline at end of file diff --git a/packages/data/setup.py b/packages/data/setup.py index 38ec5a74e13..12556d60ed4 100644 --- a/packages/data/setup.py +++ b/packages/data/setup.py @@ -42,6 +42,7 @@ PACKAGES = [ 'galaxy.model.orm', 'galaxy.model.store', 'galaxy.model.tool_shed_install', + 'galaxy.quota', 'galaxy.security', ] ENTRY_POINTS = ''' diff --git a/packages/job_execution/README.rst b/packages/job_execution/README.rst index 3a7574eab70..8ec9c6f91cf 100644 --- a/packages/job_execution/README.rst +++ b/packages/job_execution/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-job-execution.svg - :target: https://pypi.python.org/pypi/galaxy-job-execution/ + :target: https://pypi.org/project/galaxy-job-execution/ Overview diff --git a/packages/job_execution/galaxy/project_galaxy_job_execution.py b/packages/job_execution/galaxy/project_galaxy_job_execution.py index a30f915133d..f2c11c58e0e 100644 --- a/packages/job_execution/galaxy/project_galaxy_job_execution.py +++ b/packages/job_execution/galaxy/project_galaxy_job_execution.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Job Execution Runtime Utilities' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/packages/job_metrics/README.rst b/packages/job_metrics/README.rst index 65a810c4c24..f584e6b993d 100644 --- a/packages/job_metrics/README.rst +++ b/packages/job_metrics/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-job-metrics.svg - :target: https://pypi.python.org/pypi/galaxy-job-metrics/ + :target: https://pypi.org/project/galaxy-job-metrics/ Overview diff --git a/packages/job_metrics/galaxy/project_galaxy_job_metrics.py b/packages/job_metrics/galaxy/project_galaxy_job_metrics.py index 5c5c5411ab8..a14ffc17c67 100644 --- a/packages/job_metrics/galaxy/project_galaxy_job_metrics.py +++ b/packages/job_metrics/galaxy/project_galaxy_job_metrics.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Job Metrics' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/packages/objectstore/README.rst b/packages/objectstore/README.rst index fa243ffe29b..ceaa2466eaf 100644 --- a/packages/objectstore/README.rst +++ b/packages/objectstore/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-objectstore.svg - :target: https://pypi.python.org/pypi/galaxy-objectstore/ + :target: https://pypi.org/project/galaxy-objectstore/ Overview diff --git a/packages/objectstore/galaxy/project_galaxy_objectstore.py b/packages/objectstore/galaxy/project_galaxy_objectstore.py index 825abc23062..be0292f59e7 100644 --- a/packages/objectstore/galaxy/project_galaxy_objectstore.py +++ b/packages/objectstore/galaxy/project_galaxy_objectstore.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Objectstore Framework and Plugins' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/packages/test.sh b/packages/test.sh index aacfab67a3e..d05f3cc5dbb 100755 --- a/packages/test.sh +++ b/packages/test.sh @@ -22,10 +22,13 @@ PACKAGE_DIRS=( tool_util data job_execution + auth + authnz + app ) # containers has no tests, tool_util not yet working 100%, # data has many problems quota, tool shed install database, etc.. -RUN_TESTS=(1 1 1 0 0 0 0 1) +RUN_TESTS=(1 1 1 0 1 0 0 0 1 0) for ((i=0; i<${#PACKAGE_DIRS[@]}; i++)); do package_dir=${PACKAGE_DIRS[$i]} diff --git a/packages/tool_util/README.rst b/packages/tool_util/README.rst index 74c8c0f1f31..badd671d78a 100644 --- a/packages/tool_util/README.rst +++ b/packages/tool_util/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-tool-util.svg - :target: https://pypi.python.org/pypi/galaxy-tool-util/ + :target: https://pypi.org/project/galaxy-tool-util/ Overview diff --git a/packages/tool_util/galaxy/project_galaxy_tool_util.py b/packages/tool_util/galaxy/project_galaxy_tool_util.py index 4f526958884..f9518421336 100644 --- a/packages/tool_util/galaxy/project_galaxy_tool_util.py +++ b/packages/tool_util/galaxy/project_galaxy_tool_util.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Tool and Tool Dependency Utilities' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/packages/util/README.rst b/packages/util/README.rst index 778c380a853..378cb991e37 100644 --- a/packages/util/README.rst +++ b/packages/util/README.rst @@ -1,6 +1,6 @@ .. image:: https://badge.fury.io/py/galaxy-util.svg - :target: https://pypi.python.org/pypi/galaxy-util/ + :target: https://pypi.org/project/galaxy-util/ Overview diff --git a/packages/util/galaxy/project_galaxy_util.py b/packages/util/galaxy/project_galaxy_util.py index c5a4d0ce99a..f8d1291d92b 100644 --- a/packages/util/galaxy/project_galaxy_util.py +++ b/packages/util/galaxy/project_galaxy_util.py @@ -7,7 +7,7 @@ PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" PROJECT_URL = "https://github.com/galaxyproject/galaxy" PROJECT_AUTHOR = 'Galaxy Project and Community' PROJECT_DESCRIPTION = 'Galaxy Generic Utilities' -PROJECT_EMAIL = 'jmchilton@gmail.com' +PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org' RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( PROJECT_USERAME, PROJECT_NAME ) diff --git a/scripts/tool_shed/build_ts_whoosh_index.py b/scripts/tool_shed/build_ts_whoosh_index.py index 41ce98e83ce..541b199965f 100644 --- a/scripts/tool_shed/build_ts_whoosh_index.py +++ b/scripts/tool_shed/build_ts_whoosh_index.py @@ -24,7 +24,7 @@ from whoosh.filedb.filestore import FileStorage sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'lib'))) import galaxy.webapps.tool_shed.model.mapping -from galaxy.tools.loader_directory import load_tool_elements_from_path +from galaxy.tool_util.loader_directory import load_tool_elements_from_path from galaxy.util import ( directory_hash_id, pretty_print_time_interval, diff --git a/test/unit/tools/test_parsing.py b/test/unit/tools/test_parsing.py index 168bd09f0fd..dcce2145c94 100644 --- a/test/unit/tools/test_parsing.py +++ b/test/unit/tools/test_parsing.py @@ -12,6 +12,9 @@ from galaxy.util import galaxy_directory TOOL_XML_1 = """