GSOC 2020: New additions to old PRs

GSOC 2020: Polishing my code

I spent last most of the previous two weeks on resolving reviews on my old PRs and improving gallery examples.

Heavy rains begins in Vadodara

Knowing time intervals from URL patterns

I created PR #4419 that allows getting file time-ranges from the URL using the scraper. The URL patterns from most of the archives have start time in them. Either the end time was usually hardcoded for all clients or we only used start time to validate the file URLs against a time interval.

In my Clients Generalization, to escape this repetitiveness the code in post_search_hook() was somewhat less generalized. It was assumed that all files are day-long. Thus I generalized it and moved it to the scraper. From the base URL pattern, we can now the precision of time supported by the archive directories, and then using them we can find the end times. Say there are yearly files in an archive. Then we can default the end time to the end of that year. Moreover, if this time range overlaps with the searched time interval, the file is valid. We check it using _check_timerange().

Removed optional from class attributes

We now need to register all ‘attrs’ supported by the client in PR #4321. This helped me to escape from defining optional attrs. We use register_values() only to know whether the client can serve the query or not.

Fido metadata queries Gallery Example

I have added a new gallery example in PR #4358 which summarizes what we can do after the pull request is merged. We can make metadata queries and easily inspect them. A lot of minor improvements were also made in the PR.

Extracting client responses from Fido result

Earlier we have to specify index as an argument to get_response() to do that. It required us to count the records to find the correct index. Now we can easily use the name of the client to retrieve QueryResponse instances for that client. If there are multiple such records, then a list of all matching records will be returned.

ToDos for the final two weeks

I have to document how to write Fido clients and add tests to the Fido metadata compatibility. Let’s see what other issues I can tackle in these pull requests.

Till then,