wooey / Wooey

A Django app that creates automatic web UIs for Python scripts.
http://wooey.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.13k stars 184 forks source link

Lists using argparse #207

Closed pymenow closed 6 years ago

pymenow commented 6 years ago
parser.add_argument(
    '-ml', '--mzlist',
    default=['14', '16', '18', '20', '28', '32', '40'],
    nargs='+',
    help='A list to analyze ',
    required=False)

The above code works fine on a standalone / cmdline system . Where user inputs spaced apart are taken in as a single list EG : -ml 2 34 56 2 ml = ['2', '34', '56', '2']

However this doesnt work in wooey.

Chris7 commented 6 years ago

Thanks, this is because default values were not being serialized properly. I have a fix for it, but it may time a little time until the official release. There is a fair bit of testing I need to do for the new subparsers. If that takes a longer than expected time, I might do another patch release.

pymenow commented 6 years ago

i have overcome this by using a str and then splitting it in my code. However a list if always useful . Please let me know if I can help test it

Chris7 commented 6 years ago

It is now in master, you can test it by installing the latest from there.

pymenow commented 6 years ago

@Chris7 testing in master has been going on well. PLanning to open this up to a larger audiance in the company, wondering when the next release is targeting as I am concerned about losing the database once we go wide.

Chris7 commented 6 years ago

I put in a considerable number of changes with how scripts are uploaded to avoid duplicates (they now have a checksum) and the subparsers. I want to add in support for the latest versions of celery & Django, and then I think a release will be coming. I'm not sure on the timeline, but probably a few weeks.