mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #8298 from jmchilton/selenium_package
Create galaxy-selenium package.
This commit is contained in:
@@ -98,7 +98,7 @@ class SelectorTemplate(Target):
|
||||
if name in self._children:
|
||||
return self._children[name](**{"_": self.selector})
|
||||
else:
|
||||
raise KeyError("Could not find child [%s] in %s" % (name, self._children))
|
||||
raise AttributeError("Could not find child [%s] in %s" % (name, self._children))
|
||||
|
||||
__getitem__ = __getattr__
|
||||
|
||||
@@ -193,7 +193,7 @@ class Component(object):
|
||||
elif attr in self._text:
|
||||
return self._text[attr]
|
||||
else:
|
||||
raise Exception("Failed to find referenced sub-component/selector/label/text [%s]" % attr)
|
||||
raise AttributeError("Failed to find referenced sub-component/selector/label/text [%s]" % attr)
|
||||
|
||||
__getitem__ = __getattr__
|
||||
|
||||
@@ -5,9 +5,7 @@ import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'test')))
|
||||
|
||||
from galaxy_selenium import cli
|
||||
from galaxy.selenium import cli
|
||||
|
||||
DESCRIPTION = "Walk a Galaxy tour and dump screenshots."
|
||||
|
||||
@@ -8,7 +8,7 @@ class SmartComponent(object):
|
||||
"""Wrap a Component with driver aware methods.
|
||||
|
||||
Allows smarter selectors that know how to wait for themselves, test themselves,
|
||||
click themselvers, etc.... More "magic", but much cleaner usage.
|
||||
click themselves, etc.... More "magic", but much cleaner usage.
|
||||
"""
|
||||
|
||||
def __init__(self, component, has_driver):
|
||||
@@ -0,0 +1,12 @@
|
||||
.. :changelog:
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
.. to_doc
|
||||
|
||||
---------------------
|
||||
19.9.0.dev0
|
||||
---------------------
|
||||
|
||||
* Initial import from dev branch of Galaxy during 19.09 development cycle.
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../LICENSE.txt
|
||||
@@ -0,0 +1,2 @@
|
||||
include *.rst LICENSE
|
||||
include galaxy/selenium/*yml
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../package.Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
.. image:: https://badge.fury.io/py/galaxy-selenium.svg
|
||||
:target: https://pypi.org/project/galaxy-selenium/
|
||||
|
||||
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
The Galaxy_ selenium framework.
|
||||
|
||||
* Free software: Academic Free License version 3.0
|
||||
* Code: https://github.com/galaxyproject/galaxy
|
||||
|
||||
.. _Galaxy: http://galaxyproject.org/
|
||||
+1
@@ -0,0 +1 @@
|
||||
../package-dev-requirements.txt
|
||||
@@ -0,0 +1 @@
|
||||
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
||||
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__version__ = '19.9.0.dev0'
|
||||
|
||||
PROJECT_NAME = "galaxy-selenium"
|
||||
PROJECT_OWNER = PROJECT_USERAME = "galaxyproject"
|
||||
PROJECT_URL = "https://github.com/galaxyproject/galaxy"
|
||||
PROJECT_AUTHOR = 'Galaxy Project and Community'
|
||||
PROJECT_DESCRIPTION = 'Galaxy Selenium Interaction Framework'
|
||||
PROJECT_EMAIL = 'galaxy-committers@lists.galaxyproject.org'
|
||||
RAW_CONTENT_URL = "https://raw.github.com/%s/%s/master/" % (
|
||||
PROJECT_USERAME, PROJECT_NAME
|
||||
)
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../../lib/galaxy/selenium/
|
||||
@@ -0,0 +1,2 @@
|
||||
galaxy-util
|
||||
selenium
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../build_scripts
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../setup.cfg
|
||||
@@ -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.selenium',
|
||||
'galaxy.selenium.scripts',
|
||||
]
|
||||
ENTRY_POINTS = '''
|
||||
[console_scripts]
|
||||
gx-dump-tour=galaxy.selenium.scripts.dump_tour:main
|
||||
'''
|
||||
PACKAGE_DATA = {
|
||||
# Be sure to update MANIFEST.in for source dist.
|
||||
'galaxy': [
|
||||
'selenium/*yml',
|
||||
],
|
||||
}
|
||||
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
|
||||
)
|
||||
@@ -24,10 +24,10 @@ from base import populators # noqa: I100,I202
|
||||
from base.api import UsesApiTestCaseMixin # noqa: I100
|
||||
from base.driver_util import classproperty, DEFAULT_WEB_HOST, get_ip_address # noqa: I100
|
||||
from base.testcase import FunctionalTestCase # noqa: I100
|
||||
from galaxy_selenium import ( # noqa: I100,I201
|
||||
from galaxy.selenium import ( # noqa: I100,I201
|
||||
driver_factory,
|
||||
)
|
||||
from galaxy_selenium.navigates_galaxy import ( # noqa: I100
|
||||
from galaxy.selenium.navigates_galaxy import ( # noqa: I100
|
||||
NavigatesGalaxy,
|
||||
retry_during_transitions
|
||||
)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
from galaxy_selenium.navigates_galaxy import (
|
||||
from galaxy.selenium.navigates_galaxy import (
|
||||
exception_indicates_not_clickable,
|
||||
exception_seems_to_indicate_transition,
|
||||
)
|
||||
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SeleniumTestCase,
|
||||
|
||||
@@ -2,8 +2,8 @@ import json
|
||||
|
||||
from base import rules_test_data
|
||||
from base.populators import flakey, load_data_dict
|
||||
from galaxy_selenium.navigates_galaxy import retry_call_during_transitions
|
||||
|
||||
from galaxy.selenium.navigates_galaxy import retry_call_during_transitions
|
||||
from .framework import (
|
||||
managed_history,
|
||||
retry_assertion_during_transitions,
|
||||
|
||||
Reference in New Issue
Block a user