Skip to content

Commit

Permalink
Merge pull request #16534 from mvdbeek/dev
Browse files Browse the repository at this point in the history
Merge 23.1 into dev
  • Loading branch information
mvdbeek authored Aug 9, 2023
2 parents 085132d + 130d2b0 commit e28069d
Show file tree
Hide file tree
Showing 82 changed files with 727 additions and 401 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Common/DelayedInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<b-input-group-append>
<b-button
v-if="enableAdvanced"
v-b-tooltip.hover
v-b-tooltip.hover.noninteractive
aria-haspopup="true"
size="sm"
:pressed="showAdvanced"
Expand All @@ -25,7 +25,7 @@
<icon v-else fixed-width icon="angle-double-down" />
</b-button>
<b-button
v-b-tooltip.hover
v-b-tooltip.hover.noninteractive
aria-haspopup="true"
class="search-clear"
size="sm"
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/History/Content/model/StatesInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ function onFilter(value: string) {
<p>Here are all available item states in Galaxy:</p>
<p><i>(Note that the colors for each state correspond to content item state colors in the history)</i></p>
<dl v-for="(state, key, index) in states" :key="index">
<b-alert :variant="state.status || 'success'" show>
<div :class="['alert', 'content-item', 'alert-' + state.status]" :data-state="key">
<dt>
<a class="text-decoration-none" href="javascript:void(0)" @click="onFilter(key)"
><code>{{ key }}</code></a
>
<icon v-if="state.icon" :icon="state.icon" />
</dt>
<dd>{{ helpText[key] || state.text }}</dd>
</b-alert>
</div>
</dl>
</b-modal>
</template>
2 changes: 1 addition & 1 deletion client/src/components/Panels/Buttons/FavoritesButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<b-button
v-b-tooltip.hover
v-b-tooltip.hover.noninteractive
class="panel-header-button-toolbox"
size="sm"
variant="link"
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Panels/Buttons/PanelViewButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<b-dropdown
v-b-tooltip.hover
v-b-tooltip.hover.noninteractive
right
title="Show panel options"
variant="link"
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Panels/Common/ToolPanelLabel.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-b-tooltip.topright.hover class="tool-panel-label" tabindex="0" :title="description">
<div v-b-tooltip.topright.hover.noninteractive class="tool-panel-label" tabindex="0" :title="description">
{{ definition.text }}
<ToolPanelLinks :links="definition.links" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Panels/Common/ToolSection.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div v-if="isSection && hasElements" class="tool-panel-section">
<div
v-b-tooltip.topright.hover
v-b-tooltip.topright.hover.noninteractive
:class="['toolSectionTitle', `tool-menu-section-${sectionName}`]"
:title="title">
<a class="title-link" href="javascript:void(0)" @click="toggleMenu()">
Expand Down
29 changes: 23 additions & 6 deletions client/src/components/Panels/ToolBoxWorkflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,19 @@
placeholder="search tools"
:toolbox="workflowTools"
:query="query"
:query-pending="queryPending"
@onQuery="onQuery"
@onResults="onResults" />
<div v-if="queryTooShort" class="pb-2">
<div v-if="closestTerm" class="pb-2">
<b-badge class="alert-danger w-100">
Did you mean:
<i>
<a href="javascript:void(0)" @click="onQuery(closestTerm)">{{ closestTerm }}</a>
</i>
?
</b-badge>
</div>
<div v-else-if="queryTooShort" class="pb-2">
<b-badge class="alert-danger w-100">Search string too short!</b-badge>
</div>
<div v-else-if="noResults" class="pb-2">
Expand All @@ -40,21 +50,21 @@
:category="category"
tool-key="name"
:section-name="category.name"
:query-filter="query"
:query-filter="queryFilter"
:disable-filter="true"
@onClick="onInsertModule" />
<ToolSection
v-if="hasDataManagerSection"
:key="dataManagerSection.id"
:category="dataManagerSection"
:query-filter="query"
:query-filter="queryFilter"
:disable-filter="true"
@onClick="onInsertTool" />
<ToolSection
v-for="section in sections"
:key="section.id"
:category="section"
:query-filter="query"
:query-filter="queryFilter"
@onClick="onInsertTool" />
<ToolSection
v-if="hasWorkflowSection"
Expand All @@ -64,7 +74,7 @@
:sort-items="false"
operation-icon="fa fa-files-o"
operation-title="Insert individual steps."
:query-filter="query"
:query-filter="queryFilter"
:disable-filter="true"
@onClick="onInsertWorkflow"
@onOperation="onInsertWorkflowSteps" />
Expand Down Expand Up @@ -114,7 +124,10 @@ export default {
},
data() {
return {
closestTerm: null,
query: null,
queryPending: false,
queryFilter: null,
results: null,
};
},
Expand Down Expand Up @@ -167,9 +180,13 @@ export default {
methods: {
onQuery(query) {
this.query = query;
this.queryPending = true;
},
onResults(results) {
onResults(results, closestTerm = null) {
this.results = results;
this.closestTerm = closestTerm;
this.queryFilter = !this.noResults ? this.query : null;
this.queryPending = false;
},
onInsertTool(tool, evt) {
evt.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Upload/UploadButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<b-button
id="activity-upload"
v-b-tooltip.hover.bottom
v-b-tooltip.hover.noninteractive.bottom
:aria-label="title | localize"
:title="title | localize"
class="upload-button"
Expand Down
28 changes: 14 additions & 14 deletions client/src/components/Workflow/WorkflowDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
@dragend="onDragEnd">
<Icon icon="caret-down" class="fa-lg" />
<span class="workflow-dropdown-name">{{ workflow.name }}</span>
<span
v-if="sourceType.includes('trs')"
v-b-tooltip.hover
aria-haspopup="true"
:title="getWorkflowTooltip(sourceType, workflow)">
<Icon fixed-width icon="check" class="mr-1 workflow-trs-icon" />
</span>
<span
v-if="sourceType == 'url'"
v-b-tooltip.hover
aria-haspopup="true"
:title="getWorkflowTooltip(sourceType, workflow)">
<Icon fixed-width icon="link" class="mr-1 workflow-external-link" />
</span>
</b-link>
<span
v-if="sourceType.includes('trs')"
v-b-tooltip.hover
aria-haspopup="true"
:title="getWorkflowTooltip(sourceType, workflow)">
<Icon fixed-width icon="check" class="mr-1 workflow-trs-icon" />
</span>
<span
v-if="sourceType == 'url'"
v-b-tooltip.hover
aria-haspopup="true"
:title="getWorkflowTooltip(sourceType, workflow)">
<Icon fixed-width icon="link" class="mr-1 workflow-external-link" />
</span>
<p v-if="workflow.description" class="workflow-dropdown-description">
<TextSummary :description="workflow.description" :show-details.sync="showDetails" />
</p>
Expand Down
1 change: 1 addition & 0 deletions client/src/onload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "scss/base.scss";
import "./publicPath";
// Default Font
import "@fontsource/atkinson-hyperlegible";
import "@fontsource/atkinson-hyperlegible/700.css";

// Client-side configuration variables (based on environment)
import { library } from "@fortawesome/fontawesome-svg-core";
Expand Down
10 changes: 3 additions & 7 deletions client/src/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4282,8 +4282,7 @@ export interface components {
* @description The current state of this dataset.
*/
state: components["schemas"]["DatasetState"];
/** Tags */
tags: string;
tags: components["schemas"]["TagCollection"];
/**
* Type
* @enum {string}
Expand Down Expand Up @@ -8494,14 +8493,11 @@ export interface components {
TaggableItemClass:
| "History"
| "HistoryDatasetAssociation"
| "HistoryDatasetCollectionAssociation"
| "LibraryDatasetDatasetAssociation"
| "Page"
| "WorkflowStep"
| "StoredWorkflow"
| "Visualization"
| "HistoryDatasetCollection"
| "LibraryDatasetCollection"
| "Tool";
| "Visualization";
/** ToolDataDetails */
ToolDataDetails: {
/**
Expand Down
20 changes: 8 additions & 12 deletions config/plugins/visualizations/h5web/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
{
"name": "visualization",
"version": "0.1.0",
"version": "0.2.0",
"keywords": [
"galaxy",
"visualization"
"visualization",
"h5web"
],
"license": "AFL-3.0",
"dependencies": {
"@galaxyproject/charts": "^0.0.6",
"@h5web/app": "^7.1.0",
"backbone": "^1.3.3",
"@h5web/app": "^8.0.0",
"buffer": "^6.0.3",
"normalize.css": "^8.0.1",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.2.0",
"react-dom": "18.2.0"
},
"scripts": {
"build": "parcel build src/script.js --dist-dir static"
},
"devDependencies": {
"@types/react": "^17.0.52",
"@types/react-dom": "^17.0.18",
"buffer": "^5.7.1",
"parcel": "^2.0.0",
"typescript": "4.9.3"
"parcel": "^2.9.3"
}
}
63 changes: 34 additions & 29 deletions config/plugins/visualizations/h5web/src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,51 @@
* point.
*/

import './styles.css';
import React, { StrictMode } from 'react'
import {render as reactRender} from 'react-dom'
import {App, H5GroveProvider} from '@h5web/app'
import "./styles.css";
import React from "react";
import { createRoot } from "react-dom/client";
import { App, H5GroveProvider } from "@h5web/app";

/* This will be part of the charts/viz standard lib in 23.1 */
const slashCleanup = /(\/)+/g;
function prefixedDownloadUrl(root, path) {
return `${root}/${path}`.replace(slashCleanup, "/");
return `${root}/${path}`.replace(slashCleanup, "/");
}

function MyApp(props) {
return (
<H5GroveProvider
url={props.url}
filepath={props.name}
axiosConfig={{ params: { file: props.name } }}
>
<App explorerOpen={props.explorer} />
</H5GroveProvider>
);
return (
<H5GroveProvider
url={props.url}
filepath={props.name}
axiosConfig={{ params: { file: props.name } }}
>
<App explorerOpen={props.explorer} />
</H5GroveProvider>
);
}

window.bundleEntries = window.bundleEntries || {};
window.bundleEntries.load = function (options) {
var dataset = options.dataset;
var settings = options.chart.settings;
var explorer = settings.get('explorer');
var url = window.location.origin + prefixedDownloadUrl(options.root, "/api/datasets/" + dataset.id + "/content");
reactRender(
<MyApp
url={url}
name={dataset.name}
filepath={dataset.file_name}
explorer={explorer}
/>,
document.getElementById(options.target)
)
options.chart.state('ok', 'Chart drawn.');
options.process.resolve();
const dataset = options.dataset;
const settings = options.chart.settings;
const explorer = settings.get("explorer");
const url =
window.location.origin +
prefixedDownloadUrl(
options.root,
"/api/datasets/" + dataset.id + "/content"
);
const root = createRoot(document.getElementById(options.target));
root.render(
<MyApp
url={url}
name={dataset.name}
filepath={dataset.file_name}
explorer={explorer}
/>
);
options.chart.state("ok", "Chart drawn.");
options.process.resolve();
};

export default MyApp;
6 changes: 5 additions & 1 deletion lib/galaxy/app_unittest_utils/galaxy_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,13 @@ def __init__(self, app=None, user=None, history=None, **kwargs):
self.security = self.app.security
self.history = history

self.request: Any = Bunch(headers={}, body=None)
self.request: Any = Bunch(headers={}, body=None, host="request.host")
self.response: Any = Bunch(headers={}, set_content_type=lambda i: None)

@property
def tag_handler(self):
return self.app.tag_handler

def check_csrf_token(self, payload):
pass

Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/datatypes/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def do_slow_split(cls, input_datasets, subdir_generator_function, split_params):
def do_fast_split(cls, input_datasets, toc_file_datasets, subdir_generator_function, split_params):
data = json.load(open(toc_file_datasets[0].file_name))
sections = data["sections"]
total_sequences = int(0)
total_sequences = 0
for section in sections:
total_sequences += int(section["sequences"])
sequences_per_file = cls.get_sequences_per_file(total_sequences, split_params)
Expand Down Expand Up @@ -247,7 +247,7 @@ def get_split_commands_with_toc(
sections = toc_file["sections"]
result = []

current_sequence = int(0)
current_sequence = 0
i = 0
# skip to the section that contains my starting sequence
while i < len(sections) and start_sequence >= current_sequence + int(sections[i]["sequences"]):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/pinned-lint-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ importlib-metadata==4.2.0
mccabe==0.7.0
pycodestyle==2.9.1
pyflakes==2.5.0
ruff==0.0.280
ruff==0.0.283
typing_extensions==4.7.1
zipp==3.15.0
Loading

0 comments on commit e28069d

Please sign in to comment.