edgi-govdata-archiving/web-monitoring-processing

Most DB API methods should support arbitrary keyword args

Mr0grog opened this issue · 2 comments

Most of the DB API methods have an explicit list of arguments; if you pass others, it’ll cause an error:

def list_pages(self, *, chunk=None, chunk_size=None, sort=None,
tags=None, maintainers=None, url=None, title=None,
include_versions=None, include_earliest=None,
include_latest=None, source_type=None, hash=None,
start_date=None, end_date=None, active=None,
include_total=False):

That’s useful for ensuring your code is correct, but it makes for a lot of extra work we often fail to do in keeping the Python API and the actual REST API in web-monitoring-db in sync. We should ideally support extra, arbitrary keyword arguments (in addition to the known ones) for most methods in order to be forward compatible.

Thinking more about priorities right now; I don’t think this is actually particularly essential (although still nice to have). Dropping this down in priority and taking it off the 2020 roadmap.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in seven days if no further activity occurs. If it should not be closed, please comment! Thank you for your contributions.