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

panda-shortname doesn't work with period datasets #9

Open
kratsg opened this issue Oct 31, 2018 · 2 comments
Open

panda-shortname doesn't work with period datasets #9

kratsg opened this issue Oct 31, 2018 · 2 comments

Comments

@kratsg
Copy link
Contributor

kratsg commented Oct 31, 2018

I expected this to work:

./panda-shortname data16_13TeV:data16_13TeV.periodI.physics_Main.PhysCont.DAOD_SUSY10.grp16_v03_p3372

but it doesn't since the dataset ID is periodI instead of a number (somewhat unexpected but...)

@dguest
Copy link
Owner

dguest commented Nov 1, 2018

I've done the somewhat useless thing here and added a help wanted label.

@matthewfeickert
Copy link
Collaborator

To maybe pick up this Issue again soon:

$ docker run --rm -it -e USER="${USER}" python:3.8 /bin/bash
# python -m pip install --upgrade -q pip setuptools wheel
# pip install -q pandamonium
# pip list
Package      Version
------------ -------
panda-client 1.4.36
pandamonium  0.1.0
pip          20.2.3
setuptools   50.3.0
wheel        0.35.1
# panda-shortname data16_13TeV:data16_13TeV.periodI.physics_Main.PhysCont.DAOD_SUSY10.grp16_v03_p3372
Traceback (most recent call last):
  File "/usr/local/bin/panda-shortname", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/pandamonium/panda_shortname.py", line 49, in main
    oname = process_name(ds_name, args.remove, args.prefix, args.suffix)
  File "/usr/local/lib/python3.8/site-packages/pandamonium/panda_shortname.py", line 74, in process_name
    assert dsid.isdigit(), "dsid ({}) not a number".format(dsid)
AssertionError: dsid (periodI) not a number

So currently looking at the code

# sanity checks
assert dsid.isdigit(), "dsid ({}) not a number".format(dsid)

it seems this could be addressed with an or.

This example is also probably good as a unit test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants