Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update scripts: add usage message; use argparse #36

Closed
cdeil opened this Issue · 7 comments

3 participants

@cdeil
Owner

All scripts should have a short usage message what they do. @ndawe Can you do that? It's not obvious to me with a few what their purpose is.

And they should use from rootpy.extern import argparse instead of import optparse or import argparse. I'd be happy to do that part.

@ndawe
Owner

Sure. One thing though: argparse is already in the install_requires in the setup.py, so is downloaded and installed automatically. Maybe we don't need a copy of it in extern?

@cdeil
Owner

I would say it's worth keeping argparse in extern:

  • It's one small pure-python file
  • Every user will need it to run a rootpy script and it should be easy to install and start using rootpy for new users. E.g. on the machines at work we don't even have pip installed and actually figuring out how to install and use pip can be a bit complicated.
@ndawe
Owner

Sure, we can keep it in, although python setup.py install should download and install argparse automatically if it isn't already (no pip required).

@cdeil
Owner

Oh, I didn't know python setup.py install would automatically install argparse. I tried it in a virtualenv and it works perfectly, also with pip. In that case I agree we should remove it.

Should I simply make a new commit (which would leave it in our repo history) or try one of those methods?
http://stackoverflow.com/questions/1338728/how-to-delete-a-git-commit

@ndawe
Owner

Leaving it in the history is fine. Let's just remove it and change the imports in the scripts. I still need to convert several of them over to argparse...

@ndawe ndawe was assigned
@pwaller
Owner

Where are we at with this one? Is it essentially done?

@ndawe
Owner

Done

@ndawe ndawe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.