scikit-hep / root_pandas

A Python module for conveniently loading/saving ROOT files as pandas DataFrames
MIT License
109 stars 35 forks source link

Recursive brace expansion is broken #64

Closed tmadlener closed 6 years ago

tmadlener commented 6 years ago

Dear all,

After updating to 0.3.2 I have encountered the following issue, which was working before. The problem is the following: Suppose I want to expand the expression 'var{A,B}{1,2}' then I would expect it to be expanded to ['varA1', 'varA2', 'varB1', 'varB2']. Previously this was working as expected, however, with the current version I get the following: ['varB}{1', 'varA', 'var2'].

I think I have tracked it down to the brace expansion and the changes introduced in d57161947dbc6549d015cda40321b3e500db6a25, specifically I think it is the changes to the regular expression that introduced this behavior.

After having had a look at the tests, I see that this is probably not a completely unknown issue. Switching back to the regex as it was before the commit mentioned above, fixes the recursive expansion, but breaks the "multiple expansions with braces in name" case.

I haven't found a solution that works for both cases yet, unfortunately.

chrisburr commented 6 years ago

Fixed via #65