diff --git a/.gitignore b/.gitignore index b71434a1d6d..8125c005c6d 100644 --- a/.gitignore +++ b/.gitignore @@ -150,6 +150,11 @@ client/styleguide # webpack stats client/webpack-stats.json +# Projects +projects/*/build +projects/*/dist +projects/*/*.egg-info + # Misc *.orig .DS_Store diff --git a/lib/galaxy/util/__init__.py b/lib/galaxy/util/__init__.py index c6e7ca96b03..af175e18f46 100644 --- a/lib/galaxy/util/__init__.py +++ b/lib/galaxy/util/__init__.py @@ -1524,7 +1524,10 @@ galaxy_root_path = os.path.join(__path__[0], "..", "..", "..") def galaxy_directory(): - return os.path.abspath(galaxy_root_path) + root_path = os.path.abspath(galaxy_root_path) + if os.path.basename(root_path) == "projects": + root_path = os.path.abspath(os.path.join(root_path, "..")) + return root_path def config_directories_from_setting(directories_setting, galaxy_root=galaxy_root_path): diff --git a/projects/data/HISTORY.rst b/projects/data/HISTORY.rst new file mode 100644 index 00000000000..c49739afaf3 --- /dev/null +++ b/projects/data/HISTORY.rst @@ -0,0 +1,12 @@ +.. :changelog: + +History +------- + +.. to_doc + +--------------------- +19.5.0.dev0 +--------------------- + +* Initial import from dev branch of Galaxy during 19.05 release cycle. diff --git a/projects/data/LICENSE b/projects/data/LICENSE new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/projects/data/LICENSE @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/projects/data/MANIFEST.in b/projects/data/MANIFEST.in new file mode 100644 index 00000000000..2ef21241a5b --- /dev/null +++ b/projects/data/MANIFEST.in @@ -0,0 +1,3 @@ +include *.rst LICENSE +include galaxy/datatypes/test/* + diff --git a/projects/data/README.rst b/projects/data/README.rst new file mode 100644 index 00000000000..962fa16e2ea --- /dev/null +++ b/projects/data/README.rst @@ -0,0 +1,14 @@ + +.. image:: https://badge.fury.io/py/galaxy-datatypes.svg + :target: https://pypi.python.org/pypi/galaxy-datatypes/ + + +Overview +-------- + +The Galaxy_ models, datatype framework, and datatype implementations. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/projects/data/galaxy/__init__.py b/projects/data/galaxy/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/projects/data/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/projects/data/galaxy/datatypes b/projects/data/galaxy/datatypes new file mode 120000 index 00000000000..66d6a8bf663 --- /dev/null +++ b/projects/data/galaxy/datatypes @@ -0,0 +1 @@ +../../../lib/galaxy/datatypes \ No newline at end of file diff --git a/projects/data/galaxy/model b/projects/data/galaxy/model new file mode 120000 index 00000000000..531c6de0dd1 --- /dev/null +++ b/projects/data/galaxy/model @@ -0,0 +1 @@ +../../../lib/galaxy/model \ No newline at end of file diff --git a/projects/data/galaxy/project_galaxy_data.py b/projects/data/galaxy/project_galaxy_data.py new file mode 100644 index 00000000000..2dc2d71d64d --- /dev/null +++ b/projects/data/galaxy/project_galaxy_data.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +__version__ = '19.5.0.dev0' + +PROJECT_NAME = "galaxy-data" +PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" +PROJECT_URL = "https://github.com/galaxyproject/galaxy" +PROJECT_AUTHOR = 'Galaxy Project and Community' +PROJECT_EMAIL = 'jmchilton@gmail.com' +RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( + PROJECT_USERAME, PROJECT_NAME +) diff --git a/projects/data/galaxy/security b/projects/data/galaxy/security new file mode 120000 index 00000000000..c9ba3e1d73d --- /dev/null +++ b/projects/data/galaxy/security @@ -0,0 +1 @@ +../../../lib/galaxy/security \ No newline at end of file diff --git a/projects/data/requirements.txt b/projects/data/requirements.txt new file mode 100644 index 00000000000..67a3b0d0a59 --- /dev/null +++ b/projects/data/requirements.txt @@ -0,0 +1,12 @@ +galaxy-objectstore +galaxy-util +bx +h5py +isa-rwval +numpy +pycryptodome +pysam +social_auth_core +SQLAlchemy==1.2 +sqlalchemy-migrate +WebOb diff --git a/projects/data/setup.cfg b/projects/data/setup.cfg new file mode 120000 index 00000000000..eb7cf09393f --- /dev/null +++ b/projects/data/setup.cfg @@ -0,0 +1 @@ +../../setup.cfg \ No newline at end of file diff --git a/projects/data/setup.py b/projects/data/setup.py new file mode 100644 index 00000000000..edc4a51520f --- /dev/null +++ b/projects/data/setup.py @@ -0,0 +1,108 @@ +#!/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+(.*)') + +with open('%s/project_galaxy_data.py' % SOURCE_DIR, '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") + +TEST_DIR = 'tests' +PROJECT_DESCRIPTION = 'Galaxy Datatype Framework and Datatypes' +PACKAGES = [ + 'galaxy', + 'galaxy.datatypes', + 'galaxy.datatypes.dataproviders', + 'galaxy.datatypes.util', + 'galaxy.datatypes.test', + 'galaxy.model', + 'galaxy.model.migrate', + 'galaxy.model.orm', + 'galaxy.model.tool_shed_install', + 'galaxy.security', +] +ENTRY_POINTS = ''' + [console_scripts] +''' +PACKAGE_DATA = { + # Be sure to update MANIFEST.in for source dist. + 'galaxy': [ + 'datatypes/test/*', + ], +} +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, + 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.4', + '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/projects/data/tests/__init__.py b/projects/data/tests/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/projects/data/tests/datatypes b/projects/data/tests/datatypes new file mode 120000 index 00000000000..d01dc2e3776 --- /dev/null +++ b/projects/data/tests/datatypes @@ -0,0 +1 @@ +../../../test/unit/datatypes \ No newline at end of file diff --git a/projects/data/tests/test_galaxy_mapping.py b/projects/data/tests/test_galaxy_mapping.py new file mode 120000 index 00000000000..0cc477d90ee --- /dev/null +++ b/projects/data/tests/test_galaxy_mapping.py @@ -0,0 +1 @@ +../../../test/unit/test_galaxy_mapping.py \ No newline at end of file diff --git a/projects/data/tests/unittest_utils b/projects/data/tests/unittest_utils new file mode 120000 index 00000000000..6b6233367e6 --- /dev/null +++ b/projects/data/tests/unittest_utils @@ -0,0 +1 @@ +../../../test/unit/unittest_utils \ No newline at end of file diff --git a/projects/objectstore/HISTORY.rst b/projects/objectstore/HISTORY.rst new file mode 100644 index 00000000000..c49739afaf3 --- /dev/null +++ b/projects/objectstore/HISTORY.rst @@ -0,0 +1,12 @@ +.. :changelog: + +History +------- + +.. to_doc + +--------------------- +19.5.0.dev0 +--------------------- + +* Initial import from dev branch of Galaxy during 19.05 release cycle. diff --git a/projects/objectstore/LICENSE b/projects/objectstore/LICENSE new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/projects/objectstore/LICENSE @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/projects/objectstore/MANIFEST.in b/projects/objectstore/MANIFEST.in new file mode 100644 index 00000000000..2bf148a5764 --- /dev/null +++ b/projects/objectstore/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst LICENSE + diff --git a/projects/objectstore/README.rst b/projects/objectstore/README.rst new file mode 100644 index 00000000000..fa243ffe29b --- /dev/null +++ b/projects/objectstore/README.rst @@ -0,0 +1,14 @@ + +.. image:: https://badge.fury.io/py/galaxy-objectstore.svg + :target: https://pypi.python.org/pypi/galaxy-objectstore/ + + +Overview +-------- + +The Galaxy_ object store framework and default implementations. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/projects/objectstore/galaxy/__init__.py b/projects/objectstore/galaxy/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/projects/objectstore/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/projects/objectstore/galaxy/objectstore b/projects/objectstore/galaxy/objectstore new file mode 120000 index 00000000000..dd20803f056 --- /dev/null +++ b/projects/objectstore/galaxy/objectstore @@ -0,0 +1 @@ +../../../lib/galaxy/objectstore \ No newline at end of file diff --git a/projects/objectstore/galaxy/project_galaxy_objectstore.py b/projects/objectstore/galaxy/project_galaxy_objectstore.py new file mode 100644 index 00000000000..f64be773ba9 --- /dev/null +++ b/projects/objectstore/galaxy/project_galaxy_objectstore.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +__version__ = '19.5.0.dev0' + +PROJECT_NAME = "galaxy-objectstore" +PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" +PROJECT_URL = "https://github.com/galaxyproject/galaxy" +PROJECT_AUTHOR = 'Galaxy Project and Community' +PROJECT_EMAIL = 'jmchilton@gmail.com' +RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( + PROJECT_USERAME, PROJECT_NAME +) diff --git a/projects/objectstore/requirements.txt b/projects/objectstore/requirements.txt new file mode 100644 index 00000000000..623c4906bb2 --- /dev/null +++ b/projects/objectstore/requirements.txt @@ -0,0 +1 @@ +galaxy-util diff --git a/projects/objectstore/setup.cfg b/projects/objectstore/setup.cfg new file mode 120000 index 00000000000..eb7cf09393f --- /dev/null +++ b/projects/objectstore/setup.cfg @@ -0,0 +1 @@ +../../setup.cfg \ No newline at end of file diff --git a/projects/objectstore/setup.py b/projects/objectstore/setup.py new file mode 100644 index 00000000000..3b3d519ec0b --- /dev/null +++ b/projects/objectstore/setup.py @@ -0,0 +1,99 @@ +#!/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+(.*)') + +with open('%s/project_galaxy_objectstore.py' % SOURCE_DIR, '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") + +TEST_DIR = 'tests' +PROJECT_DESCRIPTION = 'Galaxy Datatype Framework and Datatypes' +PACKAGES = [ + 'galaxy', + 'galaxy.objectstore', +] +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, + 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.4', + '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/projects/objectstore/tests/test_objectstore.py b/projects/objectstore/tests/test_objectstore.py new file mode 120000 index 00000000000..0ef5a715802 --- /dev/null +++ b/projects/objectstore/tests/test_objectstore.py @@ -0,0 +1 @@ +../../../test/unit/test_objectstore.py \ No newline at end of file diff --git a/projects/util/HISTORY.rst b/projects/util/HISTORY.rst new file mode 100644 index 00000000000..c49739afaf3 --- /dev/null +++ b/projects/util/HISTORY.rst @@ -0,0 +1,12 @@ +.. :changelog: + +History +------- + +.. to_doc + +--------------------- +19.5.0.dev0 +--------------------- + +* Initial import from dev branch of Galaxy during 19.05 release cycle. diff --git a/projects/util/LICENSE b/projects/util/LICENSE new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/projects/util/LICENSE @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/projects/util/MANIFEST.in b/projects/util/MANIFEST.in new file mode 100644 index 00000000000..a3dd4013351 --- /dev/null +++ b/projects/util/MANIFEST.in @@ -0,0 +1,3 @@ +include *.rst LICENSE +include galaxy/util/docutils_template.txt +include galaxy/exceptions/error_codes.json diff --git a/projects/util/README.rst b/projects/util/README.rst new file mode 100644 index 00000000000..778c380a853 --- /dev/null +++ b/projects/util/README.rst @@ -0,0 +1,14 @@ + +.. image:: https://badge.fury.io/py/galaxy-util.svg + :target: https://pypi.python.org/pypi/galaxy-util/ + + +Overview +-------- + +The Galaxy_ utilities module. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/projects/util/galaxy/__init__.py b/projects/util/galaxy/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/projects/util/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/projects/util/galaxy/exceptions b/projects/util/galaxy/exceptions new file mode 120000 index 00000000000..594b036185a --- /dev/null +++ b/projects/util/galaxy/exceptions @@ -0,0 +1 @@ +../../../lib/galaxy/exceptions \ No newline at end of file diff --git a/projects/util/galaxy/project_galaxy_util.py b/projects/util/galaxy/project_galaxy_util.py new file mode 100644 index 00000000000..770df42ba3d --- /dev/null +++ b/projects/util/galaxy/project_galaxy_util.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- + +__version__ = '19.5.0.dev0' + +PROJECT_NAME = "galaxy-util" +PROJECT_OWNER = PROJECT_USERAME = "galaxyproject" +PROJECT_URL = "https://github.com/galaxyproject/galaxy" +PROJECT_AUTHOR = 'Galaxy Project and Community' +PROJECT_EMAIL = 'jmchilton@gmail.com' +RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % ( + PROJECT_USERAME, PROJECT_NAME +) diff --git a/projects/util/galaxy/util b/projects/util/galaxy/util new file mode 120000 index 00000000000..b4acbee88f7 --- /dev/null +++ b/projects/util/galaxy/util @@ -0,0 +1 @@ +../../../lib/galaxy/util \ No newline at end of file diff --git a/projects/util/requirements.txt b/projects/util/requirements.txt new file mode 100644 index 00000000000..3290e4ad496 --- /dev/null +++ b/projects/util/requirements.txt @@ -0,0 +1,9 @@ +bleach +boltons +bz2file; python_version < '3.3' +Cheetah3 +docutils +markupsafe +packaging +pyyaml +six>=1.9.0 diff --git a/projects/util/setup.cfg b/projects/util/setup.cfg new file mode 120000 index 00000000000..eb7cf09393f --- /dev/null +++ b/projects/util/setup.cfg @@ -0,0 +1 @@ +../../setup.cfg \ No newline at end of file diff --git a/projects/util/setup.py b/projects/util/setup.py new file mode 100644 index 00000000000..212c29cfda4 --- /dev/null +++ b/projects/util/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+(.*)') + +with open('%s/project_galaxy_util.py' % SOURCE_DIR, '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") + +TEST_DIR = 'tests' +PROJECT_DESCRIPTION = 'Galaxy Datatype Framework and Datatypes' +PACKAGES = [ + 'galaxy', + 'galaxy.util', + 'galaxy.util.logging', + 'galaxy.util.path', +] +ENTRY_POINTS = ''' + [console_scripts] +''' +PACKAGE_DATA = { + # Be sure to update MANIFEST.in for source dist. + 'galaxy': [ + 'util/docutils_template.txt', + 'exceptions/error_codes.json', + ], +} +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, + 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.4', + '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/projects/util/tests/test_utils.py b/projects/util/tests/test_utils.py new file mode 120000 index 00000000000..d81c3aa4ae7 --- /dev/null +++ b/projects/util/tests/test_utils.py @@ -0,0 +1 @@ +../../../test/unit/test_utils.py \ No newline at end of file diff --git a/test/unit/datatypes/test_data.py b/test/unit/datatypes/test_data.py index db0885dccb3..969916d57b9 100644 --- a/test/unit/datatypes/test_data.py +++ b/test/unit/datatypes/test_data.py @@ -2,10 +2,12 @@ Unit tests for base DataTypes. .. seealso:: galaxy.datatypes.data """ +import os from galaxy.datatypes.data import get_file_peek +from galaxy.util import galaxy_directory def test_get_file_peek(): # should get the first 5 lines of the file without a trailing newline character - assert get_file_peek('test-data/1.tabular', line_wrap=False) == 'chr22\t1000\tNM_17\nchr22\t2000\tNM_18\nchr10\t2200\tNM_10\nchr10\thap\ttest\nchr10\t1200\tNM_11' + assert get_file_peek(os.path.join(galaxy_directory(), 'test-data/1.tabular'), line_wrap=False) == 'chr22\t1000\tNM_17\nchr22\t2000\tNM_18\nchr10\t2200\tNM_10\nchr10\thap\ttest\nchr10\t1200\tNM_11'