Skip to content

Conversation

@migowskiD
Copy link

During working on this branch my team was able to accomplish several goals:

Add POST,PUT,DELETE for arrangements
Add POST,PUT,DELETE for measure names
Add POST,PUT,DELETE for activity
Adding channels, modalities and life activities during creation of dataset
Adding hash name to dataset which can be used as a secret name of the dataset by user (the original name of the dataset is saved as an Alias node in the dataset during its creation)
Fixed tests

migowskiD and others added 30 commits January 20, 2023 17:15
We need to finish tests for dataset router and dataset service. The rest of the tests works.
Created ADD,PUT and DELETE functionalities for arrangements and measure names
- deleted unnecessary prints and comments
- add dataset methods to GriseraAPI
- fixed get_datasets
- create_dataset and delete_dataset need to be fixed
grisera api communicates with graph api to create a dataset of given name
there is an error with indexes (hope to fix it on Monday):
File "/app/database_service.py", line 89, in check_if_database_exists
grisera-framework-graph_api-1                |     for db in response['results'][0]['data']:
grisera-framework-graph_api-1                | IndexError: list index out of range
Before the creation of the dataset, the system checks if the database with this name already exists. If so, the database is not created and the user receives an error with the error cause
Auto creation during creating new dataset
Hash_name will be used as an identifier for the dataset by user
…ed in correct dataset

When the dataset is created, inside it 4 types of nodes are created (35 nodes in total):
- Alias
- Channel
- Life Activity
- Modality
…Activity

Added POST,DELETE and PUT for Activity
…rrangements-and-measure_names

RIRA-25/26
Copy link

@theNIGHTMAR3 theNIGHTMAR3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of work, finally done, great job!

Copy link

@theNIGHTMAR3 theNIGHTMAR3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@terzawad terzawad self-requested a review May 16, 2023 09:03
Copy link
Member

@mrwrob mrwrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems fine, although it is not a big PR to analyze it deeply. Please address the comments.

@router.get("/datasets", tags=["datasets"], response_model=DatasetsOut)
async def get_datasets(self, response: Response):
"""
Get all datasets by name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it gettin datasets by name?

Comment on lines 86 to 98
# found = self.db.dataset_exists(name_hash)
#
# if not found:
# return DatasetOut(errors="Dataset not found")
#
# # get the alias from the DB
# get_aliases_response = self.db.get_aliases_from_database(name_hash)
# name_by_user = ""
# for row in get_aliases_response["results"][0]["data"]:
# if "row" in row:
# if "name_by_user" in row['row'][0]:
# name_by_user = row['row'][0]['name_by_user']
# return DatasetOut(name_hash=name_hash, name_by_user=name_by_user)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out? Please provide explanation in comments.

Result of request
"""

# self.database_url = replace_db_name(self.database_url, database_name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out? Please provide explanation in comments.

@terzawad
Copy link

You should add dataset_name parameter in appropriate functions in each abstract class ..._service. Not only in the implementations of these classes for graphdb.

Copy link
Member

@mrwrob mrwrob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time, please respond to comments (e.g. corrected or done)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants