Skip to content

Commit

Permalink
fix _refresh_stats bug and change version to 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Nov 14, 2023
1 parent 4ea21c2 commit ed6b7fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [0.13.3] -- 2023-11-xx
## [0.14.0] -- 2023-11-xx
### Changed
- refactor for pipestat v0.6.0 release
- drop python 2.7
Expand Down
2 changes: 1 addition & 1 deletion pypiper/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.13.3"
__version__ = "0.14.0"
15 changes: 8 additions & 7 deletions pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1856,17 +1856,18 @@ def _refresh_stats(self):

if os.path.isfile(self.pipeline_stats_file):
_, data = read_yaml_data(path=self.pipeline_stats_file, what="stats_file")
print(data)
pipeline_key = list(
record_identifier = list(
data[self._pipestat_manager.pipeline_name][
self.pipestat["_pipeline_type"]
self._pipestat_manager.pipeline_type
]
)[0]
if self.name == pipeline_key:

# Confirm that the loaded stats file is the same namespace as the pipeline manager
if record_identifier == self._pipestat_manager.record_identifier:
for key, value in data[self._pipestat_manager.pipeline_name][
self.pipestat["_pipeline_type"]
][pipeline_key].items():
self.stats_dict[key] = value.strip()
self._pipestat_manager.pipeline_type
][record_identifier].items():
self.stats_dict[key] = value

def get_stat(self, key):
"""
Expand Down

0 comments on commit ed6b7fb

Please sign in to comment.