Comments (1)
Adding
import os
...
ret = script_runner.run(shlex.split(command, posix=(os.name == "posix")))
works, but then there's a new error for
Lines 170 to 183 in 188b7a0
of
_____________________ test_import_usingMounts[inprocess] ______________________
datadir = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_import_usingMounts_inproc0')
tmpdir = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0')
script_runner = <ScriptRunner inprocess>
def test_import_usingMounts(datadir, tmpdir, script_runner):
data = datadir.joinpath("xmlimport_absolutePaths")
temp = tmpdir.join("parsed_output.json")
command = f'pyhf xml2json --hide-progress -v {data}:/absolute/path/to -v {data}:/another/absolute/path/to --output-file {temp.strpath:s} {data.joinpath("config/example.xml")}'
ret = script_runner.run(shlex.split(command, posix=(os.name == "posix")))
> assert ret.success
E assert False
E + where False = <pytest_console_scripts.RunResult object at 0x000002794399A920>.success
command = 'pyhf xml2json --hide-progress -v C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_...\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\xmlimport_absolutePaths\\config\\example.xml'
data = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_import_usingMounts_inproc0/xmlimport_absolutePaths')
datadir = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/pytest-of-runneradmin/pytest-0/test_import_usingMounts_inproc0')
ret = <pytest_console_scripts.RunResult object at 0x000002794399A920>
script_runner = <ScriptRunner inprocess>
temp = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\parsed_output.json')
tmpdir = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0')
tests\test_scripts.py:178: AssertionError
----------------------------- Captured log setup ------------------------------
INFO root:file_util.py:137 copying D:\a\pyhf\pyhf\tests\test_scripts\example_bkgonly.json -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0
INFO root:file_util.py:137 copying D:\a\pyhf\pyhf\tests\test_scripts\example_patchset.json -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0
INFO root:dir_util.py:71 creating C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths
INFO root:dir_util.py:71 creating C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths\config
INFO root:file_util.py:137 copying D:\a\pyhf\pyhf\tests\test_scripts\xmlimport_absolutePaths\config\example.xml -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths\config
INFO root:file_util.py:137 copying D:\a\pyhf\pyhf\tests\test_scripts\xmlimport_absolutePaths\config\example_channel.xml -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths\config
INFO root:file_util.py:137 copying D:\a\pyhf\pyhf\tests\test_scripts\xmlimport_absolutePaths\config\HistFactorySchema.dtd -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths\config
INFO root:dir_util.py:71 creating C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths\data
INFO root:file_util.py:137 copying D:\a\pyhf\pyhf\tests\test_scripts\xmlimport_absolutePaths\data\example.root -> C:\Users\runneradmin\AppData\Local\Temp\pytest-of-runneradmin\pytest-0\test_import_usingMounts_inproc0\xmlimport_absolutePaths\data
---------------------------- Captured stdout call -----------------------------
# Running console script: ['pyhf', 'xml2json', '--hide-progress', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\xmlimport_absolutePaths:/absolute/path/to', '-v', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\xmlimport_absolutePaths:/another/absolute/path/to', '--output-file', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\parsed_output.json', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\xmlimport_absolutePaths\\config\\example.xml']
# Script return code: 2
# Script stdout:
# Script stderr:
Usage: python -m pytest.pyhf xml2json [OPTIONS] ENTRYPOINT_XML
Try 'python -m pytest.pyhf xml2json -h' for help.
Error: Invalid value for '-v' / '--mount': 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_import_usingMounts_inproc0\\xmlimport_absolutePaths:/absolute/path/to' is not a valid colon-separated option
and for
Lines 527 to 543 in 188b7a0
of
___________________ test_combine_merge_channels[inprocess] ____________________
tmpdir = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0')
script_runner = <ScriptRunner inprocess>
def test_combine_merge_channels(tmpdir, script_runner):
temp_1 = tmpdir.join("parsed_output.json")
temp_2 = tmpdir.join("renamed_output.json")
command = f'pyhf xml2json validation/xmlimport_input/config/example.xml --basedir validation/xmlimport_input/ --output-file {temp_1.strpath} --hide-progress'
ret = script_runner.run(shlex.split(command, posix=(os.name == "posix")))
assert ret.success
command = (
f'pyhf prune {temp_1.strpath} --sample signal --output-file {temp_2.strpath}'
)
ret = script_runner.run(shlex.split(command, posix=(os.name == "posix")))
assert ret.success
command = f'pyhf combine --merge-channels --join "left outer" {temp_1.strpath} {temp_2.strpath}'
ret = script_runner.run(shlex.split(command, posix=(os.name == "posix")))
> assert ret.success
E assert False
E + where False = <pytest_console_scripts.RunResult object at 0x000002795EED5F60>.success
command = 'pyhf combine --merge-channels --join "left outer" C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin...nneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\renamed_output.json'
ret = <pytest_console_scripts.RunResult object at 0x000002795EED5F60>
script_runner = <ScriptRunner inprocess>
temp_1 = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\parsed_output.json')
temp_2 = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\renamed_output.json')
tmpdir = local('C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0')
tests\test_scripts.py:548: AssertionError
---------------------------- Captured stdout call -----------------------------
# Running console script: ['pyhf', 'xml2json', 'validation/xmlimport_input/config/example.xml', '--basedir', 'validation/xmlimport_input/', '--output-file', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\parsed_output.json', '--hide-progress']
# Script return code: 0
# Script stdout:
# Script stderr:
# Running console script: ['pyhf', 'prune', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\parsed_output.json', '--sample', 'signal', '--output-file', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\renamed_output.json']
# Script return code: 0
# Script stdout:
# Script stderr:
# Running console script: ['pyhf', 'combine', '--merge-channels', '--join', '"left outer"', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\parsed_output.json', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pytest-of-runneradmin\\pytest-0\\test_combine_merge_channels_in0\\renamed_output.json']
# Script return code: 2
# Script stdout:
# Script stderr:
Usage: python -m pytest.pyhf combine [OPTIONS] [WORKSPACE_ONE] [WORKSPACE_TWO]
Try 'python -m pytest.pyhf combine -h' for help.
Error: Invalid value for '-j' / '--join': '"left outer"' is not one of 'none', 'outer', 'left outer', 'right outer'.
cc @kratsg given the mounts, but I think this is jsut the fact that /
are being used here instead of \
, which Windows wants.
from pyhf.
Related Issues (20)
- Release v0.7.5 checklist
- Python 3.12 support tracking HOT 5
- Pruning with logical "and" instead of "or" HOT 2
- Catch 100% normalization uncertainty modifiers
- Remove `InvalidNameReuse` exception in favor of in `InvalidModel`
- Typing for tensor shapes
- `ValueError: The truth value of an array` ... when using `fixed_params` kwarg for `pyhf.infer.hypotest` HOT 4
- Release v0.7.6 checklist
- Using the hessian matrix in optimization HOT 2
- Typo in docs for qmutilde test-statistic
- Implementation of fixed params in scipy minimizer
- Switch to using 'tensorflow' for Apple silicon Macs for TensorFlow v2.16.1+ HOT 2
- docs linkcheck failing for SciPy conference proceedings
- In Python 3.12 xml.etree.ElementTree will raise DeprecationWarning: Testing an element's truth value will raise an exception in future versions
- In Python 3.12 tarfile raises DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. HOT 1
- Forced measurement object schema validation through `ws.model()` HOT 1
- Inconsistent return types of `model.config.suggested_bounds()` when using parameter config
- Treating arbitrarily correlated parameters with pyhf HOT 3
- toms748_scan doesn't work with JAX backend HOT 6
- xml2json breaks with HistoPath including filename HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyhf.