Skip to content

Commit

Permalink
Mark python reader v0.4.1 (#613)
Browse files Browse the repository at this point in the history
* python reader: Remove num_records

* Bump python reader version
  • Loading branch information
daboehme authored Oct 29, 2024
1 parent c3156f8 commit 5944222
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
3 changes: 0 additions & 3 deletions python/caliper-reader/caliperreader/caliperreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ def __init__(self):
self.records = []
self.globals = {}

self.num_records = {}


def read(self, filename_or_stream):
""" Read a .cali file or stream.
Expand All @@ -47,7 +45,6 @@ def read(self, filename_or_stream):

self.db = sr.db
self.globals = sr.globals
self.num_records = sr.num_records


def attributes(self):
Expand Down
8 changes: 0 additions & 8 deletions python/caliper-reader/caliperreader/caliperstreamreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ class CaliperStreamReader:
Attributes:
globals : dict
The global key:value attributes defined in the .cali file
num_records : dict
The number of different kinds of records read
"""

def __init__(self):
self.db = MetadataDB()
self.globals = {}
self.num_records = {}


def read(self, filename_or_stream, process_record_fn = None):
Expand Down Expand Up @@ -82,11 +79,6 @@ def _process(self, line, process_record_fn = None):
elif kind == 'globals':
self.globals = self._expand_record(record)

if not kind in self.num_records:
self.num_records[kind] = 0

self.num_records[kind] += 1


def _process_node_record(self, record):
parent = Node.CALI_INV_ID
Expand Down
1 change: 1 addition & 0 deletions python/caliper-reader/caliperreader/metadatadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def _expand(self, record):
if attr.is_nested():
record['path'] = record.get('path', []) + [ self.data ]


class Attribute:
""" A Caliper attribute key.
Expand Down
2 changes: 1 addition & 1 deletion python/caliper-reader/caliperreader/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#
# SPDX-License-Identifier: BSD-3-Clause

__version_info__ = ("0", "4", "0")
__version_info__ = ("0", "4", "1")
__version__ = ".".join(__version_info__)
2 changes: 1 addition & 1 deletion python/caliper-reader/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "caliper-reader"
version = "0.4.0"
version = "0.4.1"
description = "A Python library for reading Caliper .cali files"
authors = [
{ name="David Boehme", email="[email protected]" },
Expand Down

0 comments on commit 5944222

Please sign in to comment.