-
Notifications
You must be signed in to change notification settings - Fork 887
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
Scripts optparse to argparse #2864
Scripts optparse to argparse #2864
Conversation
app = self.get_app(app_spec, self.options.app_name, | ||
options=parse_vars(self.args[2:])) | ||
app = self.get_app(app_spec, self.args.app_name, | ||
options=self.args.config_vars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing parse_vars
parser = optparse.OptionParser( | ||
usage, | ||
parser = argparse.ArgumentParser( | ||
prog="pviews", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop prog
argument
@@ -38,7 +38,8 @@ def _makeConfig(self, *arg, **kw): | |||
def test_good_args(self): | |||
cmd = self._getTargetClass()([]) | |||
cmd.bootstrap = (dummy.DummyBootstrap(),) | |||
cmd.args = ('/foo/bar/myapp.ini#myapp', 'a=1') | |||
cmd.args.config_uri = ('/foo/bar/myapp.ini#myapp',) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a tuple
inst = self._makeOne() | ||
inst.args = ['foo', 'a=1', 'b=2'] | ||
result = inst.get_options() | ||
inst.args.config_args = ['a=1', 'b=2'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config_vars
ptweens and pviews are ready for review. I'm stuck on pshell, and I don't know where to go next. I think I got pshell to run as follows. Using my local project from the starter scaffold, I did There are probably mistakes in my pshell, too, the latest of which is committed and pushed here. In the tests (latest also committed and pushed), there's |
You need to fix the |
All things pass, except docs continue to fail to build (due to Sphinx/docutils bug), but build locally. Hopefully Sphinx will make a new release with the fix. Ready for final review. Can you believe it? |
22db456
to
ed1764d
Compare
- add sphinxcontrib-autoprogram - attempt to render output of pcreate, but be unsuccessful
- restore argv - use standard Python syntax for string formatting
…it from pdistreport.rst
…eing emitted for invalid commands
I'll review this in a little bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a simple comment, besides that, LGTM. @mmerickel I'll leave the merging to you in case you have any last minute requests.
@@ -51,11 +51,11 @@ def nothing(*arg): | |||
extensions = [ | |||
'sphinx.ext.autodoc', | |||
'sphinx.ext.doctest', | |||
'repoze.sphinx.autointerface', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reasoning for the ordering of these? Or can they be alphabetized?
Thanks for powering through @stevepiercy |
Thank you for your guidance and patience. Hope the multiple facepalm wounds heal. |
Closes #2804 |
refs: #2842