Skip to content

Commit

Permalink
Merge branch 'dev' into lint-output-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias authored Nov 7, 2024
2 parents 94d1390 + 3efa4c1 commit 50fcbf6
Show file tree
Hide file tree
Showing 111 changed files with 3,157 additions and 1,267 deletions.
1 change: 1 addition & 0 deletions .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
GALAXY_TEST_DBURI: 'postgresql://postgres:postgres@localhost:5432/galaxy?client_encoding=utf8'
GALAXY_TEST_RAISE_EXCEPTION_ON_HISTORYLESS_HDA: '1'
GALAXY_CONFIG_SQLALCHEMY_WARN_20: '1'
GALAXY_TEST_REQUIRE_ALL_NEEDED_TOOLS: '1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@ jobs:
name: Update dependencies
if: github.repository_owner == 'galaxyproject'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8']
steps:
- uses: actions/checkout@v4
# Install Python 3.8 for update_lint_requirements.sh
# Install Python 3.9 (as default) to allow `uv lock` to generate metadata for rucio-clients
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: |
3.8
3.9
- name: Update dependencies
run: |
python -m venv .venv
make update-dependencies
run: make update-dependencies
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/first_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
env:
LINT_PATH: 'lib/galaxy/dependencies/pinned-lint-requirements.txt'
TYPE_PATH: 'lib/galaxy/dependencies/pinned-typecheck-requirements.txt'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_openapi_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osx_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reports_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_galaxy_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/toolshed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
shed-api: ['v1', 'v2']
test-install-client: ['galaxy_api', 'standalone']
services:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
steps:
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"dom-to-image": "^2.6.0",
"dompurify": "^3.0.6",
"dumpmeta-webpack-plugin": "^0.2.0",
"echarts": "^5.5.1",
"elkjs": "^0.8.2",
"file-saver": "^2.0.5",
"flush-promises": "^1.0.2",
Expand Down Expand Up @@ -100,7 +101,11 @@
"tus-js-client": "^3.1.1",
"underscore": "^1.13.6",
"util": "^0.12.5",
"vega": "^5.30.0",
"vega-embed": "^6.26.0",
"vega-lite": "^5.21.0",
"vue": "^2.7.14",
"vue-echarts": "^7.0.3",
"vue-infinite-scroll": "^2.0.2",
"vue-multiselect": "^2.1.7",
"vue-observe-visibility": "^1.0.0",
Expand Down
114 changes: 114 additions & 0 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2594,6 +2594,23 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/invocations/{invocation_id}/metrics": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/** Get Invocation Metrics */
get: operations["get_invocation_metrics_api_invocations__invocation_id__metrics_get"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/invocations/{invocation_id}/prepare_store_download": {
parameters: {
query?: never;
Expand Down Expand Up @@ -8753,6 +8770,11 @@ export interface components {
* @description The email of the user that owns this job. Only the owner of the job and administrators can see this value.
*/
user_email?: string | null;
/**
* User Id
* @description User ID of user that ran this job
*/
user_id?: string | null;
};
/** EncodedJobParameterHistoryItem */
EncodedJobParameterHistoryItem: {
Expand Down Expand Up @@ -16177,6 +16199,11 @@ export interface components {
* @description The email of the user that owns this job. Only the owner of the job and administrators can see this value.
*/
user_email?: string | null;
/**
* User Id
* @description User ID of user that ran this job
*/
user_id?: string | null;
};
/**
* Src
Expand Down Expand Up @@ -18317,6 +18344,49 @@ export interface components {
[key: string]: number;
};
};
/**
* WorkflowJobMetric
* @example {
* "name": "start_epoch",
* "plugin": "core",
* "raw_value": "1614261340.0000000",
* "title": "Job Start Time",
* "value": "2021-02-25 14:55:40"
* }
*/
WorkflowJobMetric: {
/**
* Name
* @description The name of the metric variable.
*/
name: string;
/**
* Plugin
* @description The instrumenter plugin that generated this metric.
*/
plugin: string;
/**
* Raw Value
* @description The raw value of the metric as a string.
*/
raw_value: string;
/** Step Index */
step_index: number;
/** Step Label */
step_label: string | null;
/**
* Title
* @description A descriptive title for this metric.
*/
title: string;
/** Tool Id */
tool_id: string;
/**
* Value
* @description The textual representation of the metric value.
*/
value: string;
};
/** WorkflowLandingRequest */
WorkflowLandingRequest: {
/** Request State */
Expand Down Expand Up @@ -27021,6 +27091,50 @@ export interface operations {
};
};
};
get_invocation_metrics_api_invocations__invocation_id__metrics_get: {
parameters: {
query?: never;
header?: {
/** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */
"run-as"?: string | null;
};
path: {
/** @description The encoded database identifier of the Invocation. */
invocation_id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful Response */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["WorkflowJobMetric"][];
};
};
/** @description Request Error */
"4XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
/** @description Server Error */
"5XX": {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["MessageExceptionModel"];
};
};
};
};
prepare_store_download_api_invocations__invocation_id__prepare_store_download_post: {
parameters: {
query?: never;
Expand Down
5 changes: 5 additions & 0 deletions client/src/components/Help/terms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,8 @@ galaxy:
failed: |
This state indicates there was a problem scheduling the workflow invocation. No additional datasets
or jobs will be created for this workflow invocation.
upload:
galaxyUploadUtil: |
A utility for uploading files to a Galaxy server from the command line. Use ``galaxy-upload`` to upload
file(s) to a Galaxy server, and ``galaxy-history-search``, a helper utility to find Galaxy histories
to pass to the ``galaxy-upload`` command.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const showRerun = computed(() => {
});
const showVisualizations = computed(() => {
// TODO: Check hasViz, if visualizations are activated in the config
return !props.item.purged && ["ok", "failed_metadata", "error"].includes(props.item.state);
return !props.item.purged && ["ok", "failed_metadata", "error", "deferred"].includes(props.item.state);
});
const reportErrorUrl = computed(() => {
return prependPath(props.itemUrls.reportError!);
Expand Down
33 changes: 25 additions & 8 deletions client/src/components/JobInformation/JobInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { JobDetailsProvider } from "components/providers/JobProvider";
import UtcDate from "components/UtcDate";
import { NON_TERMINAL_STATES } from "components/WorkflowInvocationState/util";
import { formatDuration, intervalToDuration } from "date-fns";
import { computed, ref } from "vue";
import { computed, ref, watch } from "vue";
import { GalaxyApi } from "@/api";
import { rethrowSimple } from "@/utils/simple-error";
Expand All @@ -14,7 +14,7 @@ import DecodedId from "../DecodedId.vue";
import CodeRow from "./CodeRow.vue";
const job = ref(null);
const invocationId = ref(null);
const invocationId = ref(undefined);
const props = defineProps({
job_id: {
Expand Down Expand Up @@ -42,9 +42,6 @@ const metadataDetail = ref({
function updateJob(newJob) {
job.value = newJob;
if (newJob) {
fetchInvocation(newJob.id);
}
}
function filterMetadata(jobMessages) {
Expand All @@ -58,9 +55,9 @@ function filterMetadata(jobMessages) {
});
}
async function fetchInvocation(jobId) {
async function fetchInvocationForJob(jobId) {
if (jobId) {
const { data: invocation, error } = await GalaxyApi().GET("/api/invocations", {
const { data: invocations, error } = await GalaxyApi().GET("/api/invocations", {
params: {
query: { job_id: jobId },
},
Expand All @@ -70,9 +67,29 @@ async function fetchInvocation(jobId) {
rethrowSimple(error);
}
invocationId.value = invocation.id;
if (invocations.length) {
return invocations[0];
}
return null;
}
}
// Fetches the invocation for the given job id to get the associated invocation id
watch(
() => props.job_id,
async (newId, oldId) => {
if (newId && (invocationId.value === undefined || newId !== oldId)) {
const invocation = await fetchInvocationForJob({ jobId: newId });
if (invocation) {
invocationId.value = invocation.id;
} else {
invocationId.value = null;
}
}
},
{ immediate: true }
);
</script>

<template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export default {
this.sortBy,
this.sortDesc,
this.perPage,
(this.currentPage - 1) * this.perPage,
(this.currentPage ? this.currentPage - 1 : 0) * this.perPage,
this.searchText
)
.then((response) => {
Expand Down
10 changes: 9 additions & 1 deletion client/src/components/Panels/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import levenshteinDistance from "@/utils/levenshtein";
const FILTER_KEYS = {
id: ["id", "tool_id"],
panel_section_name: ["section", "panel_section_name"],
labels: ["label", "labels", "tag"],
};
const STRING_REPLACEMENTS: string[] = [" ", "-", "\\(", "\\)", "'", ":", `"`];
const MINIMUM_DL_LENGTH = 5; // for Demerau-Levenshtein distance
Expand Down Expand Up @@ -286,7 +287,14 @@ export function searchToolsByKeys(
if (key === "combined") {
actualValue = `${tool.name.trim()} ${tool.description.trim()}`.toLowerCase();
} else {
actualValue = (tool[key as keyof Tool] as string)?.trim().toLowerCase();
const toolVal = tool[key as keyof Tool];
if (typeof toolVal === "string") {
actualValue = toolVal.trim().toLowerCase();
} else if (Array.isArray(toolVal)) {
actualValue = toolVal.join(" ").trim().toLowerCase();
} else if (typeof toolVal === "number") {
actualValue = toolVal.toString().trim().toLowerCase();
}
}

// get all (space separated) words in actualValue for tool (for DL)
Expand Down
Loading

0 comments on commit 50fcbf6

Please sign in to comment.