Comments (5)
;) Can we not just substitute the default string to avoid having to
replicate arguments?
On Wed, Nov 20, 2013 at 12:49 PM, Dent Earl [email protected]:
Commit 76a4328 76a4328bdbroke argparse functionality by failing to maintain the new method of
displaying default values in help strings. The old, optparse method is to
usehelp="blah blah blah default=%default"
and the argparse method, is to use
help="blah blah blah default=%(default)s"
The two methods are incompatible with one another, which was why we had
two methods to handle this.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/17
.
from jobtree.
I could see something like
if isinstance(addOptionFn, WhateverClassIsArgparseGroup):
default_str = '%(default)s'
else:
default_str = '%default'
And then having your help be like
... help='blah blah blah default=%s' % default_str)
But I haven't actually tested that, so I'm not sure it'll work but it's the first thing that pops into my head.
from jobtree.
If that's the issue it should work. Do you want me to do it? I did break it.
On Wed, Nov 20, 2013 at 1:17 PM, Dent Earl [email protected] wrote:
I could see something like
if isinstance(addOptionFn, WhateverClassIsArgparseGroup):
default_str = '%(default)s'else:
default_str = '%default'And then having your help be like
... help='blah blah blah default=%s' % default_str)
But I haven't actually tested that, so I'm not sure it'll work but it's
the first thing that pops into my head.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-28931803
.
from jobtree.
Yes please :)
I think the only tricky part will be figuring out the correct class for the isinstance
call
from jobtree.
Fixed
from jobtree.
Related Issues (20)
- Relative imports don't always work in jobTree HOT 1
- Deep thoughts (by Glenn) HOT 1
- LogLevel options are not included in the jobtree options group, leading to confusing help messages HOT 1
- Job Tree does not re-build the stats.xml file frequently enough HOT 2
- Please reconsider dependency on sonLib HOT 1
- Please limit the permissions for the tmp_* directories build by `make test`
- entire jobTree crashes when a job's pickle file isn't written correctly HOT 6
- Crash getting global temp dir when restarting jobtree HOT 2
- periodically hangs entire parasol hub when listing jobs HOT 2
- Documentation/code separation of script tree from everything else is confusing
- Documentation examples should use the neater function specification
- Sonlib dependency is unnecessary
- Should make package pip installable
- restarting jobTree the parameter changes have no effect
- job failures not correctly reducing retry count
- make test error
- jobTree support for argparse HOT 2
- Stalling behavior with --maxThreads --maxJobs HOT 1
- When --batchSystem != singleMachine, --maxThreads should spark an error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jobtree.