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

Add function to read TEfficiency #275

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

Conversation

longjon929
Copy link
Contributor

@longjon929 longjon929 commented Jan 27, 2025

Adds a function to read in TEfficiency by creating a TGraph and feeding that into the existing TGraph reader.


📚 Documentation preview 📚: https://hepdata-lib--275.org.readthedocs.build/en/275/

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.54%. Comparing base (62a82d5) to head (c814f20).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #275      +/-   ##
==========================================
+ Coverage   90.51%   90.54%   +0.03%     
==========================================
  Files           5        5              
  Lines        1117     1121       +4     
  Branches      237      230       -7     
==========================================
+ Hits         1011     1015       +4     
  Misses         78       78              
  Partials       28       28              
Flag Coverage Δ
unittests-3.10 90.54% <100.00%> (+0.03%) ⬆️
unittests-3.11 90.54% <100.00%> (+0.03%) ⬆️
unittests-3.6 ?
unittests-3.7 90.18% <100.00%> (+0.03%) ⬆️
unittests-3.8 90.27% <100.00%> (+0.03%) ⬆️
unittests-3.9 90.36% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@clelange
Copy link
Collaborator

Hi @longjon929 -- thanks for your contribution! It would be great if you added some small tests to make sure the code works as expected and we will not break it in the future when making further changes. Do you think you could add some? Have a look at how we test other parts of the code and let me know if you need help.

@longjon929
Copy link
Contributor Author

@clelange I will try to take a look when I get a chance.

"""
name = "teff"

teff = ROOT.TEfficiency(name, name, 2, 0, 2)
Copy link
Member

Choose a reason for hiding this comment

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

Looks like pylint has an issue with this line:
tests/test_rootfilereader.py:186:15: E1101: Module 'ROOT' has no 'TEfficiency' member (no-member)
I encountered this issue when upgrading the pylint version in PR #260. The workaround was to add # pylint: disable=no-member to the end of the affected lines (see commit 3a0f1ea).

By the way, the developer docs advise that pylint should be run locally before pushing to GitHub to check for any issues. You might also want to consider extending the section of the docs on Reading from ROOT files (source in docs/usage.rst) to mention the new functionality. Thanks for your contribution!

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