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

feat: Add API to download likelihood patchset archives #1046

Merged
merged 49 commits into from
Oct 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a2123dd
Add download command
matthewfeickert Aug 22, 2020
c193320
Add exception for invalid host
matthewfeickert Aug 22, 2020
f2c8751
Verify archive host is valid
matthewfeickert Aug 22, 2020
92ca11f
Add tests for download
matthewfeickert Aug 22, 2020
29455e9
Add raises to docstring
matthewfeickert Aug 22, 2020
beaa9d5
Add all the flags
matthewfeickert Aug 22, 2020
ff8e8b1
Make pyflakes happy
matthewfeickert Aug 22, 2020
70f6367
Print output to screen for verbose tests
matthewfeickert Aug 22, 2020
f9570a8
Add comment on motivation for wait
matthewfeickert Aug 22, 2020
0588447
Visually seperate logic
matthewfeickert Aug 22, 2020
ec77de8
Use Python 3.6 compliant code
matthewfeickert Aug 22, 2020
ffe4d33
Make download be pure-Python
matthewfeickert Aug 22, 2020
bb99c9b
Use term 'host' for consistency
matthewfeickert Aug 22, 2020
001bacc
Check explicilty for failure state
matthewfeickert Aug 22, 2020
1645b51
Use only Python stdlib for CLI
matthewfeickert Aug 22, 2020
1eb04f9
Attempt to deal with Python 3.6 having different warnings
matthewfeickert Aug 22, 2020
bc03e95
Migrate from patchset to contrib
matthewfeickert Sep 11, 2020
4d62266
Add example to docstring
matthewfeickert Sep 11, 2020
f21a69e
Fix docstrings
matthewfeickert Sep 11, 2020
909fdac
Use 'pyhf contrib download' API to reinforce contrib nature
matthewfeickert Sep 11, 2020
ea23305
Use urllib.parse.urlparse
matthewfeickert Sep 12, 2020
f77156c
Use requests for opening archives
matthewfeickert Sep 12, 2020
c882c24
Add note that contrib extra is required
matthewfeickert Sep 12, 2020
36a8dd0
Add www to match pattern in tests
matthewfeickert Sep 12, 2020
2f8d1b3
Make requests a true dependency
matthewfeickert Sep 12, 2020
7f3bb72
Try just the minimal for an optional dependency
matthewfeickert Sep 12, 2020
d9a3dbb
Make note of contrib more clear
matthewfeickert Sep 12, 2020
47b7ad1
Move import inside of download function
matthewfeickert Sep 13, 2020
75e1889
Add test for missing requests module
matthewfeickert Sep 13, 2020
6e8ccd7
Guard contrib functions beyond cli in try except
matthewfeickert Sep 14, 2020
3797d44
Update tests for guarded pyhf contrib download
matthewfeickert Sep 14, 2020
7e23fa9
Add Contrib to Python API docs
matthewfeickert Sep 17, 2020
8bddb71
Correct mislabeling of analysis
matthewfeickert Sep 17, 2020
3fcbcba
Add Python API to contrib download
matthewfeickert Sep 17, 2020
3717003
Wrap Python API in CLI API
matthewfeickert Sep 17, 2020
83bd2ef
Allow for POSIX tar archives that are not gzip
matthewfeickert Sep 17, 2020
d04564c
Sort to avoid doctest error
matthewfeickert Sep 19, 2020
ef71fca
Fixup of test_scripts
matthewfeickert Sep 19, 2020
506e59e
Use del of modules to force state
matthewfeickert Oct 1, 2020
0ca56bc
Fix typo
matthewfeickert Oct 1, 2020
39b8feb
Use mock after watching Anthony Sottile's video
matthewfeickert Oct 5, 2020
8fc005a
Revert "Allow for POSIX tar archives that are not gzip"
matthewfeickert Oct 5, 2020
0af5ba4
Add TOOD for removal of Python 3.6
matthewfeickert Oct 5, 2020
560fe64
Add note
matthewfeickert Oct 5, 2020
2afb313
Use log.error instead of print
matthewfeickert Oct 6, 2020
0e05559
Make pyflakes happy
matthewfeickert Oct 6, 2020
8178fa3
ERROR not INFO
matthewfeickert Oct 6, 2020
d8e2761
Remove unneeded variable
matthewfeickert Oct 6, 2020
b72e399
Don't rely on newlines being in output given systems
matthewfeickert Oct 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add TOOD for removal of Python 3.6
  • Loading branch information
matthewfeickert committed Oct 9, 2020
commit 0af5ba4f0082e4380d31dec2674a82e0e5e95330
1 change: 1 addition & 0 deletions tests/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ def test_patchset_download(datadir, script_runner, archive):
command = f'pyhf contrib download --verbose --force https://www.fail.org/record/resource/1234567 {datadir.join("likelihoods").strpath}'
ret = script_runner.run(*shlex.split(command))
assert not ret.success
# TODO: https://github.com/scikit-hep/pyhf/issues/1075
# Python 3.6 has different return error than 3.7, 3.8
assert (
"ssl.CertificateError: hostname 'www.fail.org' doesn't match"
Expand Down