Skip to content

Commit

Permalink
Merge branch 'dev' into name-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias authored Oct 21, 2023
2 parents 578049d + 84a07d7 commit 98b71a5
Show file tree
Hide file tree
Showing 1,090 changed files with 50,802 additions and 24,580 deletions.
1 change: 1 addition & 0 deletions .ci/flake8_ignorelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ database
doc/build
eggs
lib/galaxy/web/proxy/js/node_modules
lib/tool_shed/test/test_data/repos
static/maps
static/scripts
test/functional/tools/cwl_tools/v1.?/
Expand Down
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
# W503 is line breaks before binary operators, which has been reversed in PEP 8.
# D** are docstring linting - which we mostly ignore except D302. (Hopefully we will solve more over time).
ignore = B008,E203,E402,E501,W503,D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D204,D205,D206,D207,D208,D209,D210,D211,D300,D301,D400,D401,D402,D403,D412,D413
exclude = lib/tool_shed/test/test_data/repos
2 changes: 1 addition & 1 deletion .github/workflows/converter_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Run tests
run: |
mapfile -t TOOL_ARRAY < tool_list.txt
planemo test --galaxy_python_version ${{ matrix.python-version }} --galaxy_root 'galaxy root' "${TOOL_ARRAY[@]}"
planemo test --biocontainers --galaxy_python_version ${{ matrix.python-version }} --galaxy_root 'galaxy root' "${TOOL_ARRAY[@]}"
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
# poetry requires Python >=3.8, but lint requirements currently need
# to be generated with `pip freeze`` on the oldest Python version
# supported by Galaxy.
python-version: |
${{ matrix.python-version }}
3.8
- name: Update dependencies
run: |
python -m venv .venv
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.11']
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint_openapi_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
- name: Build typescript schema
run: make update-client-api-schema
working-directory: 'galaxy root'
- name: Diff...
run: git diff
working-directory: 'galaxy root'
- name: Check for changes
run: |
if [[ `git status --porcelain` ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup_selenium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install chromedriver
uses: mvdbeek/setup-chromedriver@chromedriver_puppeteer
uses: nanasess/setup-chromedriver@v2
44 changes: 44 additions & 0 deletions .github/workflows/test_galaxy_packages_for_pulsar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test Galaxy packages for Pulsar
on:
push:
paths-ignore:
- 'client/**'
- 'doc/**'
- 'lib/galaxy_test/selenium/**'
pull_request:
paths-ignore:
- 'client/**'
- 'doc/**'
- 'lib/galaxy_test/selenium/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7']
steps:
- uses: actions/checkout@v3
with:
path: 'galaxy root'
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dir
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('galaxy root/requirements.txt') }}
- name: Install Apptainer's singularity
uses: eWaterCycle/setup-apptainer@v2
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get -y install ffmpeg
- name: Install tox
run: pip install tox
- name: Run tests
run: tox -e test_galaxy_packages_for_pulsar
working-directory: 'galaxy root'
33 changes: 30 additions & 3 deletions .github/workflows/toolshed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ jobs:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7']
python-version: ['3.7', '3.11']
shed-api: ['v1', 'v2']
test-install-client: ['galaxy_api', 'standalone']
services:
postgres:
image: postgres:13
Expand All @@ -34,6 +37,11 @@ jobs:
- uses: actions/checkout@v3
with:
path: 'galaxy root'
- uses: actions/setup-node@v3
with:
node-version: '18.12.1'
cache: 'yarn'
cache-dependency-path: 'galaxy root/client/yarn.lock'
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -52,11 +60,30 @@ jobs:
with:
path: 'galaxy root/.venv'
key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-toolshed
- name: Install dependencies
run: ./scripts/common_startup.sh --skip-client-build
working-directory: 'galaxy root'
- name: Build Frontend
run: |
. .venv/bin/activate
cd lib/tool_shed/webapp/frontend
yarn
make client
working-directory: 'galaxy root'
- name: Install playwright
run: |
. .venv/bin/activate
playwright install
working-directory: 'galaxy root'
- name: Run tests
run: './run_tests.sh -toolshed'
run: ./run_tests.sh -toolshed
env:
TOOL_SHED_TEST_INSTALL_CLIENT: ${{ matrix.test-install-client }}
TOOL_SHED_API_VERSION: ${{ matrix.shed-api }}
TOOL_SHED_TEST_BROWSER: ${{ matrix.shed-api == 'v1' && 'twill' || 'playwright' }}
working-directory: 'galaxy root'
- uses: actions/upload-artifact@v3
if: failure()
with:
name: Toolshed test results (${{ matrix.python-version }})
name: Toolshed test results (${{ matrix.python-version }}, ${{ matrix.shed-api }}, ${{ matrix.test-install-client }})
path: 'galaxy root/run_toolshed_tests.html'
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ profile=black
reverse_relative=true
skip_gitignore=true
# Make isort run faster by skipping database
skip_glob=database/*
skip_glob=database/*,lib/tool_shed/test/test_data/repos/*
src_paths=lib
3 changes: 3 additions & 0 deletions .redocly.lint-ignore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ _schema.yaml:
#/paths/~1api~1histories~1{history_id}~1contents~1{history_content_id}~1metadata_file
- '#/paths/~1api~1histories~1{history_id}~1contents~1{id}~1validate'
- '#/paths/~1api~1histories~1{history_id}~1contents~1{type}s~1{id}'
_shed_schema.yaml:
no-empty-servers:
- '#/openapi'
41 changes: 41 additions & 0 deletions .vscode/shed.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"shedcomp": {
"prefix": "shed_component",
"body": [
"<script setup lang=\"ts\">",
"\t$0",
"</script>",
"<template>",
"</template>"
],
"description": "outline of a tool shed component"
},
"shedpage": {
"prefix": "shed_page",
"body": [
"<script setup lang=\"ts\">",
"import PageContainer from \"@/components/PageContainer.vue\"",
"</script>",
"<template>",
" <page-container>",
" $0",
" </page-container>",
"</template>"
],
"description": "outline of a tool shed page"
},
"shedfetcher": {
"prefix": "shed_fetcher",
"body": [
"import { fetcher } from \"@/schema\"",
"const fetcher = fetcher.path(\"$1\").method(\"get\").create()"
],
"description": "Import shed fetcher and instantiate with a path"
},
"shedrouter": {
"prefix": "shed_router",
"body": [
"import router from \"@/router\""
]
}
}
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ release-bootstrap-history: ## bootstrap history for a new release
update-lint-requirements:
./lib/galaxy/dependencies/update_lint_requirements.sh

update-dependencies: update-lint-requirements ## update pinned and dev dependencies
update-dependencies: update-lint-requirements ## update pinned, dev and typecheck dependencies
$(IN_VENV) ./lib/galaxy/dependencies/update.sh

$(CWL_TARGETS):
Expand Down Expand Up @@ -182,17 +182,22 @@ endif

build-api-schema:
$(IN_VENV) python scripts/dump_openapi_schema.py _schema.yaml
$(IN_VENV) python scripts/dump_openapi_schema.py --app shed _shed_schema.yaml

remove-api-schema:
rm _schema.yaml
rm _shed_schema.yaml

update-client-api-schema: client-node-deps build-api-schema
$(IN_VENV) cd client && node openapi_to_schema.mjs ../_schema.yaml > src/schema/schema.ts && npx prettier --write src/schema/schema.ts
$(IN_VENV) cd client && node openapi_to_schema.mjs ../_shed_schema.yaml > ../lib/tool_shed/webapp/frontend/src/schema/schema.ts && npx prettier --write ../lib/tool_shed/webapp/frontend/src/schema/schema.ts
$(MAKE) remove-api-schema

lint-api-schema: build-api-schema
$(IN_VENV) npx --yes @redocly/cli lint _schema.yaml
$(IN_VENV) npx --yes @redocly/cli lint _shed_schema.yaml
$(IN_VENV) codespell -I .ci/ignore-spelling.txt _schema.yaml
$(IN_VENV) codespell -I .ci/ignore-spelling.txt _shed_schema.yaml
$(MAKE) remove-api-schema

update-navigation-schema: client-node-deps
Expand All @@ -210,7 +215,10 @@ client-production: client-node-deps ## Rebuild client-side artifacts for a produ
client-production-maps: client-node-deps ## Rebuild client-side artifacts for a production deployment with sourcemaps.
$(IN_VENV) cd client && $(NODE_ENV) yarn run build-production-maps

client-format: client-node-deps ## Reformat client code
client-lint-autofix: client-node-deps ## Automatically fix linting errors in client code
$(IN_VENV) cd client && yarn run eslint --quiet --fix

client-format: client-node-deps client-lint-autofix ## Reformat client code, ensures autofixes are applied first
$(IN_VENV) cd client && yarn run format

client-dev-server: client-node-deps ## Starts a webpack dev server for client development (HMR enabled)
Expand Down
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"browserslist": [
"defaults",
"not op_mini all"
"not op_mini all",
"not ios_saf <= 15.0"
],
"resolutions": {
"chokidar": "3.5.3",
Expand Down
11 changes: 0 additions & 11 deletions client/src/bundleToolshed.js

This file was deleted.

4 changes: 2 additions & 2 deletions client/src/components/AboutGalaxy.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ExternalLink from "@/components/ExternalLink.vue";
import License from "@/components/License/License.vue";
import UtcDate from "@/components/UtcDate.vue";
const { config, isLoaded } = useConfig();
const { config, isConfigLoaded } = useConfig();
const clientBuildDate = __buildTimestamp__ || new Date().toISOString();
const apiDocsLink = `${getAppRoot()}api/docs`;
Expand All @@ -27,7 +27,7 @@ const versionUserDocumentationUrl = computed(() => {
</script>

<template>
<div v-if="isLoaded" class="about-galaxy">
<div v-if="isConfigLoaded" class="about-galaxy">
<Heading h1 :icon="['gxd', 'galaxyLogo']" size="xl">About This Galaxy</Heading>
<div>
<!-- Galaxy version (detailed), with a link to the release notes -->
Expand Down
12 changes: 3 additions & 9 deletions client/src/components/ActivityBar/ActivityBar.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createTestingPinia } from "@pinia/testing";
import { shallowMount } from "@vue/test-utils";
import { PiniaVuePlugin } from "pinia";
import { getLocalVue } from "tests/jest/helpers";
import { dispatchEvent, getLocalVue } from "tests/jest/helpers";

import { useConfig } from "@/composables/config";
import { useActivityStore } from "@/stores/activityStore";
Expand All @@ -12,7 +12,7 @@ import mountTarget from "./ActivityBar.vue";
jest.mock("composables/config");
useConfig.mockReturnValue({
config: {},
isLoaded: true,
isConfigLoaded: true,
});

jest.mock("vue-router/composables", () => ({
Expand All @@ -37,12 +37,6 @@ function testActivity(id, newOptions = {}) {
return { ...defaultOptions, ...newOptions };
}

const createBubbledEvent = (type, props = {}) => {
const event = new Event(type, { bubbles: true });
Object.assign(event, props);
return event;
};

describe("ActivityBar", () => {
let activityStore;
let eventStore;
Expand Down Expand Up @@ -74,7 +68,7 @@ describe("ActivityBar", () => {
name: "workflow-name",
});
const bar = wrapper.find("[data-description='activity bar']");
bar.element.dispatchEvent(createBubbledEvent("dragenter", { clientX: 0, clientY: 0 }));
dispatchEvent(bar, "dragenter");
const emittedEvent = wrapper.emitted()["dragstart"][0][0];
expect(emittedEvent.to).toBe("/workflows/run?id=workflow-id");
});
Expand Down
8 changes: 4 additions & 4 deletions client/src/components/ActivityBar/ActivityBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import NotificationItem from "./Items/NotificationItem.vue";
import UploadItem from "./Items/UploadItem.vue";
import ContextMenu from "@/components/Common/ContextMenu.vue";
import FlexPanel from "@/components/Panels/FlexPanel.vue";
import ToolBox from "@/components/Panels/ProviderAwareToolBox.vue";
import ToolPanel from "@/components/Panels/ToolPanel.vue";
import WorkflowBox from "@/components/Panels/WorkflowBox.vue";
const { config } = useConfig();
const { config, isConfigLoaded } = useConfig();
const route = useRoute();
const userStore = useUserStore();
Expand Down Expand Up @@ -193,7 +193,7 @@ function toggleContextMenu(evt: MouseEvent) {
</b-nav>
<b-nav vertical class="flex-nowrap p-1">
<NotificationItem
v-if="!isAnonymous && config.enable_notification_system"
v-if="!isAnonymous && isConfigLoaded && config.enable_notification_system"
id="activity-notifications"
icon="bell"
:is-active="isActiveRoute('/user/notifications')"
Expand All @@ -211,7 +211,7 @@ function toggleContextMenu(evt: MouseEvent) {
</b-nav>
</div>
<FlexPanel v-if="isActiveSideBar('tools')" key="tools" side="left" :collapsible="false">
<ToolBox />
<ToolPanel />
</FlexPanel>
<FlexPanel v-else-if="isActiveSideBar('workflows')" key="workflows" side="left" :collapsible="false">
<WorkflowBox />
Expand Down
Loading

0 comments on commit 98b71a5

Please sign in to comment.