Skip to content

Commit 24b145c

Browse files
committed
Release v0.2.7: More Brokkr 0.3.0 compat and bugfixes
1 parent 417c3ca commit 24b145c

File tree

4 files changed

+21
-10
lines changed

4 files changed

+21
-10
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Sindri Changelog
22

3+
4+
## Version 0.2.7 (2020-04-29)
5+
6+
Compat and bugfix release with the following changes:
7+
8+
* Handle bytes values as GB rather than B as used by Brokkr >=0.3.x
9+
* Fix warning parsing dates with timezone offset appended
10+
11+
12+
313
## Version 0.2.6 (2020-03-20)
414

515
Compat and bugfix release with the following changes:

src/sindri/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Version file."""
22

3-
VERSION_INFO = (0, 2, 6)
3+
VERSION_INFO = (0, 2, 7)
44
__version__ = '.'.join((str(version) for version in VERSION_INFO))

src/sindri/config/website.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929

3030
STANDARD_COL_CONVERSIONS = {
3131
"runtime": (1 / (60 * 60), 2),
32-
"bytes_read": (1 / 1e9, 2),
33-
"bytes_written": (1 / 1e9, 2),
34-
"bytes_remaining": (1 / 1e9, 2),
32+
"bytes_read": (1, 2),
33+
"bytes_written": (1, 2),
34+
"bytes_remaining": (1, 2),
3535
}
3636

3737
LOG_REPLACE_ITEMS = [

src/sindri/process.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
/ (60 * 60 * 24))),
4545
("trigger_delta", "valid_packets",
4646
(lambda full_data: round(
47-
-1 * full_data["bytes_remaining"].diff(1)
48-
/ (sindri.utils.misc.TRIGGER_SIZE_MB * 1e6)).clip(lower=0))),
47+
-1e3 * full_data["bytes_remaining"].diff(1)
48+
/ sindri.utils.misc.TRIGGER_SIZE_MB).clip(lower=0))),
4949
("trigger_rate_1min", "trigger_delta",
5050
lambda full_data: full_data["trigger_delta"]
5151
/ round(full_data["time"].diff(1).dt.total_seconds() / 60)),
@@ -58,8 +58,8 @@
5858
full_data["trigger_delta"].rolling(60, min_periods=6).mean()
5959
/ round(full_data["time"].diff(60).dt.total_seconds() / (60 * 60))),
6060
("triggers_remaining", "bytes_remaining",
61-
lambda full_data: round(full_data["bytes_remaining"]
62-
/ (1e6 * sindri.utils.misc.TRIGGER_SIZE_MB))),
61+
lambda full_data: round(full_data["bytes_remaining"] * 1e3
62+
/ sindri.utils.misc.TRIGGER_SIZE_MB)),
6363
)
6464

6565

@@ -100,8 +100,9 @@ def preprocess_status_data(raw_status_data, decimate=None,
100100
status_data = raw_status_data.iloc[::decimate, :]
101101
else:
102102
status_data = raw_status_data
103-
status_data["time"] = pd.to_datetime(status_data["time"],
104-
format="%Y-%m-%d %H:%M:%S.%f")
103+
status_data["time"] = pd.to_datetime(
104+
status_data["time"],
105+
format="%Y-%m-%d %H:%M:%S.%f%z").dt.tz_localize(None)
105106
status_data.set_index("time", drop=False, inplace=True)
106107
status_data = status_data[status_data.index.notnull()]
107108

0 commit comments

Comments
 (0)