feat: create a datalink to Galaxy
In this branch, here are the tasks and modifications that were done:
-
Create the corresponding class models for: - Connection
- SharedConnectionParam
- Credential
- Data
- DataLink
-
Removed the following ISAObjects class models: - ISAObject
- Tool
- ToolParam
- DataLink
- Investigation
- Study
- Assay
-
Comment the code content of the files in the /views
related to ISA: investigation.py, study.py, assay.py, tool.py, permissions.py, members.py -
Comment the code content of the files in the /serializer
related to ISA: isa.py, connector.py -
Add the field type
in the madbot_galaxy connector -
Modify the name of the variable used in write_vault
to prevent confusion -
Create a class GetNodeMixin
retrieves a node based on a provided ID and also verifies if a datalink belongs to a specified node and raises a custom exception if the datalink does not belong to the node as expected. -
Create a util function check_connection_state
that combines shared and private parameters, attempts to establish the connection, and handles exceptions related to authentication and connection errors. If thecreate
flag is set and an exception occurs, it optionally deletes the existing connection object before raising an exception. -
Add the endpoint for the connector: - Endpoint GET to retrieve the list of available connectors.
- Create the serializer
ConnectorSerializer
that maps the properties of a Connector instance into a dictionary representation.
-
Add the endpoint for the connection: - Endpoint GET (list)
- Endpoint POST
- Endpoint PATCH
- Endpoint DELETE
- Create a
ConnectionSerializer
serializer that facilitates the serialization of connection objects and also includes validation methods for shared parameters and connector fields to ensure data integrity and consistency - Create a
SharedConnectionParamSerializer
serializer responsible for converting instances of theSharedConnectionParam
model into JSON-compatible data - Create a
PrivateParamsSerializer
serializer that defines validation rules for the private_param field, which expects a dictionary structure in the request data.
-
Add the endpoint for the data: - Endpoint POST
- Endpoint GET (retrieve)
- Create the serializer
DataSerializer
responsible for representing data objects and also includes methods for customizing the representation of certain fields and fetching related connection information.
-
Add the endpoint for the datalink: - Endpoint GET (list)
- Endpoint POST
- Endpoint DELETE
- Create the serializer
DatalinkSerializer
responsible for representing data links.
-
Add the endpoints for the external_data: - Endpoint GET (list) retrieves a list of external data objects through the given connection
- Create serializer
ExternalDataSerializer
designed to represent external data objects in a structured format suitable for serialization, it provides methods to compute certain attributes dynamically or perform additional logic during serialization.
-
Enrich the extended_shemas of the endpoints with defined errors specified in the APIs Specification. -
Add two new two error codes in the dictionary of the CustomException
query_validation_error
anduri_validation_error
. -
Add the package Silk
that inspects the HTTP requests and queries. -
add a variable INSTALL_SILK
in the setting with default valueFALSE
that conditions the installation of silky-
add the path for silk in url based on the value of the INSTALL_SILK
-
add silk in the optional dependencies dev
installation in the .toml
-
-
Comment the test in / functionnal
for tools, datalinks, -
Delete the tests related to Assays, Investigation, Study, members -
Comment the test in /utils
for pagination. -
Re-adapt some responses for the does_not_exist
in the tests of the node and node_type based on the modification of the raise in the/utils/drf.py
Edited by Imane Messak