feat: Add environment information CLI#2129
Open
matthewfeickert wants to merge 16 commits into
Open
Conversation
7e840bb to
e64a2b3
Compare
e64a2b3 to
0a2495e
Compare
0a2495e to
daf692e
Compare
daf692e to
ae37c30
Compare
kratsg
approved these changes
Apr 11, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2129 +/- ##
==========================================
+ Coverage 98.28% 98.30% +0.02%
==========================================
Files 65 66 +1
Lines 4305 4360 +55
Branches 465 470 +5
==========================================
+ Hits 4231 4286 +55
Misses 46 46
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1f7c13f to
cc1d2e6
Compare
CentOS 7 has multiple
Add pyhf.utils.environment_info() and pyhf utils environment CLI command to surface OS, Python, pyhf, numpy, scipy, and (if installed) iminuit/jax version information in a Markdown-friendly bullet list format for bug reports. Optional packages show "not installed" when absent. Resolves #1580 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…on 3.9 platform.freedesktop_os_release was added in Python 3.10, so monkeypatch raises AttributeError on 3.9 without raising=False. Co-Authored-By: Giordon Stark <kratsg@gmail.com>
… is absent Adds test simulating Python 3.9 (no platform.freedesktop_os_release) with /etc/os-release not present, exercising the raise OSError branch in the manual fallback implementation. Co-Authored-By: Giordon Stark <kratsg@gmail.com>
b8409cb to
ff8ba4c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #1580
Add
pyhf.utils.environment_infowhich produces a Markdown-friendly bullet list summary of the environment useful for bug reports. Also adds a CLI commandpyhf utils environment. Optional backends (iminuit, jax, jaxlib) show "not installed" when absent.Example output:
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: