From cea2c95720e2f5cd4356ed8f4bb451b31fa61cc9 Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 8 Nov 2023 08:59:39 +0300 Subject: [PATCH] Fix linting, update schema --- client/src/api/schema/schema.ts | 132 +++--------------- lib/galaxy/managers/visualizations.py | 1 - lib/galaxy/schema/visualization.py | 1 - .../webapps/galaxy/services/visualizations.py | 2 +- 4 files changed, 18 insertions(+), 118 deletions(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index d23f7c1854d..d90c4759f8a 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -1508,10 +1508,6 @@ export interface paths { /** Returns visualizations for the current user. */ get: operations["index_api_visualizations_get"]; }; - "/api/visualizations/detailed": { - /** Returns visualizations for the current user with detailed resolution. */ - get: operations["index_detailed_api_visualizations_detailed_get"]; - }; "/api/visualizations/{id}/disable_link_access": { /** * Makes this item inaccessible by a URL link. @@ -9455,10 +9451,10 @@ export interface components { */ Visualization: Record; /** - * VisualizationDetails + * VisualizationSummary * @description Base model definition with common configuration used by all derived models. */ - VisualizationDetails: { + VisualizationSummary: { /** * Create Time * Format: date-time @@ -9470,13 +9466,27 @@ export interface components { * @description The database key of the visualization. */ dbkey?: string; + /** + * Deleted + * @description Whether this Visualization has been deleted. + */ + deleted: boolean; /** * ID * @description Encoded ID of the Visualization. * @example 0123456789ABCDEF */ id: string; - sharing_status?: components["schemas"]["SharingStatus"]; + /** + * Importable + * @description Whether this Visualization can be imported. + */ + importable: boolean; + /** + * Published + * @description Whether this Visualization has been published. + */ + published: boolean; /** * Tags * @description A list of tags to add to this item. @@ -9499,39 +9509,6 @@ export interface components { */ update_time?: string; }; - /** - * VisualizationDetailsList - * @description Base model definition with common configuration used by all derived models. - * @default [] - */ - VisualizationDetailsList: components["schemas"]["VisualizationDetails"][]; - /** - * VisualizationSummary - * @description Base model definition with common configuration used by all derived models. - */ - VisualizationSummary: { - /** - * DbKey - * @description The database key of the visualization. - */ - dbkey?: string; - /** - * ID - * @description Encoded ID of the Visualization. - * @example 0123456789ABCDEF - */ - id: string; - /** - * Title - * @description The name of the visualization. - */ - title: string; - /** - * Type - * @description The type of the visualization. - */ - type: string; - }; /** * VisualizationSummaryList * @description Base model definition with common configuration used by all derived models. @@ -18025,81 +18002,6 @@ export interface operations { }; }; }; - index_detailed_api_visualizations_detailed_get: { - /** Returns visualizations for the current user with detailed resolution. */ - parameters?: { - /** @description Whether to include deleted pages in the result. */ - /** @description The maximum number of items to return. */ - /** @description Starts at the beginning skip the first ( offset - 1 ) items and begin returning at the Nth item */ - /** @description Sort page index by this specified attribute on the page model */ - /** @description Sort in descending order? */ - /** - * @description A mix of free text and GitHub-style tags used to filter the index operation. - * - * ## Query Structure - * - * GitHub-style filter tags (not be confused with Galaxy tags) are tags of the form - * `:` or `:''`. The tag name - * *generally* (but not exclusively) corresponds to the name of an attribute on the model - * being indexed (i.e. a column in the database). - * - * If the tag is quoted, the attribute will be filtered exactly. If the tag is unquoted, - * generally a partial match will be used to filter the query (i.e. in terms of the implementation - * this means the database operation `ILIKE` will typically be used). - * - * Once the tagged filters are extracted from the search query, the remaining text is just - * used to search various documented attributes of the object. - * - * ## GitHub-style Tags Available - * - * `title` - * : The page's title. - * - * `slug` - * : The page's slug. (The tag `s` can be used a short hand alias for this tag to filter on this attribute.) - * - * `tag` - * : The page's tags. (The tag `t` can be used a short hand alias for this tag to filter on this attribute.) - * - * `user` - * : The page's owner's username. (The tag `u` can be used a short hand alias for this tag to filter on this attribute.) - * - * ## Free Text - * - * Free text search terms will be searched against the following attributes of the - * Visualizations: `title`, `slug`, `tag`, `type`. - */ - query?: { - deleted?: boolean; - limit?: number; - offset?: number; - user_id?: string; - show_published?: boolean; - show_shared?: boolean; - sort_by?: "create_time" | "title" | "update_time" | "username"; - sort_desc?: boolean; - search?: string; - }; - /** @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. */ - header?: { - "run-as"?: string; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - content: { - "application/json": components["schemas"]["VisualizationDetailsList"]; - }; - }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; disable_link_access_api_visualizations__id__disable_link_access_put: { /** * Makes this item inaccessible by a URL link. diff --git a/lib/galaxy/managers/visualizations.py b/lib/galaxy/managers/visualizations.py index 08aa968e77b..06a6b91882d 100644 --- a/lib/galaxy/managers/visualizations.py +++ b/lib/galaxy/managers/visualizations.py @@ -13,7 +13,6 @@ from typing import ( from sqlalchemy import ( false, - or_, true, ) from sqlalchemy.orm import aliased diff --git a/lib/galaxy/schema/visualization.py b/lib/galaxy/schema/visualization.py index cdaa7b8eeb3..03f611e99a2 100644 --- a/lib/galaxy/schema/visualization.py +++ b/lib/galaxy/schema/visualization.py @@ -14,7 +14,6 @@ from galaxy.schema.fields import DecodedDatabaseIdField from galaxy.schema.schema import ( CreateTimeField, Model, - SharingStatus, TagCollection, UpdateTimeField, ) diff --git a/lib/galaxy/webapps/galaxy/services/visualizations.py b/lib/galaxy/webapps/galaxy/services/visualizations.py index 96bf40beb18..ace3d61225d 100644 --- a/lib/galaxy/webapps/galaxy/services/visualizations.py +++ b/lib/galaxy/webapps/galaxy/services/visualizations.py @@ -48,7 +48,7 @@ class VisualizationsService(ServiceBase): """Return a list of Visualizations viewable by the user :rtype: list - :returns: dictionaries containing summary or detailed Visualization information + :returns: dictionaries containing Visualization details """ if not trans.user_is_admin: user_id = trans.user and trans.user.id