Closed ayushanand18 closed 2 years ago
Once again, I am sorry for this huge PR.
I don't like the reuse of the name
OBISQueryResult
for all of these classes.I also see you have duplicate code for
get_search_url
in several of these classes. You can define the methods once in a parent class or you can define the functions in a common module and attach them, either will remove the duplication.
Thank you for the review!
NodesQuery
for nodes module and similarly. OBISQueryResult
in obisutils that is inherited by classes in each module.Update: I have made those changes and updated the docstrings.
relevant discussions regarding this reorganization are on #69 and #70
Overview
This is a long PR (very long, I believe) and I am really sorry for that.
This PR aims to add response class
OBISQueryResult
to every module.Changes introduced
A response class in each module has
__init__
function (to initialize but no specialized function to doget_search_url
returns OBIS API URL for the queryget_mapper_url
methods to get OBIS Mapper URL, we identify functions to show a mapper url using aself.mapper
flag (if true for a method then it has a corresponding Mapper URL).Additional Changes
occurrences
module have also been changed just to make it easy for figuring out how things would look after this update. But not for other modules. I am working on another PR after this to work on updating all the docs. I stopped from doing all that in this PR to curtail PR length which is already very huge.Thanks!