From e485fc9c75757b7612d562924675dca97a2b6952 Mon Sep 17 00:00:00 2001 From: imilev Date: Fri, 4 Jul 2025 15:32:49 +0300 Subject: [PATCH] Added high-level diagrams --- .../Object_Oriented_API_Layer_DTOs.md | 157 +++++++++++++ .codeboarding/Shared_Utilities.md | 209 ++++++++++++++++++ .../ToolShed_API_Resource_Clients.md | 123 +++++++++++ .codeboarding/on_boarding.md | 173 +++++++++++++++ 4 files changed, 662 insertions(+) create mode 100644 .codeboarding/Object_Oriented_API_Layer_DTOs.md create mode 100644 .codeboarding/Shared_Utilities.md create mode 100644 .codeboarding/ToolShed_API_Resource_Clients.md create mode 100644 .codeboarding/on_boarding.md diff --git a/.codeboarding/Object_Oriented_API_Layer_DTOs.md b/.codeboarding/Object_Oriented_API_Layer_DTOs.md new file mode 100644 index 000000000..3cee58e1f --- /dev/null +++ b/.codeboarding/Object_Oriented_API_Layer_DTOs.md @@ -0,0 +1,157 @@ +```mermaid + +graph LR + + Object_Oriented_Galaxy_Instance["Object-Oriented Galaxy Instance"] + + Object_Oriented_Clients_ObjClients_["Object-Oriented Clients (ObjClients)"] + + Data_Transfer_Objects_DTOs_Wrappers["Data Transfer Objects (DTOs) / Wrappers"] + + Core_Client_Connection_Layer["Core Client/Connection Layer"] + + Resource_Specific_Modules_Facades_["Resource-Specific Modules (Facades)"] + + Object_Oriented_Galaxy_Instance -- "instantiates and manages" --> Object_Oriented_Clients_ObjClients_ + + Object_Oriented_Galaxy_Instance -- "utilizes" --> Core_Client_Connection_Layer + + Object_Oriented_Clients_ObjClients_ -- "managed by" --> Object_Oriented_Galaxy_Instance + + Object_Oriented_Clients_ObjClients_ -- "returns" --> Data_Transfer_Objects_DTOs_Wrappers + + Object_Oriented_Clients_ObjClients_ -- "utilizes" --> Resource_Specific_Modules_Facades_ + + Data_Transfer_Objects_DTOs_Wrappers -- "holds reference to" --> Object_Oriented_Galaxy_Instance + + Resource_Specific_Modules_Facades_ -- "utilizes" --> Core_Client_Connection_Layer + +``` + + + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Details + + + +The `Object-Oriented API Layer & DTOs` component in `bioblend` provides a high-level, Pythonic interface for interacting with the Galaxy API, abstracting away direct API calls. It achieves this through a structured design involving a central instance, specialized clients, and data transfer objects (DTOs) that wrap Galaxy entities. + + + +### Object-Oriented Galaxy Instance + +This component serves as the primary entry point for the object-oriented API layer. It initializes and manages the various object-oriented clients and provides a high-level interface to interact with the Galaxy instance using Python objects. It acts as the central orchestrator for the object-oriented paradigm. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.objects.galaxy_instance.GalaxyInstance` (1:1) + + + + + +### Object-Oriented Clients (ObjClients) + +These are specialized clients that provide object-oriented methods for interacting with specific Galaxy entities (e.g., histories, datasets, workflows). They abstract the underlying API calls and operate on the DTOs/Wrappers, simplifying resource-specific operations. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.objects.client.ObjClient` (1:1) + +- `bioblend.galaxy.objects.client.ObjHistoryClient` (1:1) + +- `bioblend.galaxy.objects.client.ObjDatasetClient` (1:1) + +- `bioblend.galaxy.objects.client.ObjWorkflowClient` (1:1) + + + + + +### Data Transfer Objects (DTOs) / Wrappers + +This component comprises Python classes that wrap Galaxy API entities (like histories, datasets, jobs, workflows) as native Python objects. These objects provide attributes for accessing entity properties and methods for direct manipulation, state refreshing, and interaction with the Galaxy instance, abstracting away direct API calls. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.objects.wrappers.Wrapper` (63:167) + +- `bioblend.galaxy.objects.wrappers.History` (1311:1520) + +- `bioblend.galaxy.objects.wrappers.Dataset` (854:965) + +- `bioblend.galaxy.objects.wrappers.Workflow` (275:652) + +- `bioblend.galaxy.objects.wrappers.Invocation` (655:848) + + + + + +### Core Client/Connection Layer + +This component handles the low-level HTTP requests and responses to the Galaxy API. It provides the fundamental communication mechanism for all higher-level clients, ensuring reliable interaction with the Galaxy server. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxyclient.GalaxyClient` (1:1) + + + + + +### Resource-Specific Modules (Facades) + +These modules provide a more direct, procedural interface to specific Galaxy API resources, acting as facades over the core client. The object-oriented clients often utilize these under the hood to perform specific API operations before wrapping the results in DTOs. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.client.Client` (1:1) + +- `bioblend.galaxy.histories.HistoryClient` (1:1) + +- `bioblend.galaxy.datasets.DatasetClient` (1:1) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/Shared_Utilities.md b/.codeboarding/Shared_Utilities.md new file mode 100644 index 000000000..003ea593a --- /dev/null +++ b/.codeboarding/Shared_Utilities.md @@ -0,0 +1,209 @@ +```mermaid + +graph LR + + Shared_Utilities["Shared Utilities"] + + API_Client_Core["API Client Core"] + + Galaxy_Resource_Clients["Galaxy Resource Clients"] + + Tool_Shed_Resource_Clients["Tool Shed Resource Clients"] + + Data_Object_Wrappers["Data Object Wrappers"] + + Tool_Input_Builders["Tool Input Builders"] + + API_Client_Core -- "Uses" --> Shared_Utilities + + API_Client_Core -- "Interacts with" --> Galaxy_Resource_Clients + + Galaxy_Resource_Clients -- "Uses" --> API_Client_Core + + Galaxy_Resource_Clients -- "Uses" --> Data_Object_Wrappers + + Galaxy_Resource_Clients -- "Uses" --> Tool_Input_Builders + + Tool_Shed_Resource_Clients -- "Uses" --> API_Client_Core + + Tool_Shed_Resource_Clients -- "Uses" --> Shared_Utilities + + Data_Object_Wrappers -- "Uses" --> Shared_Utilities + + Tool_Input_Builders -- "Uses" --> Shared_Utilities + + click Shared_Utilities href "https://github.com/galaxyproject/bioblend/blob/main/.codeboarding//Shared_Utilities.md" "Details" + +``` + + + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Details + + + +One paragraph explaining the functionality which is represented by this graph. What the main flow is and what is its purpose. + + + +### Shared Utilities [[Expand]](./Shared_Utilities.md) + +This component aggregates general-purpose helper functions and modules that are utilized across various parts of the `bioblend` library. This includes utilities for common tasks such as file attachment, managing asynchronous operations (e.g., waiting for jobs or datasets to complete), and structured input building for complex tool and workflow parameters. It provides reusable functionalities that support the higher-level API interactions. + + + + + +**Related Classes/Methods**: + + + +- `bioblend/util` (1:1) + + + + + +### API Client Core + +Provides the foundational layer for connecting to and interacting with the Galaxy and Tool Shed APIs. It manages authentication, request dispatching, and response handling. + + + + + +**Related Classes/Methods**: + + + +- `bioblend/galaxyclient` (1:1) + +- `bioblend/toolshed` (1:1) + + + + + +### Galaxy Resource Clients + +A collection of client classes, each dedicated to managing specific resources within the Galaxy platform (e.g., histories, datasets, tools, workflows, users, libraries, jobs, etc.). They act as facades over the core API client, providing high-level, resource-specific methods. + + + + + +**Related Classes/Methods**: + + + +- `bioblend/galaxy/histories` (1:1) + +- `bioblend/galaxy/tools` (1:1) + +- `bioblend/galaxy/workflows` (1:1) + +- `bioblend/galaxy/datasets` (1:1) + +- `bioblend/galaxy/dataset_collections` (1:1) + +- `bioblend/galaxy/datatypes` (1:1) + +- `bioblend/galaxy/ftpfiles` (1:1) + +- `bioblend/galaxy/genomes` (1:1) + +- `bioblend/galaxy/invocations` (1:1) + +- `bioblend/galaxy/jobs` (1:1) + +- `bioblend/galaxy/libraries` (1:1) + +- `bioblend/galaxy/quotas` (1:1) + +- `bioblend/galaxy/roles` (1:1) + +- `bioblend/galaxy/tool_data` (1:1) + +- `bioblend/galaxy/tool_dependencies` (1:1) + +- `bioblend/galaxy/users` (1:1) + +- `bioblend/galaxy/visual` (1:1) + +- `bioblend/galaxy/forms` (1:1) + +- `bioblend/galaxy/groups` (1:1) + +- `bioblend/galaxy/container_resolution` (1:1) + + + + + +### Tool Shed Resource Clients + +Similar to Galaxy Resource Clients, these classes provide high-level interfaces for interacting with resources specific to the Galaxy Tool Shed, such as repositories, categories, and tools. + + + + + +**Related Classes/Methods**: + + + +- `bioblend/toolshed/repositories` (1:1) + +- `bioblend/toolshed/categories` (1:1) + +- `bioblend/toolshed/tools` (1:1) + + + + + +### Data Object Wrappers + +Defines Python classes that encapsulate the data structures returned by the Galaxy API. These objects provide a more Pythonic and convenient way to access and manipulate API data, abstracting the raw JSON responses. + + + + + +**Related Classes/Methods**: + + + +- `bioblend/galaxy/objects/wrappers` (1:1) + + + + + +### Tool Input Builders + +Provides classes and functions specifically designed to help construct the complex input parameters required for executing tools and workflows on the Galaxy platform. This ensures correct formatting and validation of inputs. + + + + + +**Related Classes/Methods**: + + + +- `bioblend/galaxy/tools/inputs` (1:1) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/ToolShed_API_Resource_Clients.md b/.codeboarding/ToolShed_API_Resource_Clients.md new file mode 100644 index 000000000..40451048b --- /dev/null +++ b/.codeboarding/ToolShed_API_Resource_Clients.md @@ -0,0 +1,123 @@ +```mermaid + +graph LR + + ToolShedInstance["ToolShedInstance"] + + ToolShedCategoryClient["ToolShedCategoryClient"] + + ToolShedRepositoryClient["ToolShedRepositoryClient"] + + ToolShedToolClient["ToolShedToolClient"] + + ToolShedInstance -- "aggregates" --> ToolShedCategoryClient + + ToolShedInstance -- "aggregates" --> ToolShedRepositoryClient + + ToolShedInstance -- "aggregates" --> ToolShedToolClient + + ToolShedCategoryClient -- "inherits from" --> ToolShedInstance + + ToolShedRepositoryClient -- "inherits from" --> ToolShedInstance + + ToolShedToolClient -- "inherits from" --> ToolShedInstance + +``` + + + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Details + + + +This component provides a high-level, structured interface for interacting with the Galaxy ToolShed API, adhering to the principles of an SDK/API Client Library. It abstracts the underlying HTTP requests and offers resource-specific clients for managing categories, repositories, and tools within the ToolShed. + + + +### ToolShedInstance + +This class serves as the primary entry point for users to interact with the Galaxy ToolShed API. It inherits from `bioblend.galaxyclient.GalaxyClient`, providing the foundational client functionalities for API communication (e.g., connection management, request handling). It acts as a central hub, aggregating and providing access to the resource-specific ToolShed clients. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxyclient.GalaxyClient` (1:1) + + + + + +### ToolShedCategoryClient + +This client is dedicated to managing categories within the Galaxy ToolShed. It provides methods for listing, showing, and potentially creating/updating ToolShed categories. It leverages core API interaction methods from `bioblend.galaxy.client.Client` and ToolShed-specific context from `ToolShedInstance`. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.client.Client` (1:1) + +- `ToolShedInstance` (1:1) + + + + + +### ToolShedRepositoryClient + +This client handles all operations related to repositories in the Galaxy ToolShed. This includes functionalities like searching, installing, uninstalling, and managing ToolShed repositories. It inherits core API interaction methods from `bioblend.galaxy.client.Client` and ToolShed-specific context from `ToolShedInstance`. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.client.Client` (1:1) + +- `ToolShedInstance` (1:1) + + + + + +### ToolShedToolClient + +This client focuses on managing tools within the Galaxy ToolShed. It provides methods for interacting with ToolShed tools, such as listing tools, showing tool details, and potentially managing tool dependencies. It inherits core API interaction methods from `bioblend.galaxy.client.Client` and ToolShed-specific context from `ToolShedInstance`. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.client.Client` (1:1) + +- `ToolShedInstance` (1:1) + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file diff --git a/.codeboarding/on_boarding.md b/.codeboarding/on_boarding.md new file mode 100644 index 000000000..eb1eab566 --- /dev/null +++ b/.codeboarding/on_boarding.md @@ -0,0 +1,173 @@ +```mermaid + +graph LR + + API_Core_Base_Client["API Core & Base Client"] + + Galaxy_API_Resource_Clients["Galaxy API Resource Clients"] + + ToolShed_API_Resource_Clients["ToolShed API Resource Clients"] + + Object_Oriented_API_Layer_DTOs["Object-Oriented API Layer & DTOs"] + + Shared_Utilities["Shared Utilities"] + + Galaxy_API_Resource_Clients -- "uses" --> API_Core_Base_Client + + ToolShed_API_Resource_Clients -- "uses" --> API_Core_Base_Client + + Galaxy_API_Resource_Clients -- "uses" --> Shared_Utilities + + Object_Oriented_API_Layer_DTOs -- "uses" --> Galaxy_API_Resource_Clients + + ToolShed_API_Resource_Clients -- "uses" --> Shared_Utilities + + Object_Oriented_API_Layer_DTOs -- "uses" --> Shared_Utilities + + click ToolShed_API_Resource_Clients href "https://github.com/galaxyproject/bioblend/blob/main/.codeboarding//ToolShed_API_Resource_Clients.md" "Details" + + click Object_Oriented_API_Layer_DTOs href "https://github.com/galaxyproject/bioblend/blob/main/.codeboarding//Object_Oriented_API_Layer_DTOs.md" "Details" + + click Shared_Utilities href "https://github.com/galaxyproject/bioblend/blob/main/.codeboarding//Shared_Utilities.md" "Details" + +``` + + + +[![CodeBoarding](https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square)](https://github.com/CodeBoarding/GeneratedOnBoardings)[![Demo](https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square)](https://www.codeboarding.org/demo)[![Contact](https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square)](mailto:contact@codeboarding.org) + + + +## Details + + + +The `bioblend` library is designed with a clear separation of concerns, enabling robust and user-friendly interaction with Galaxy and ToolShed APIs. The architecture is layered, starting from low-level HTTP communication and building up to high-level, object-oriented interfaces. + + + +### API Core & Base Client + +This is the foundational layer responsible for all low-level HTTP communication (GET, POST, PUT, PATCH, DELETE) with both the Galaxy and ToolShed APIs. It manages connection details, handles basic request/response mechanisms, and provides the abstract base for all specific API clients, ensuring consistent interaction patterns. It acts as the direct interface to the external APIs. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxyclient` + +- `bioblend.galaxy.client` + + + + + +### Galaxy API Resource Clients + +This component provides a comprehensive set of high-level, resource-specific interfaces for interacting with various aspects of the Galaxy API (e.g., histories, tools, workflows, datasets, libraries, jobs, invocations, users). The `GalaxyInstance` class serves as the primary entry point, aggregating and exposing these specialized clients, effectively abstracting the underlying API calls and simplifying the management of Galaxy entities for users. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.GalaxyInstance` + +- `bioblend.galaxy.histories` + +- `bioblend.galaxy.tools` + +- `bioblend.galaxy.workflows` + +- `bioblend.galaxy.datasets` + +- `bioblend.galaxy.libraries` + +- `bioblend.galaxy.jobs` + +- `bioblend.galaxy.invocations` + +- `bioblend.galaxy.users` + + + + + +### ToolShed API Resource Clients [[Expand]](./ToolShed_API_Resource_Clients.md) + +This component offers high-level interfaces specifically designed for managing resources within the Galaxy ToolShed (e.g., categories, repositories, tools). The `ToolShedInstance` class acts as the main entry point for ToolShed interactions, providing a structured way to access ToolShed functionalities. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.toolshed.ToolShedInstance` + +- `bioblend.toolshed.categories` + +- `bioblend.toolshed.repositories` + +- `bioblend.toolshed.tools` + + + + + +### Object-Oriented API Layer & DTOs [[Expand]](./Object_Oriented_API_Layer_DTOs.md) + +This component provides an alternative, more Pythonic and object-oriented way to interact with the Galaxy API. It consists of base classes for object-oriented clients and a comprehensive set of Data Transfer Objects (DTOs) that wrap Galaxy entities (such as histories, workflows, and datasets) as native Python objects. These objects offer methods for direct manipulation, state refreshing, and interaction with the Galaxy instance, abstracting away direct API calls. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.galaxy.objects.galaxy_instance` + +- `bioblend.galaxy.objects.client` + +- `bioblend.galaxy.objects.wrappers` + + + + + +### Shared Utilities [[Expand]](./Shared_Utilities.md) + +This component aggregates general-purpose helper functions and modules that are utilized across various parts of the `bioblend` library. This includes utilities for common tasks such as file attachment, managing asynchronous operations (e.g., waiting for jobs or datasets to complete), and structured input building for complex tool and workflow parameters. It provides reusable functionalities that support the higher-level API interactions. + + + + + +**Related Classes/Methods**: + + + +- `bioblend.util` + +- `bioblend.galaxy.tools.inputs` + + + + + + + + + +### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq) \ No newline at end of file