Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lemikhovalex
Copy link

No description provided.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.97%. Comparing base (f58db50) to head (7d9123a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
- Coverage   96.49%   95.97%   -0.52%     
==========================================
  Files          14       14              
  Lines        1141     1143       +2     
==========================================
- Hits         1101     1097       -4     
- Misses         40       46       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -85,6 +85,8 @@ def get_start_end_indices(hf_trace_data, axis_type, start, end) -> Tuple[int, in
# Search the index-positions
start_idx = bisect.bisect_left(hf_trace_data["x"], start)
end_idx = bisect.bisect_right(hf_trace_data["x"], end)
start_idx = max(0, start_idx - 1)
Copy link
Member

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.

Copy link
Author

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?

@@ -296,7 +296,7 @@ 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"][0] >= 99
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(maybe because of a small rounding error with log?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right!
-> end_idx = bisect.bisect_right(hf_trace_data["x"], end)
-> end == 49999.99999999999

Nevertheless alter boundary. It would benefit readability

tests/test_figurewidget_resampler.py Show resolved Hide resolved
@JendaPlhak
Copy link

Hello guys :] Can we get this baby merged? It would help me tremendously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants