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

Return only latest artefacts to frontend #27

Merged
merged 6 commits into from
Jun 19, 2023

Conversation

nadzyah
Copy link
Collaborator

@nadzyah nadzyah commented Jun 16, 2023

In this PR, I've updated the v1/families/{family_name} endpoint to return only latest artefacts
It closes RTW-98

I'd tried to implement it with SQL queries, but ended up duplicating code from get_artefacts_by_family_name method. So, if we needed to change the logic of retrieving latest artefacts, we would have to do it in two places

That's why I've decided to use this method and some Python loops (unfortunately)

@nadzyah nadzyah requested a review from omar-selo June 16, 2023 13:23
@nadzyah nadzyah requested a review from omar-selo June 19, 2023 11:39
@nadzyah nadzyah merged commit 62809eb into main Jun 19, 2023
@nadzyah nadzyah deleted the return-latest-artefacts-frontend branch June 19, 2023 12:40
omar-selo pushed a commit that referenced this pull request Jun 19, 2023
* Fix the get_artefacts_by_family_name function

* Return only latest artefacts to frontend

* Fix style issues

* Use groupby from itertools and check family name

* Add test_families

* Fix style issues
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.

2 participants