Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Resultset #154

Merged
merged 26 commits into from
Apr 9, 2015
Merged

Resultset #154

merged 26 commits into from
Apr 9, 2015

Conversation

aviau
Copy link
Collaborator

@aviau aviau commented Apr 8, 2015

No description provided.

@aviau aviau mentioned this pull request Apr 8, 2015
aviau and others added 25 commits April 8, 2015 16:28
list(resultset)        -> liste de série (chacune contenant liste de points)
list(resultset["key"]) -> liste de points (correspondant à "key")
+ test_write_points_check_read
+ test_write_multiple_points_different_series
+ test_create_retention_policy_default
+ if a serie is the result of a "system" query: it has no name attribute.
+ a serie can also have no associated tags.
1) cli.query() which now returns a ResultSet, which must be list()ed in order to obtain the list of series.
2) assertListEqual instead of assertDictEqual for a list result.

TODO: but now we have to fix the results format.
Other solution is to return the ResultSet instance but then we must adapt all call sites..

To be decided..
@aviau aviau force-pushed the resultset branch 3 times, most recently from 600aeb9 to b9430f9 Compare April 9, 2015 02:16
aviau added a commit that referenced this pull request Apr 9, 2015
@aviau aviau merged commit 7576b33 into master Apr 9, 2015
@aviau aviau deleted the resultset branch April 9, 2015 14:06
@gst
Copy link
Contributor

gst commented Apr 9, 2015

Not that I'm against that you merge your own PR , but for this one there could/should have been at least a big squash of the vast majority of the temporary/tests commits..

and some few others things too that I'd have liked to comment on the final result.. it's never too late, in resultset.py :

    def __iter__(self):
        """ Iterating a ResultSet will yield one dict instance per serie result.
        """
        for key in self.keys():
            yield list(self.__getitem__(key))
  1. docstring: it's not (anymore) dict instances which are yielded, but lists (of "points")
  2. self.getitem(key) <=> self[key] # the later being the preferred / pythonic way..

@aviau
Copy link
Collaborator Author

aviau commented Apr 9, 2015

Not that I'm against that you merge your own PR , but for this one there could/should have been at least a big squash of the vast majority of the temporary/tests commits..

We both worked on the PR and I didn't want to remove your authorship. The good thing to do would have been to squash it all under one single commit :( But you're right. I still could have squashed commits in-between.

I'll wait for ResultSet to be stable before I make a new release, so its best to work on master.

@gst
Copy link
Contributor

gst commented Apr 9, 2015

We both worked on the PR and I didn't want to remove your authorship.

for such temporary crappy test commits it's ok ;)

The good thing to do would have been to squash it all under one single commit :(

ultimately yep.
we'll see as you say.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants