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

Search, filter and sort. #107

Merged
merged 24 commits into from
Nov 13, 2023
Merged

Search, filter and sort. #107

merged 24 commits into from
Nov 13, 2023

Conversation

PaulaPerdomo
Copy link
Contributor

@PaulaPerdomo PaulaPerdomo commented Nov 13, 2023

Closes #2.
Closes #3.
Closes #4.
Closes #11.
Closes #13.
Closes #18.

This PR adds the search, filter and sort capability for posts.

Each of the capabilities function both together and individually (i.e., searching can work standalone, or with filtering). If the user inputs a query for searching and then decides to filter by tags, the database query adds the current options to the query to restrict the results more.

Tests for the database function search_filter_sort were added under the test_datalayer_event.py file and considers a variety of scenarios, that include formatting as well as a combination of everything you can do.

Please check the functionality in the frontend :) and run pytest to ensure the tests pass.

PaulaPerdomo and others added 22 commits November 10, 2023 01:12
…mplement sorting with a range, which seems to be a bug on the backend side
Copy link

render bot commented Nov 13, 2023

Copy link

render bot commented Nov 13, 2023

Copy link
Contributor

@meriam04 meriam04 left a comment

Choose a reason for hiding this comment

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

Overall I'm glad we have this functionality combined into one function. There are a few changes that should be made before deploying though. We shouldn't be populating the mock database because it will override our PosgreSQL one. And the clubs and locations should be returned in alphabetical order.

backend/datalayer/event.py Outdated Show resolved Hide resolved
backend/datalayer/event.py Show resolved Hide resolved
backend/app.py Outdated Show resolved Hide resolved
Copy link
Contributor

@tmahabir tmahabir left a comment

Choose a reason for hiding this comment

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

lgtm! Great work!

@tmahabir tmahabir merged commit 55fc3a8 into main Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants