-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
[issue-307] add 2 extra (on left and right) dots out of zommed box #308
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -296,8 +296,8 @@ def test_log_axis(): | |
assert len(out) == 2 | ||
assert (x1 - x0) < 10 | ||
assert len(out[1]["x"]) == 1000 | ||
assert out[-1]["x"][0] >= 100 | ||
assert out[-1]["x"][-1] <= 50_000 | ||
assert out[-1]["x"][0] >= 99 | ||
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. So here, you increase (i.e. lower) the left boundary, because (when possible) a datapoint to the left is added. Why is there no need to increase the right boundary? 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. (maybe because of a small rounding error with log?) 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. You are right! Nevertheless alter boundary. It would benefit readability |
||
assert out[-1]["x"][-1] <= 50_001 | ||
|
||
|
||
def test_add_traces_from_other_figure(): | ||
|
@@ -997,8 +997,8 @@ def test_time_tz_slicing(): | |
start_idx, end_idx = PlotlyAggregatorParser.get_start_end_indices( | ||
hf_data_dict, hf_data_dict["axis_type"], t_start, t_stop | ||
) | ||
assert (s.index[start_idx] - t_start) <= pd.Timedelta(seconds=1) | ||
assert (s.index[min(end_idx, n - 1)] - t_stop) <= pd.Timedelta(seconds=1) | ||
assert (s.index[start_idx] - t_start) <= pd.Timedelta(seconds=2) | ||
assert (s.index[min(end_idx, n - 1)] - t_stop) <= pd.Timedelta(seconds=2) | ||
|
||
|
||
def test_time_tz_slicing_different_timestamp(): | ||
|
@@ -1064,10 +1064,10 @@ def test_different_tz_no_tz_series_slicing(): | |
) | ||
assert ( | ||
s.tz_localize(None).index[start_idx].tz_localize(t_start.tz) - t_start | ||
) <= pd.Timedelta(seconds=1) | ||
) <= pd.Timedelta(seconds=2) | ||
assert ( | ||
s.tz_localize(None).index[end_idx].tz_localize(t_stop.tz) - t_stop | ||
) <= pd.Timedelta(seconds=1) | ||
) <= pd.Timedelta(seconds=2) | ||
|
||
|
||
def test_multiple_tz_no_tz_series_slicing(): | ||
|
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.
We should certainly add some documentation / issue reference to which this is performed.
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.
added to CHANGELOG.md. Do I need to mention it anywhere else?