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

Implement support for category-specific querying: cars. #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

MicImbriani
Copy link
Contributor

Introduce specific search options and functions for car querying.

Cars Ads have more details than other ads. Specifically, cars ads have the following information which other ads dont have:
* conditions of car (new/used)
* date of registration
* km
* fueling type (petrol, diesel, hybrid, etc.)
* gearing (manual, automatic)
* euro-emission

This means that ad-category-specific implementation is required to support querying for this category of products.

Additionally, some fixes and changes were made along the way.

A 'utils' folder helps with separation of concerns.
Moved some utility functions to this folder to keep main file more
organised.

This required to remove all the global invocations of the following
variables:
* queries
* dbFile
* apiCredentials

Finally, added utils function for checking the price against the
user-defined minPrice and maxPrice.
Introduce check of query criteria against product details by moving the
check for price against minPrice and maxPrice in dedicated function.

This will make code future-proof, as it will allow to define multiple
criteria checks, rather than only the price.
Introduce support black-listing keywords as an additional filtering
method for users.

TODO:
Implement possibility to let users add keywords from CMD, rather than
hardcoding them in the .py file
Cars ads have more details than other items. Specifically, cars ads have
the following information:
* conditions of car (new/used)
* date of registration
* km
* fueling type (petrol, diesel, hybrid, etc.)
* gearing (manual, automatic)
* euro-emission

This means that type-specific implementation is needed for this category
of products.

Add arg flags to specify the km and registration date query criteria.
Add BLACKLIST list for cars, and support for including it in the
blacklisting check.
Add utils for car-specific functions.
@morrolinux
Copy link
Owner

Hi, thanks for your contribution!
It looks like some other changes were made while you were working on this branch and now you'll need to pull locally, rebase and fix the conflicts before continuing.
Aside from that, would you mind splitting each improvement category in a separate pr?
For instance, blacklisting, has nothing to do with cars and should be easy to review and merge first.

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