From d103f5b4fb4d90263e1a037be5ce769acdcd565b Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Mon, 20 May 2019 14:11:47 -0500 Subject: [PATCH 1/3] version number for coordinated release --- uproot_methods/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uproot_methods/version.py b/uproot_methods/version.py index 16e1c60..a09d4fa 100644 --- a/uproot_methods/version.py +++ b/uproot_methods/version.py @@ -4,7 +4,7 @@ import re -__version__ = "0.5.1" +__version__ = "0.6.0" version = __version__ version_info = tuple(re.split(r"[-\.]", __version__)) From 7fce51d3bcdfc2db3c4fb0098a4ed56d132b0227 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Mon, 20 May 2019 16:59:59 -0500 Subject: [PATCH 2/3] update awkward dependency version --- .travis.yml | 2 +- README.rst | 2 +- appveyor.yml | 2 +- requirements.txt | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6fbfed5..29f9ce9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ install: - pip install $NUMPY - if [[ $TRAVIS_PYTHON_VERSION = pypy* ]] ; then pip install "numpy<1.16.0" ; fi # FIXME: pypy bug in numpy - python -c 'import numpy; print(numpy.__version__)' - - pip install "awkward>=0.9.0" + - pip install "awkward>=0.10.0" - python -c 'import awkward; print(awkward.__version__)' - pip install pytest pytest-runner - pip install --upgrade pyOpenSSL # for deployment diff --git a/README.rst b/README.rst index 57e797b..5ae0eca 100644 --- a/README.rst +++ b/README.rst @@ -35,7 +35,7 @@ Dependencies: ------------- - `numpy `__ (1.13.1+) -- `awkward-array `__ (0.9.0+) +- `awkward-array `__ (0.10.0+) .. inclusion-marker-3-do-not-remove diff --git a/appveyor.yml b/appveyor.yml index 4d448c2..24cc471 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,6 +46,6 @@ install: build_script: - "pip install %NUMPY%" - "pip install pytest pytest-runner" - - "pip install \"awkward>=0.9.0\"" + - "pip install \"awkward>=0.10.0\"" - "python -c \"import awkward; print(awkward.__version__)\"" - "pytest -v tests" diff --git a/requirements.txt b/requirements.txt index 91c908e..014b058 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ numpy>=1.13.1 -awkward>=0.9.0 +awkward>=0.10.0 diff --git a/setup.py b/setup.py index 6535878..5d04643 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def get_description(): download_url = "https://github.com/scikit-hep/uproot-methods/releases", license = "BSD 3-clause", test_suite = "tests", - install_requires = ["numpy>=1.13.1", "awkward>=0.9.0"], + install_requires = ["numpy>=1.13.1", "awkward>=0.10.0"], tests_require = [], classifiers = [ "Development Status :: 4 - Beta", From 58cf60ea4935fc77283066aeca841fb68dc71e29 Mon Sep 17 00:00:00 2001 From: Jim Pivarski Date: Mon, 20 May 2019 17:15:34 -0500 Subject: [PATCH 3/3] stub for registering experiment-specific transformers --- uproot_methods/profiles/__init__.py | 12 ++++++++++++ uproot_methods/profiles/cms/__init__.py | 3 +++ uproot_methods/profiles/cms/nanoaod.py | 6 ++++++ 3 files changed, 21 insertions(+) create mode 100644 uproot_methods/profiles/__init__.py create mode 100644 uproot_methods/profiles/cms/__init__.py create mode 100644 uproot_methods/profiles/cms/nanoaod.py diff --git a/uproot_methods/profiles/__init__.py b/uproot_methods/profiles/__init__.py new file mode 100644 index 0000000..e7dcb39 --- /dev/null +++ b/uproot_methods/profiles/__init__.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python + +# BSD 3-Clause License; see https://github.com/scikit-hep/uproot-methods/blob/master/LICENSE + +import importlib +import re + +def transformer(name): + m = re.match("^([a-zA-Z_][a-zA-Z_0-9]*)(\.[a-zA-Z_][a-zA-Z_0-9]*)*$", name) + if m is None: + raise ValueError("profile name must match \"identifier(.identifier)*\"") + return getattr(importlib.import_module("uproot_methods.profiles." + m.string), "transform") diff --git a/uproot_methods/profiles/cms/__init__.py b/uproot_methods/profiles/cms/__init__.py new file mode 100644 index 0000000..9831512 --- /dev/null +++ b/uproot_methods/profiles/cms/__init__.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python + +# BSD 3-Clause License; see https://github.com/scikit-hep/uproot-methods/blob/master/LICENSE diff --git a/uproot_methods/profiles/cms/nanoaod.py b/uproot_methods/profiles/cms/nanoaod.py new file mode 100644 index 0000000..d095ee3 --- /dev/null +++ b/uproot_methods/profiles/cms/nanoaod.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python + +# BSD 3-Clause License; see https://github.com/scikit-hep/uproot-methods/blob/master/LICENSE + +def transform(array): + raise NotImplementedError