-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Removes inputRef / bookmark params from appendRecord #3597
Changes from all commits
f958908
bb5a321
878c810
b3366ca
19fdf1c
949dc68
219e831
227353b
7a93be5
79f5f81
3c77ac2
e8e8e12
767be5a
17f6cc9
08541d3
56800d4
700c4f0
881f065
66fc830
25215e3
245feb6
ab41b27
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -387,7 +387,7 @@ def getNextRecord(self, useCache=True): | |
return record | ||
|
||
|
||
def appendRecord(self, record, inputBookmark=None): | ||
def appendRecord(self, record): | ||
""" | ||
Saves the record in the underlying csv file. | ||
|
||
|
@@ -418,22 +418,17 @@ def appendRecord(self, record, inputBookmark=None): | |
self._recordCount += 1 | ||
|
||
|
||
def appendRecords(self, records, inputRef=None, progressCB=None): | ||
def appendRecords(self, records, progressCB=None): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
""" | ||
Saves multiple records in the underlying storage. | ||
|
||
:param records: array of records as in | ||
:meth:`~.FileRecordStream.appendRecord` | ||
:param inputRef: reference to the corresponding input (not applicable | ||
in case of a file storage) | ||
:param progressCB: (function) callback to report progress | ||
""" | ||
|
||
# input ref is not applicable in case of a file storage | ||
inputRef = inputRef | ||
|
||
for record in records: | ||
self.appendRecord(record, None) | ||
self.appendRecord(record) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to send |
||
if progressCB is not None: | ||
progressCB() | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -284,10 +284,11 @@ def getAggregationMonthsAndSeconds(self): | |
If there is no aggregation associated with the stream, returns None. | ||
|
||
Typically, a raw file or hbase stream will NOT have any aggregation info, | ||
but subclasses of RecordStreamIface, like :class:`~nupic.data.StreamReader`, | ||
will and will return the aggregation period from this call. This call is | ||
used by the :meth:`getNextRecordDict` method to assign a record number to a | ||
record given its timestamp and the aggregation interval | ||
but subclasses of :class:`~nupic.data.record_stream.RecordStreamIface`, like | ||
:class:`~nupic.data.stream_reader.StreamReader`, will and will return the | ||
aggregation period from this call. This call is used by | ||
:meth:`getNextRecordDict` to assign a record number to a record given its | ||
timestamp and the aggregation interval. | ||
|
||
:returns: ``None`` | ||
""" | ||
|
@@ -303,7 +304,7 @@ def getNextRecordIdx(self): | |
|
||
|
||
@abstractmethod | ||
def appendRecord(self, record, inputRef=None): | ||
def appendRecord(self, record): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
""" | ||
Saves the record in the underlying storage. Should be implemented in | ||
subclasses. | ||
|
@@ -313,7 +314,7 @@ def appendRecord(self, record, inputRef=None): | |
|
||
|
||
@abstractmethod | ||
def appendRecords(self, records, inputRef=None, progressCB=None): | ||
def appendRecords(self, records, progressCB=None): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed |
||
""" | ||
Saves multiple records in the underlying storage. Should be implemented in | ||
subclasses. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
inputRef
here in the implementation method.