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: update filter library #121

Closed
wants to merge 1 commit into from
Closed

Conversation

raphael0202
Copy link
Contributor

@raphael0202 raphael0202 commented Jan 5, 2024

Switch from fastapi-filter to https://github.com/uriyyo/fastapi-filters that allow to put null values last when performing a sort.
This is necessary when sorting by unique_scans_n, as we don't want null values first (we want the most popular first).
This is a breaking change in the API, as we cannot exactly mimick the parameters of fastapi-filter.

@@ -42,7 +42,7 @@ sqlalchemy = "~2.0.23"
sqlalchemy-utils = "~0.41.1"
uvicorn = "~0.23.2"
fastapi-pagination = "^0.12.12"
fastapi-filter = "^1.0.0"
fastapi-filters = "~0.2.9"
Copy link
Member

Choose a reason for hiding this comment

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

Ah sucks that we have to change filtering library.. Is it a known problem on their side with a tracked issue ? The new library has less users and activity it seems.

Copy link
Member

Choose a reason for hiding this comment

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

I'll check tomorrow when I get back behind the computer :)

Copy link
Member

Choose a reason for hiding this comment

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

I ended up doing a PR #122, to seperate at least the new endpoint and this PR that replaces the filtering library. let me know i can take care of the rebase 🙏

Copy link
Member

Choose a reason for hiding this comment

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

an alternative would be to init unique_scans_n to 0

@raphodn raphodn changed the title feat: add get products endpoint feat: update filter library Jan 8, 2024
@raphael0202
Copy link
Contributor Author

Closing, as it's not required anymore.

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