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

Binning changes #19

Merged
merged 4 commits into from
Jan 2, 2019
Merged

Binning changes #19

merged 4 commits into from
Jan 2, 2019

Conversation

mpmdean
Copy link
Contributor

@mpmdean mpmdean commented Dec 17, 2018

These updates relate to PR #48 on sixtools. This implemented a change to the default binning and allows the code to keep track of the binning even if one wants to crop images with a ROI. This is helpful because it allows sixtools to return directly comparable data from either images or centroided data.

@mpmdean mpmdean requested a review from awalter-bnl December 17, 2018 21:38
@codecov-io
Copy link

codecov-io commented Dec 17, 2018

Codecov Report

Merging #19 into master will increase coverage by 0.71%.
The diff coverage is 92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
+ Coverage   63.19%   63.91%   +0.71%     
==========================================
  Files           4        4              
  Lines         413      424      +11     
==========================================
+ Hits          261      271      +10     
- Misses        152      153       +1
Impacted Files Coverage Δ
rixs/tests/test_process2d.py 100% <100%> (ø) ⬆️
rixs/process2d.py 97.56% <86.66%> (-1.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update affac2c...1e7d61c. Read the comment docs.

@mpmdean
Copy link
Contributor Author

mpmdean commented Dec 18, 2018

I'm having trouble understanding why the tests don't pass as
python3 -m pytest
and
flake8
seem to run fine for me on srv1.

Copy link
Contributor

@awalter-bnl awalter-bnl left a comment

Choose a reason for hiding this comment

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

These changes look OK to me

@mpmdean
Copy link
Contributor Author

mpmdean commented Dec 18, 2018

@awalter-bnl Can you understand why the tests aren't working now?

@awalter-bnl
Copy link
Contributor

@mpmdean this relates to codecov, not the pytest functions that are written directly.

As a simplified explanation codecov looks at each line of code and checks if that line is executed in one of the tests. It then develops statistics regarding this, so 60% coverage is a measure of how much of the code is 'tested'. Of course in reality the algorithms that check this are more detailed than what I have just written but this is a good way to conceive of it.

To make them pass the best option is to work out which lines of code are not being executed with the 'testing' and write some more tests, or extend existing tests, so that these lines will be tested.

In this case I would do the following:

  1. add duplicate lines to tests.test_apply_curvature (lines 61-66 in tests.test_process2d.py) which runs apply_curvature() using an iterable for bins and checks the output.
  2. write a test function for step_to_bins.

@mpmdean
Copy link
Contributor Author

mpmdean commented Dec 28, 2018

The tests are added. Maybe we can merge now since I think the chances of others reviewing this isn't very high.

@awalter-bnl awalter-bnl merged commit 3eacbf0 into scikit-beam:master Jan 2, 2019
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.

3 participants