Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate data and API : Tickets [507] & [299] #508

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

alencon
Copy link
Contributor

@alencon alencon commented Feb 29, 2024

[507] : stored procedure which delete all duplicate data and organization unused
[299] : Prevent duplicate entry on API

LuisBlanche and others added 6 commits December 12, 2023 09:10
prompts for Organisation Teams Project and Experiment Creations , uses typer instead of click
allows to create and list organisations, projects and teams from the CLI
@alencon alencon self-assigned this Feb 29, 2024
@alencon alencon changed the title [507]:cleaning duplicate data and organization unused Fix duplicate data and API : Tickets [507] & [299] Feb 29, 2024
Copy link
Contributor

@LuisBlanche LuisBlanche left a comment

Choose a reason for hiding this comment

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

Its very nice to add those 3 tabs ! On a side note I think we need to decide where to put the python queries to the api between dashboard/data/data_loader.py and codecarbon/core/api_client.py

)
if existing_organization:
raise HTTPException(
status_code=404,detail=f"the organization name {organization.name} is already existed"
Copy link
Contributor

Choose a reason for hiding this comment

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

f"the organization named {organization.name} already exists"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just corrected that anomaly

Copy link
Contributor

Choose a reason for hiding this comment

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

f"the project named {project.name} of team {project.team_id} already exists"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just corrected that anomaly

)
if existing_team:
raise HTTPException(
status_code=404,detail=f"the team name {team.name} of that organization {team.organization_id} is already existed"
Copy link
Contributor

Choose a reason for hiding this comment

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

f"the team name {team.name} of organization {team.organization_id} is already exists"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just corrected that anomaly

dashboard/layout/pages/home.py Outdated Show resolved Hide resolved
Copy link
Contributor

@benoit-cty benoit-cty left a comment

Choose a reason for hiding this comment

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

I encounter error when running SQL Script.


--RAISE NOTICE '------- START -------';
RAISE NOTICE 'The rows affected by A=%',a_count;
RAISE NOTICE 'Delete experiments which contains any runs affected'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RAISE NOTICE 'Delete experiments which contains any runs affected'
RAISE NOTICE 'Delete experiments which contains any runs affected';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix stored procedure



RAISE NOTICE '--------------';
RAISE NOTICE 'Delete projects which contains any experiments affected'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RAISE NOTICE 'Delete projects which contains any experiments affected'
RAISE NOTICE 'Delete projects which contains any experiments affected';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix stored procedure



RAISE NOTICE '--------------';
RAISE NOTICE 'Delete teams which contains any project affected '
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RAISE NOTICE 'Delete teams which contains any project affected '
RAISE NOTICE 'Delete teams which contains any project affected ';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix stored procedure



RAISE NOTICE '--------------';
RAISE NOTICE 'Delete organizations which contains any teams affected'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
RAISE NOTICE 'Delete organizations which contains any teams affected'
RAISE NOTICE 'Delete organizations which contains any teams affected';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix stored procedure


DROP TABLE temp_table;

COMMIT; -- end of transaction
Copy link
Contributor

Choose a reason for hiding this comment

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

I got an error :

ERROR:  invalid transaction termination
CONTEXT:  PL/pgSQL function spcc_purgeduplicatedata() line 115 at COMMIT
SQL state: 2D000

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix stored procedure

@alencon alencon requested a review from benoit-cty March 27, 2024 21:37
@benoit-cty benoit-cty linked an issue Apr 5, 2024 that may be closed by this pull request
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.

Explain dashboard usage in README
3 participants