You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.1 KiB

  1. ## Gooey 1.0.8 Released!
  2. Another minor Gooey release! This one brings a new global Gooey Option for setting initial values in the UI, support for `version` action types, plus a few bug/linting fixes.
  3. Additionally, I continue to plug away at getting the test coverage to useful levels. We're now pushing 80% coverage which is making working on Gooey with confidence much easier!
  4. ### New Gooey Options: initial_value
  5. This option lets you specify the value present in the widget when Gooey starts.
  6. ```python
  7. parser.add_argument('-my-arg', widget='Textarea', gooey_options={
  8. 'initial_value': 'Hello world!'
  9. })
  10. ```
  11. Or, using the new `options` helpers:
  12. ```python
  13. from gooey import options
  14. parser.add_argument('-my-arg', widget='Textarea', gooey_options=options.Textarea(
  15. initial_value='Hello World!'
  16. ))
  17. ```
  18. If you've been using Gooey awhile, you'll recognize that this overlaps with the current behavior of `default`. The new `initial_value` enables you to supply a truly optional seed value to the UI. When using `default`, even if the user clears your value out of the UI, argparse will add it back in when it parses the CLI string. While this is often useful behavior, it prevents certain workflows from being possible. `initial_value` let's you control the UI independent of argparse. This means you can now, for instance, set a checkbox to be checked by default in the UI, but optionally allow the user to deselect it without having argprase re-populate the 'checked' state (a behavior which comes up frequently in the issue tracker due to it being technically correct, but also very confusing!).
  19. ### action=version support
  20. When using `action='version'` Gooey will now map it a CheckBox widget type.
  21. ### Other Fixes / Changes:
  22. * Bug fix: add missing translation step for tabbed group titles (@neonbunny)
  23. * Linting: swap `is not` for `!=` (@DrStrinky)
  24. ## Breaking Changes
  25. **No breaking API changes from 1.0.7 to 1.0.8**
  26. ## Thank you to the current [Patreon supporters](https://www.patreon.com/chriskiehl)!
  27. * Sponsors:
  28. * Qteal
  29. * Individuals:
  30. * Joseph Rhodes
  31. * Nicholas
  32. * Joey