Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDBC-698 Python client - timeseries round 2 #195

Merged
merged 18 commits into from
Dec 4, 2023
Merged

Conversation

poissoncorp
Copy link
Contributor

@poissoncorp poissoncorp requested a review from ml054 December 4, 2023 11:49
@classmethod
def from_json(cls, json_dict: Dict[str, Any]) -> TimeSeriesPolicy:
return cls(
json_dict["Name"],
json_dict["Name"], # todo: Invalid deserialization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -55,7 +56,7 @@ def get_time_series_name(self, raw_name: str) -> str:

def to_json(self) -> Dict[str, Any]:
return {
"Name": self.name,
"Name": self.name, # todo: Invalid serialization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -168,7 +171,7 @@ def execute_all_pending_lazy_operations(self) -> ResponseTimeInformation:
requests = []
for i in range(len(self._pending_lazy_operations)):
# todo: pending lazy operation create request - WIP
req = self._pending_lazy_operations[i].create_request()
req = self._pending_lazy_operations[i].create_arequest()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# return a dictionary {index of time series value - (name of 'float' field, label)}
# e.g. return {0 : ('heart', 'Heartrate'), 1: ('bp', 'Blood Pressure')}
# for some class that has 'heart' and 'bp' float fields
raise NotImplementedError()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertIsNone(session.time_series_for(document_id, "HeartRate").get())

def test_get_on_empty_range_should_return_empty_array(self):
document_id = "users/gracjan"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was "users/ayende" in original source code :)

@poissoncorp poissoncorp requested a review from ml054 December 4, 2023 15:19
@ml054 ml054 merged commit 2fcf58e into ravendb:v5.2 Dec 4, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants