biglocalnews / bln-python-client

Python client for the biglocalnews.org API
https://bln-python-client.readthedocs.io
Apache License 2.0
5 stars 5 forks source link

Add ability to search through the public data sets in search_projects method on Client. #78

Open lexi2042 opened 2 years ago

lexi2042 commented 2 years ago

As a new user of the bln-python-client I would expect Client.get_project_by_name() and Client().get_project_by_id() to work with the open data sets - as there is no current way for a user to add an open project to their own list of projects.

To accomplish this I have extended the functionality of Client().search_projects() to take an optional boolean that defaults to False. When True method will additionally search through the results of Client().openProjects() using the Predicate(project) supplied to the method.

My branch that I intend to file a pull request for can be found here.

I have found a couple issues with the checks on the commit hooks, and I cannot successfully run the tests because they are set to "dev". If I override that to "prod" they still fail because some of the test data is not available for me. Because of this I have not written new tests to cover the added functionality yet.

for the commit hooks black-doc fails with the error ImportError: cannot import name '_unicodefun' from 'click'.