-
Notifications
You must be signed in to change notification settings - Fork 11
Renamed project filter query parameter to project_id for Project Summary entities
#668
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
354b190
Renamed "project" filter query parameter to "project_id" for Project …
mohamedelabbas1996 db175c3
Fixed project association in create_ml_pipeline function
mohamedelabbas1996 e53ab1c
Added tests for filtering by "project_id" on Project Summary entities
mohamedelabbas1996 c23da11
Fixed a spelling typo
mohamedelabbas1996 c9b88bf
Refactored open api project_id docs params, get_project logic and mov…
mohamedelabbas1996 cfeaf17
Applied changes to the frontend
mohamedelabbas1996 0f7b9cb
Updated all entities in the project page to filter by
mohamedelabbas1996 f35d00e
Updated tests to use parameter instead of
mohamedelabbas1996 76b84dd
Removed occurrences__project query param
mohamedelabbas1996 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -549,7 +549,7 @@ def setUp(self) -> None: | |
| def test_occurrences_for_project(self): | ||
| # Test that occurrences are specific to each project | ||
| for project in [self.project_one, self.project_two]: | ||
| response = self.client.get(f"/api/v2/occurrences/?project={project.pk}") | ||
| response = self.client.get(f"/api/v2/occurrences/?project_id={project.pk}") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice work tracking down all the existing uses!!! |
||
| self.assertEqual(response.status_code, 200) | ||
| self.assertEqual(response.json()["count"], Occurrence.objects.filter(project=project).count()) | ||
|
|
||
|
|
@@ -592,7 +592,7 @@ def _test_taxa_for_project(self, project: Project): | |
| """ | ||
| from ami.main.models import Taxon | ||
|
|
||
| response = self.client.get(f"/api/v2/taxa/?project={project.pk}") | ||
| response = self.client.get(f"/api/v2/taxa/?project_id={project.pk}") | ||
| self.assertEqual(response.status_code, 200) | ||
| project_occurred_taxa = Taxon.objects.filter(occurrences__project=project).distinct() | ||
| # project_any_taxa = Taxon.objects.filter(projects=project) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding this. When we optimize the Taxa view, I think we will be able to remove this function.