Skip to content

Drop uproot3 dependency and use uproot4 for writing #1566

@matthewfeickert

Description

@matthewfeickert

Description

Thanks to @jpivarski's awesome and heroic work uproot v4.1.0 can now write ROOT files! 🚀

This means that once we get everything working we can drop the uproot3 dependency for the xmlio extra

pyhf/setup.py

Lines 11 to 14 in ce2ffab

'xmlio': [
'uproot3>=3.14.1',
'uproot~=4.0',
], # uproot3 required until writing to ROOT supported in uproot4

and in the tests

uproot3:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip --no-cache-dir --quiet install --upgrade --editable .[test]
python -m pip uninstall --yes uproot3
python -m pip install --upgrade git+git://github.com/scikit-hep/uproot3.git
python -m pip list
- name: Test with pytest
run: |
python -m pytest -r sx --ignore tests/benchmarks/ --ignore tests/contrib --ignore tests/test_notebooks.py

and in the lower bound tests

# xmlio
uproot3==3.14.1
uproot==4.0.0

This shouldn't be too bad as there is only a few instances of uproot3 being used at the moment

$ git grep "uproot3" src/
src/pyhf/writexml.py:import uproot3 as uproot
src/pyhf/writexml.py:from uproot3_methods.classes import TH1

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions