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

feat(commands): add creation timestamp and user name inside commands #2252

Merged
merged 16 commits into from
Dec 11, 2024

Conversation

maugde
Copy link
Contributor

@maugde maugde commented Nov 27, 2024

Resolve ANT-1705

@maugde maugde requested a review from MartinBelthle November 28, 2024 08:19
@maugde maugde self-assigned this Nov 28, 2024
@maugde maugde requested a review from sylvlecl November 28, 2024 13:25
Copy link
Contributor

@MartinBelthle MartinBelthle left a comment

Choose a reason for hiding this comment

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

I talked with Alexander and put the conclusion inside the JIRA ticket but basically wehave to do the conversion in the back from user_id to user name. Also ,we have to do it cleverly meaning if we retrieve 500 commands don't do 500 requests to have the user name but rather one for each individual user

@maugde maugde changed the title feat(commands): add update timestamp for studies feat(commands): add update timestamp and user name for studies Dec 2, 2024
@maugde maugde force-pushed the feat/ANT-1705-add-update-timestamp-for-studies branch from 0b25e3e to 8c840ba Compare December 3, 2024 16:40
@maugde maugde requested review from MartinBelthle and removed request for sylvlecl December 4, 2024 08:49
Copy link
Contributor

@MartinBelthle MartinBelthle left a comment

Choose a reason for hiding this comment

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

The code seems okay but you'll have to add integration tests.

  • Tests with 2 users altering the same study, you retrieve their names.
  • Tests that one user appending two commands only call once the DB for user name
  • Tests that it works with bots (add the test inside test_integration_token_end_to_end)

@maugde maugde requested a review from MartinBelthle December 6, 2024 09:49
Copy link
Contributor

@MartinBelthle MartinBelthle left a comment

Choose a reason for hiding this comment

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

Minor reviews, it seems almost done :)

antarest/study/storage/variantstudy/snapshot_generator.py Outdated Show resolved Hide resolved
tests/integration/test_integration_token_end_to_end.py Outdated Show resolved Hide resolved
tests/variantstudy/model/test_variant_model.py Outdated Show resolved Hide resolved
tests/variantstudy/model/test_variant_model.py Outdated Show resolved Hide resolved
@maugde maugde force-pushed the feat/ANT-1705-add-update-timestamp-for-studies branch from ee86077 to c5fd412 Compare December 10, 2024 13:18
@maugde maugde requested a review from MartinBelthle December 10, 2024 13:51
tests/variantstudy/model/test_variant_model.py Outdated Show resolved Hide resolved
tests/variantstudy/model/test_variant_model.py Outdated Show resolved Hide resolved
tests/variantstudy/model/test_variant_model.py Outdated Show resolved Hide resolved
tests/integration/test_integration_token_end_to_end.py Outdated Show resolved Hide resolved
@maugde maugde requested a review from MartinBelthle December 11, 2024 09:00
@MartinBelthle MartinBelthle changed the title feat(commands): add update timestamp and user name for studies feat(commands): add update timestamp and user name inside commands Dec 11, 2024
@MartinBelthle MartinBelthle changed the title feat(commands): add update timestamp and user name inside commands feat(commands): add creation timestamp and user name inside commands Dec 11, 2024
@MartinBelthle MartinBelthle merged commit 93884de into dev Dec 11, 2024
13 checks passed
@MartinBelthle MartinBelthle deleted the feat/ANT-1705-add-update-timestamp-for-studies branch December 11, 2024 09:10
@makdeuneuv makdeuneuv added this to the v3.0.0 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants