From db68ac271dceba2dc3983c255e239ea5ba44f257 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 24 Jun 2022 08:55:39 -0400 Subject: [PATCH] Decouple galaxy-app and galaxy-selenium. That was a lazy shortcut on my part and should have never happened. This resolves that and also another task on my todo list of making an easily pip installable, lightweight way of getting access to the tours validation script at the same time by restructuring packages and cleaning up the dependency structure. The navigation piece of galaxy-selenium has been split out of into its own package and tours now depend on that directly. In order to have that lightweight access to the tour validation code - tours have also been split out of app. This will also encourage that package to continue to be decoupled nicely from the larger galaxy-app package. --- lib/galaxy/navigation/__init__.py | 0 .../{selenium => navigation}/components.py | 0 lib/galaxy/{selenium => navigation}/data.py | 0 .../{selenium => navigation}/navigation.yml | 0 lib/galaxy/selenium/navigates_galaxy.py | 8 ++-- lib/galaxy/selenium/smart_components.py | 2 +- lib/galaxy/tours/_impl.py | 2 +- lib/galaxy/tours/validate.py | 2 +- packages/app/galaxy/tours | 1 - packages/app/setup.cfg | 2 +- packages/navigation/HISTORY.rst | 11 +++++ packages/navigation/LICENSE.txt | 1 + packages/navigation/MANIFEST.in | 2 + packages/navigation/Makefile | 1 + packages/navigation/README.rst | 17 +++++++ packages/navigation/dev-requirements.txt | 1 + packages/navigation/galaxy/__init__.py | 1 + packages/navigation/galaxy/navigation | 1 + packages/navigation/mypy.ini | 1 + packages/navigation/pyproject.toml | 1 + packages/navigation/scripts | 1 + packages/navigation/setup.cfg | 41 +++++++++++++++++ packages/navigation/test-requirements.txt | 1 + packages/selenium/MANIFEST.in | 1 - packages/selenium/setup.cfg | 2 +- packages/test.sh | 5 +- packages/tours/HISTORY.rst | 11 +++++ packages/tours/LICENSE.txt | 1 + packages/tours/MANIFEST.in | 1 + packages/tours/Makefile | 1 + packages/tours/README.rst | 17 +++++++ packages/tours/dev-requirements.txt | 1 + packages/tours/galaxy/__init__.py | 1 + packages/tours/galaxy/tours | 1 + packages/tours/mypy.ini | 1 + packages/tours/pyproject.toml | 1 + packages/tours/scripts | 1 + packages/tours/setup.cfg | 46 +++++++++++++++++++ packages/tours/test-requirements.txt | 1 + 39 files changed, 177 insertions(+), 12 deletions(-) create mode 100644 lib/galaxy/navigation/__init__.py rename lib/galaxy/{selenium => navigation}/components.py (100%) rename lib/galaxy/{selenium => navigation}/data.py (100%) rename lib/galaxy/{selenium => navigation}/navigation.yml (100%) delete mode 120000 packages/app/galaxy/tours create mode 100644 packages/navigation/HISTORY.rst create mode 120000 packages/navigation/LICENSE.txt create mode 100644 packages/navigation/MANIFEST.in create mode 120000 packages/navigation/Makefile create mode 100644 packages/navigation/README.rst create mode 120000 packages/navigation/dev-requirements.txt create mode 100644 packages/navigation/galaxy/__init__.py create mode 120000 packages/navigation/galaxy/navigation create mode 120000 packages/navigation/mypy.ini create mode 120000 packages/navigation/pyproject.toml create mode 120000 packages/navigation/scripts create mode 100644 packages/navigation/setup.cfg create mode 100644 packages/navigation/test-requirements.txt create mode 100644 packages/tours/HISTORY.rst create mode 120000 packages/tours/LICENSE.txt create mode 100644 packages/tours/MANIFEST.in create mode 120000 packages/tours/Makefile create mode 100644 packages/tours/README.rst create mode 120000 packages/tours/dev-requirements.txt create mode 100644 packages/tours/galaxy/__init__.py create mode 120000 packages/tours/galaxy/tours create mode 120000 packages/tours/mypy.ini create mode 120000 packages/tours/pyproject.toml create mode 120000 packages/tours/scripts create mode 100644 packages/tours/setup.cfg create mode 100644 packages/tours/test-requirements.txt diff --git a/lib/galaxy/navigation/__init__.py b/lib/galaxy/navigation/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/galaxy/selenium/components.py b/lib/galaxy/navigation/components.py similarity index 100% rename from lib/galaxy/selenium/components.py rename to lib/galaxy/navigation/components.py diff --git a/lib/galaxy/selenium/data.py b/lib/galaxy/navigation/data.py similarity index 100% rename from lib/galaxy/selenium/data.py rename to lib/galaxy/navigation/data.py diff --git a/lib/galaxy/selenium/navigation.yml b/lib/galaxy/navigation/navigation.yml similarity index 100% rename from lib/galaxy/selenium/navigation.yml rename to lib/galaxy/navigation/navigation.yml diff --git a/lib/galaxy/selenium/navigates_galaxy.py b/lib/galaxy/selenium/navigates_galaxy.py index 70877897527..87522cfe61a 100644 --- a/lib/galaxy/selenium/navigates_galaxy.py +++ b/lib/galaxy/selenium/navigates_galaxy.py @@ -26,13 +26,13 @@ import yaml from selenium.webdriver.common.keys import Keys from selenium.webdriver.remote.webdriver import WebDriver -from galaxy.util import DEFAULT_SOCKET_TIMEOUT -from . import sizzle -from .components import ( +from galaxy.navigation.components import ( Component, HasText, ) -from .data import load_root_component +from galaxy.navigation.data import load_root_component +from galaxy.util import DEFAULT_SOCKET_TIMEOUT +from . import sizzle from .has_driver import ( exception_indicates_click_intercepted, exception_indicates_not_clickable, diff --git a/lib/galaxy/selenium/smart_components.py b/lib/galaxy/selenium/smart_components.py index 7e0d9917533..45e95db3e20 100644 --- a/lib/galaxy/selenium/smart_components.py +++ b/lib/galaxy/selenium/smart_components.py @@ -1,4 +1,4 @@ -from .components import ( +from galaxy.navigation.components import ( Component, Target, ) diff --git a/lib/galaxy/tours/_impl.py b/lib/galaxy/tours/_impl.py index c2063ecb81b..d3b4001ed5b 100644 --- a/lib/galaxy/tours/_impl.py +++ b/lib/galaxy/tours/_impl.py @@ -12,7 +12,7 @@ import yaml from pydantic import parse_obj_as from galaxy.exceptions import ObjectNotFound -from galaxy.selenium.data import load_root_component +from galaxy.navigation.data import load_root_component from galaxy.util import config_directories_from_setting from ._interface import ToursRegistry from ._schema import TourList diff --git a/lib/galaxy/tours/validate.py b/lib/galaxy/tours/validate.py index 494b135885a..b12d9028b55 100644 --- a/lib/galaxy/tours/validate.py +++ b/lib/galaxy/tours/validate.py @@ -4,7 +4,7 @@ import sys import yaml from pydantic.error_wrappers import ValidationError -from galaxy.selenium.data import load_root_component +from galaxy.navigation.data import load_root_component from ._impl import ( get_tour_id_from_path, load_tour_from_path, diff --git a/packages/app/galaxy/tours b/packages/app/galaxy/tours deleted file mode 120000 index 4cb21b13e3a..00000000000 --- a/packages/app/galaxy/tours +++ /dev/null @@ -1 +0,0 @@ -../../../lib/galaxy/tours \ No newline at end of file diff --git a/packages/app/setup.cfg b/packages/app/setup.cfg index 929d77f69a7..27684524450 100644 --- a/packages/app/setup.cfg +++ b/packages/app/setup.cfg @@ -38,8 +38,8 @@ install_requires = galaxy-job-execution galaxy-job-metrics galaxy-objectstore - galaxy-selenium galaxy-tool-util[cwl,edam] + galaxy-tours galaxy-util galaxy-web-framework galaxy-web-stack diff --git a/packages/navigation/HISTORY.rst b/packages/navigation/HISTORY.rst new file mode 100644 index 00000000000..540126d3377 --- /dev/null +++ b/packages/navigation/HISTORY.rst @@ -0,0 +1,11 @@ +History +------- + +.. to_doc + +--------------------- +22.9.0.dev0 +--------------------- + +* First release from the 22.09 branch of Galaxy. + diff --git a/packages/navigation/LICENSE.txt b/packages/navigation/LICENSE.txt new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/packages/navigation/LICENSE.txt @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/packages/navigation/MANIFEST.in b/packages/navigation/MANIFEST.in new file mode 100644 index 00000000000..c3ba588cb08 --- /dev/null +++ b/packages/navigation/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst *.txt LICENSE +include galaxy/navigation/*yml diff --git a/packages/navigation/Makefile b/packages/navigation/Makefile new file mode 120000 index 00000000000..37af8bae5ba --- /dev/null +++ b/packages/navigation/Makefile @@ -0,0 +1 @@ +../package.Makefile \ No newline at end of file diff --git a/packages/navigation/README.rst b/packages/navigation/README.rst new file mode 100644 index 00000000000..f85be59e7e8 --- /dev/null +++ b/packages/navigation/README.rst @@ -0,0 +1,17 @@ + +.. image:: https://badge.fury.io/py/galaxy-naivgation.svg + :target: https://pypi.org/project/galaxy-naivgation/ + + + +Overview +-------- + +The Galaxy_ client DOM navigation framework. + +Navigation data that feeds tours generation, Jest testing, and Selenium testing. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/packages/navigation/dev-requirements.txt b/packages/navigation/dev-requirements.txt new file mode 120000 index 00000000000..467b90d7a23 --- /dev/null +++ b/packages/navigation/dev-requirements.txt @@ -0,0 +1 @@ +../package-dev-requirements.txt \ No newline at end of file diff --git a/packages/navigation/galaxy/__init__.py b/packages/navigation/galaxy/__init__.py new file mode 100644 index 00000000000..8db66d3d0f0 --- /dev/null +++ b/packages/navigation/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/packages/navigation/galaxy/navigation b/packages/navigation/galaxy/navigation new file mode 120000 index 00000000000..f93cdf68b19 --- /dev/null +++ b/packages/navigation/galaxy/navigation @@ -0,0 +1 @@ +../../../lib/galaxy/navigation \ No newline at end of file diff --git a/packages/navigation/mypy.ini b/packages/navigation/mypy.ini new file mode 120000 index 00000000000..141a30f41af --- /dev/null +++ b/packages/navigation/mypy.ini @@ -0,0 +1 @@ +../../mypy.ini \ No newline at end of file diff --git a/packages/navigation/pyproject.toml b/packages/navigation/pyproject.toml new file mode 120000 index 00000000000..01a3b08b887 --- /dev/null +++ b/packages/navigation/pyproject.toml @@ -0,0 +1 @@ +../package-pyproject.toml \ No newline at end of file diff --git a/packages/navigation/scripts b/packages/navigation/scripts new file mode 120000 index 00000000000..9aec9dc5a06 --- /dev/null +++ b/packages/navigation/scripts @@ -0,0 +1 @@ +../build_scripts \ No newline at end of file diff --git a/packages/navigation/setup.cfg b/packages/navigation/setup.cfg new file mode 100644 index 00000000000..9caab3cfb17 --- /dev/null +++ b/packages/navigation/setup.cfg @@ -0,0 +1,41 @@ +[metadata] +author = Galaxy Project and Community +author_email = galaxy-committers@lists.galaxyproject.org +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Console + Intended Audience :: Developers + License :: OSI Approved :: Academic Free License (AFL) + Natural Language :: English + Operating System :: POSIX + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Topic :: Software Development + Topic :: Software Development :: Code Generators + Topic :: Software Development :: Testing +description = Galaxy client DOM navigation framework +keywords = + Galaxy +license = AFL +license_files = + LICENSE +long_description = file: README.rst, HISTORY.rst +long_description_content_type = text/x-rst +name = galaxy-navigation +url = https://github.com/galaxyproject/galaxy +version = 22.5.0.dev0 + +[options] +include_package_data = True +install_requires = + galaxy-util + PyYAML +packages = find: +python_requires = >=3.7 + +[options.packages.find] +exclude = + tests* diff --git a/packages/navigation/test-requirements.txt b/packages/navigation/test-requirements.txt new file mode 100644 index 00000000000..e079f8a6038 --- /dev/null +++ b/packages/navigation/test-requirements.txt @@ -0,0 +1 @@ +pytest diff --git a/packages/selenium/MANIFEST.in b/packages/selenium/MANIFEST.in index 122439171cf..8393a3b8e2a 100644 --- a/packages/selenium/MANIFEST.in +++ b/packages/selenium/MANIFEST.in @@ -1,2 +1 @@ include *.rst *.txt LICENSE -include galaxy/selenium/*yml diff --git a/packages/selenium/setup.cfg b/packages/selenium/setup.cfg index 66d3fda334d..f25aa4a2a4a 100644 --- a/packages/selenium/setup.cfg +++ b/packages/selenium/setup.cfg @@ -31,7 +31,7 @@ version = 22.5.0.dev0 [options] include_package_data = True install_requires = - galaxy-util + galaxy-data PyYAML requests selenium diff --git a/packages/test.sh b/packages/test.sh index f955e341bb6..f56d605d7fa 100755 --- a/packages/test.sh +++ b/packages/test.sh @@ -17,7 +17,8 @@ virtualenv -p "$TEST_PYTHON" "$TEST_ENV_DIR" pip install --upgrade pip setuptools wheel pip install -r../lib/galaxy/dependencies/pinned-lint-requirements.txt -# ensure ordered by dependency dag +# ensure ordered by dependency DAG +# TODO: add selenium in once type issues are cleared up PACKAGE_DIRS=( util objectstore @@ -30,6 +31,8 @@ PACKAGE_DIRS=( auth web_stack web_framework + navigation + tours app webapps test_base diff --git a/packages/tours/HISTORY.rst b/packages/tours/HISTORY.rst new file mode 100644 index 00000000000..540126d3377 --- /dev/null +++ b/packages/tours/HISTORY.rst @@ -0,0 +1,11 @@ +History +------- + +.. to_doc + +--------------------- +22.9.0.dev0 +--------------------- + +* First release from the 22.09 branch of Galaxy. + diff --git a/packages/tours/LICENSE.txt b/packages/tours/LICENSE.txt new file mode 120000 index 00000000000..1ef648f64b3 --- /dev/null +++ b/packages/tours/LICENSE.txt @@ -0,0 +1 @@ +../../LICENSE.txt \ No newline at end of file diff --git a/packages/tours/MANIFEST.in b/packages/tours/MANIFEST.in new file mode 100644 index 00000000000..8393a3b8e2a --- /dev/null +++ b/packages/tours/MANIFEST.in @@ -0,0 +1 @@ +include *.rst *.txt LICENSE diff --git a/packages/tours/Makefile b/packages/tours/Makefile new file mode 120000 index 00000000000..37af8bae5ba --- /dev/null +++ b/packages/tours/Makefile @@ -0,0 +1 @@ +../package.Makefile \ No newline at end of file diff --git a/packages/tours/README.rst b/packages/tours/README.rst new file mode 100644 index 00000000000..21d1c841ae8 --- /dev/null +++ b/packages/tours/README.rst @@ -0,0 +1,17 @@ + +.. image:: https://badge.fury.io/py/galaxy-tours.svg + :target: https://pypi.org/project/galaxy-tours/ + + +Overview +-------- + +The Galaxy_ tours backend framework. + +This package includes models, utilities for reading tours from disk, and +tour validation scripting. + +* Free software: Academic Free License version 3.0 +* Code: https://github.com/galaxyproject/galaxy + +.. _Galaxy: http://galaxyproject.org/ diff --git a/packages/tours/dev-requirements.txt b/packages/tours/dev-requirements.txt new file mode 120000 index 00000000000..467b90d7a23 --- /dev/null +++ b/packages/tours/dev-requirements.txt @@ -0,0 +1 @@ +../package-dev-requirements.txt \ No newline at end of file diff --git a/packages/tours/galaxy/__init__.py b/packages/tours/galaxy/__init__.py new file mode 100644 index 00000000000..8db66d3d0f0 --- /dev/null +++ b/packages/tours/galaxy/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/packages/tours/galaxy/tours b/packages/tours/galaxy/tours new file mode 120000 index 00000000000..dfd863822b2 --- /dev/null +++ b/packages/tours/galaxy/tours @@ -0,0 +1 @@ +../../../lib/galaxy/tours/ \ No newline at end of file diff --git a/packages/tours/mypy.ini b/packages/tours/mypy.ini new file mode 120000 index 00000000000..141a30f41af --- /dev/null +++ b/packages/tours/mypy.ini @@ -0,0 +1 @@ +../../mypy.ini \ No newline at end of file diff --git a/packages/tours/pyproject.toml b/packages/tours/pyproject.toml new file mode 120000 index 00000000000..01a3b08b887 --- /dev/null +++ b/packages/tours/pyproject.toml @@ -0,0 +1 @@ +../package-pyproject.toml \ No newline at end of file diff --git a/packages/tours/scripts b/packages/tours/scripts new file mode 120000 index 00000000000..9aec9dc5a06 --- /dev/null +++ b/packages/tours/scripts @@ -0,0 +1 @@ +../build_scripts \ No newline at end of file diff --git a/packages/tours/setup.cfg b/packages/tours/setup.cfg new file mode 100644 index 00000000000..5181c6a1ad4 --- /dev/null +++ b/packages/tours/setup.cfg @@ -0,0 +1,46 @@ +[metadata] +author = Galaxy Project and Community +author_email = galaxy-committers@lists.galaxyproject.org +classifiers = + Development Status :: 5 - Production/Stable + Environment :: Console + Intended Audience :: Developers + License :: OSI Approved :: Academic Free License (AFL) + Natural Language :: English + Operating System :: POSIX + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Topic :: Software Development + Topic :: Software Development :: Code Generators + Topic :: Software Development :: Testing +description = Galaxy tours backend framework +keywords = + Galaxy +license = AFL +license_files = + LICENSE +long_description = file: README.rst, HISTORY.rst +long_description_content_type = text/x-rst +name = galaxy-tours +url = https://github.com/galaxyproject/galaxy +version = 22.5.0.dev0 + +[options] +include_package_data = True +install_requires = + galaxy-navigation + pydantic + PyYAML +packages = find: +python_requires = >=3.7 + +[options.entry_points] +console_scripts = + gx-validate-tours = galaxy.tours.validate:main + +[options.packages.find] +exclude = + tests* diff --git a/packages/tours/test-requirements.txt b/packages/tours/test-requirements.txt new file mode 100644 index 00000000000..e079f8a6038 --- /dev/null +++ b/packages/tours/test-requirements.txt @@ -0,0 +1 @@ +pytest