Changelog History
-
v1.0.7 Changes
November 29, 2020๐ Gooey 1.0.7 Released!
๐ Lots of new stuff this release! We've got 3 new widget types, new gooey_options, as well as some quality of Life improvements for using Gooey Options.
๐ New Widgets: IntegerField, DecimalField, and Slider
Gooey now has 3 inputs specifically geared towards accepting numeric inputs. Previously, all Gooey had were text fields which you could add
validators
to in order to enforce only numbers were entered, but now we have top level widgets which do all of that out of the box!Important Usage Note: since these numeric inputs don't allow any non-numeric characters to be entered, they do not give you the ability to blank them out. Unlike a
TextField
which can be left empty and thus have its value not passed to your program, the numeric inputs will always send a value. Thus, you have to have sane handling in user-land.๐ Checkout the Options docs for more details.
๐ New Gooey Options: placeholder
Widgets with text inputs now all accept a
placeholder
Gooey option.add\_argument('--foo', widget='TextField', gooey\_options=options.TextField( placeholder='Type some text here!')# or without the options helper add\_argument('--foo', widget='TextField', gooey\_options={ 'placeholder': 'Type some text here!'})
๐ New Validator option: RegexValidator
add\_argument('--foo', widget='TextField', gooey\_options=options.TextField( placeholder='Type some text here!', validator=options.RegexValidator( test='\d{4}', message='Must be exactly 4 digits long!' ) )# or without the options helper add\_argument('--foo', widget='TextField', gooey\_options={ 'placeholder': 'Type some text here!', 'validator': { 'type': 'RegexValidator', 'test': '\d{4}', 'message': 'Must be exactly 4 digits long!' } })
๐ New feature: Options helpers
Gooey now has a top-level
options
module which can be imported. Previously, Gooey Options have been an opaque map. While great for openness / extensibility, it's pretty terrible from a discoverability / "what does this actually take again..?" perspective. The newoptions
module aims to make usinggooey_options
easier and more discoverable.from gooey import options
๐ The goal is to enable IDE's to provide better auto-completion help as well as more REPL driven usefulness via help() and docstrings.
from gooey import optionsparser.add\_argument( '--foo', help='Some foo thing', widget='FilterableDropdown', gooey\_options=options.FilterableDropdown( placeholder='Search for a Foo', search\_strategy=options.PrefixSearchStrategy( ignore\_case=True ) ))
Note that these are just helpers for generating the right data shapes. They're still generating plain data behind the scenes and thus all existing
gooey_options
code remains 100% compatible.๐ Better Docs:
Which is to say, documentation which actually exists rather than not exist. You can inspect the docs live in the REPL or by hopping to the symbol in editors which support such things.
>>> from gooey import options >>> help(options.RadioGroup) Help on function FileChooser in module __main__ : FileChooser(wildcard=None, default_dir=None, default_file=None, message=None, **layout_options) :param wildcard: Sets the wildcard, which can contain multiple file types, for example: "BMP files (.bmp)|.bmp|GIF files (.gif)|.gif" :param message: Sets the message that will be displayed on the dialog. :param default_dir: The default directory selected when the dialog spawns :param default_file: The default filename used in the dialog Layout Options: --------------- Color options can be passed either as a hex string ('#ff0000') or as a collection of RGB values (e.g. `[255, 0, 0]` or `(255, 0, 0)`) :param label_color: The foreground color of the label text :param label_bg_color: The background color of the label text. :param help_color: The foreground color of the help text. :param help_bg_color: The background color of the help text. :param error_color: The foreground color of the error text (when visible). :param error_bg_color: The background color of the error text (when visible). :param show_label: Toggles whether or not to display the label text :param show_help: Toggles whether or not to display the help text :param visible: Hides the entire widget when False. Note: the widget is still present in the UI and will still send along any default values that have been provided in code. This option is here for when you want to hide certain advanced / dangerous inputs from your GUI users. :param full_width: This is a layout hint for this widget. When True the widget will fill the entire available space within a given row. Otherwise, it will be sized based on the column rules provided elsewhere.
Ideally, and eventually, we'll be able to completely type these options to increase visibility / usability even more. However, for backwards compatibility reasons, Gooey will continue to be sans anything more than the most basic of type hinting for the time being.
๐ฅ Breaking Changes
No breaking API changes from 1.0.6 to 1.0.7. However, the strictness of existing Gooey Options has been increased, which could result in issues when upgrading from 1.0.6. In an attempt to be helpful, Gooey now throws an exception if invalid Gooey Options are supplied. This is to catch things like invalid types or ill-formed data. If you were passing bad data in 1.0.6, it will now be flagged as such in 1.0.7.
๐ Thank you to the current Patreon supporters!
- Sponsors:
- Qteal
- Individuals:
- Joseph Rhodes
- Nicholas
- Sponsors:
-
v1.0.6 Changes
November 15, 2020๐ Gooey 1.0.6 Released!
๐ This is a minor release beefing up the new FilterableDropdown's search capabilities and performance. In the previous release, the dropdown was backed by WX's
ListBox
widget. 1.0.6 replaces this for a fully virtualized version which allows Gooey to operate on massive datasets without taking a hit to UI performance. Additionally, how Gooey internally filters for matches has also been updated. Choice are now backed by a trie for super fast lookup even against large data sets. Tokenization and match strategies can be customized to support just about any lookup style.โก๏ธ Head over to the Examples Repo to see the updated demo which now uses a datset consisting of about 25k unique items.
๐ New Gooey Options:
FilterableDropdown
now takes asearch_strategy
in itsgooey_options
.from gooey import Gooey, GooeyParser, PrefixTokenizersgooey\_options={ 'label\_color': (255, 100, 100), 'placeholder': 'Start typing to view suggestions', 'search\_strategy': { 'type': 'PrefixFilter', 'choice\_tokenizer': PrefixTokenizers.ENTIRE\_PHRASE, 'input\_tokenizer': PrefixTokenizers.REGEX('\s'), 'ignore\_case': True, 'operator': 'AND', 'index\_suffix': False } })
This gives control over how the choices and user input get tokenized, as well as how those tokenized matches get treated (ANDed together vs ORd). Want to match on any part of any word? Enable the
index_suffix
option to index all of your candidate words by their individual parts. e.g.Word: 'Banana' Suffixes: ['Banana', 'anana', 'nana', 'ana']
These all get loaded into a trie for super fast lookup. Combine this with the
WORDs
tokenizer, and you get really fine grained search though your options!๐ Thank you to the current Patreon supporters!
- Qteal
- Joseph Rhodes
๐ฅ Breaking Changes
No breaking changes from 1.0.5.
-
v1.0.5 Changes
November 08, 2020๐ Gooey 1.0.5 Released!
Gooey is now using WX 4.1.0!
This change should resolve several issues in Ubuntu as well as the numerous other quirks which have been reported.
๐ Thank you to the current Patreon supporters!
- Qteal
- Joseph Rhodes
๐ New widgets:
FilterableDropdown
๐ You can checkout a runnable example in the GooeyExamples repo here
Example Code:
add\_argument( choices=['a', 'b', 'c'], widget='FilterableDropdown', gooey\_options={ 'no\_match': 'No results found!', 'placeholder': 'Type something!'})
This introduces a new language translation key: "no_matches_found" to handle the case where the user's input doesn't match any of the choices. This is used by default, but can be overridden via gooey options
Elapsed Time / Estimated time remaining
@JackMcKew put in a herculean effort and introduced a new feature where elapsed and estimated remaining time can be shown in addition to the standard progress bar.
You can checkout an example here
Example Code:
@Gooey(timing\_options={'show\_time\_remaining':True,'hide\_time\_remaining\_on\_complete':True})
๐ฅ Breaking Changes
- (documentation breaking)
terminal_font_weight
's public documented API allowed the strings "NORMAL" and "BOLD" while its internal implementation relied on numeric font weights (light=200, normal=300, etc..). The documentation was updated to show the correct usage and a constants file was added to the public API.
Functionality
- ๐ง @neonbunny enabled Parsers to use configuration from parents.
- โก๏ธ @eladeyal-intel updated
RichTextConsole
to allow control+scrollwheel to zoom the text
Language Additions / Improvements
- ๐ @soleil0-0 - Additional Chinese translation
- ๐ @dancergraham - Additional French translation
- ๐ @ajvirSingh1313 - Hindi translation
๐ Bug Fixes
- ๐ Fixed bug where dynamic updates to a Dropdown would cause the selection to be lost
- ๐ Fixed performance issues where dynamic updates with large items would cause Gooey to hang
- โก๏ธ @rotu fixed a bug in dynamic updates related to
Popen
usage. - โ @neonbunny - resolved warning cause by missing return statement
- ๐ Fixed bug where terminal font and colors were not being set correctly
- ๐ Fixed mysterious RadioGroup issue where underlying WxWidgets would 'forget' the current selection under certain circumstances
-
v1.0.4 Changes
June 21, 2020๐ Gooey 1.0.4 Released!
Gooey picked up some cool new widget types thanks to awesome contributions from @NathanRichard and @conradhilley.
๐ The rest of this release was focused on bug fixes and quality improvements. My commitment is to having Gooey be a stable, reliable project. This has required slowly shedding it's fast and loose hobby project past. Test coverage more than doubled between 1.0.3 and 1.0.4 and several bugs were fixed along the way as a result of this. The next few releases of Gooey will be similarly focused on bringing its codebase up to snuff so that wider changes can be made without introducing unexpected regressions.
โฌ๏ธ Upgrading from 1.0.3 to 1.0.4
๐ Translation notice! Yes/No options in confirmation modals are now backed by the language files. Previously, they were fixed to english regardless of the selected language. If the new language options aren't configured for your language, you will now see a translation request in the button label!
What's new
Widgets: TimeChooser
Usage:
parser = GooeyParser()parser.add\_argument('--time', widget='TimeChooser')
๐ @NathanRichard added this one after an excellent deep dive into the complexities of dealing with time inside of WX. See the README for notes on usage.
Widgets: ColourChooser
Usage:
parser = GooeyParser()parser.add\_argument('--color', widget='ColourChooser')
@conradhilley brought this one to life. You can now select colors from an awesome little chooser widget.
0๏ธโฃ CLI based defaults
@jschultz added the ability to use arguments passed on the command line as defaults in Gooey. Enable this functionality by passing
use_cmd_args
to the Gooey decorator.@Gooey(use\_cmd\_args=True)def main(): parser = ArgumentParser() parser.add\_argument('--foo')
0๏ธโฃ Now any CLI args you pass when invoking your program will show up as defaults in Gooey.
python my_program.py --foo "hello!"
โ Additional features
- โ Added option to start Gooey in full screen mode
Language Additions / Improvements
- ๐ @foben - documentation fixes
- ๐ @gediz - turkish translations
- ๐ @dsardelic - bosnian & Croatian translations
- ๐ @partrita - Korean translations
๐ Bug Fixes
- ๐ป Main README image had a typo "Command Lines Applications"
- Truthy values
- ๐ Fixed bug where nargs in textfields weren't being mapped correctly
- ๐ Fixed bug where argparse's SUPPRESS flag was showing in the UI
- ๐ Fixed missing i18n capabilities in modals
- ๐ Fixed bug where program_description wasn't being honored
- ๐ Fixed bug where gooey_options weren't being honored in the Header
- ๐ Fixed bug where RadioGroup wasn't enabling it's child widget when
initial_selection
was set - ๐ Fixed bug where checkboxes weren't honoring visibility options
- ๐ Fixed bug where gooey_options weren't being passed to footer
-
v1.0.3 Changes
September 22, 2019๐ After cooking for far too long, Gooey 1.0.3 is released!
โ Grab the latest version:
โ Runnable demos for all the new features can be found in the Examples repo.
Overview:
๐ A lot of focus was put on settling Gooey down into a more stable mature project. In addition to all of the new features, a lot of time was spent writing documentation, stamping down cross platform issues / quirks, and making numerous tweaks and additions to enable a smoother experience when packaging Gooey for distribution.
What's new
Fancy Layout controls!
๐ The main goal of this release was enabling more complex real-world layouts and more customization of Gooey's UI. As of 1.1.0, you now have have control over every color, font, and display status within the application. You can now brand Gooey to your organization's colors, logically group related items under a central heading, and optionally show/hide all the individual components that make up an input widget.
Menu Bars
Gooey now includes a simple declarative system for creating top level menu bars and items.
๐ The menu option currently supports three flavors:
AboutDialog
This is an AboutDialog as rendered natively by your OS. It's a good place to show standard info like version info, descriptions, licenses, etc.. in a standard way across platforms.
๐ MessageDialogs
๐ Next up are general message dialogs. You can display any informational text inside of these.
๐ Link
๐ Finally, you can create fixed menu items that simply link to external resources, for instance, your site, documentation, pdfs, etc..
Rich Text Controls
Thanks to @NathanRichard, Gooey can now optionally honor terminal control sequences and display Rich Text in the output panel.
๐ New Gooey Program Icon
๐ New icon provided by professional cool guy and crazy talented UX designer Justin Rhee.
โ Additional features
- OSX now shows program Icon in Dock
show_error_modal
option to toggle whether or not failures additionally raise alert modals.BlockCheckbox
widget.- ๐ป Hyperlinks written to the console appear as such and will launch a browser on click
clear_before_run
option lets you control whether or not subsequent program runs start from a fresh terminal or preserve the previous output.- Conditionally show/hide restart button
- 0๏ธโฃ
requires_shell
option - controls howPopen
spawns your program. By default (and historically), this value is False. - โก๏ธ Optionally silence textual progress updates when using the Progress widget (via @conradhilley)
- Multi-Directory Choosers - these were accidentally dropped from the project. @HenrykHaniewicz added them back!
- โ Additional explicit wx imports to make packaging on OSX easier
- Textfields can now be made Readonly for informational purposes
- better custom target support via
suppress_gooey_flag
which prevents the--ignore-gooey
flag from being injected
๐ฅ Breaking Changes
No breaking changes between
1.0.0
and1.1.0
!Language Additions / Improvements
๐ Completed Italian translation - @gison93
โก๏ธ Updated French translation - @NathanRichard
โก๏ธ Updated Hebrew translation - @eturkes
๐ Bug Fixes
- ๐ Fixed 5 year old bug(!) where an errant lambda function wasn't passing through all of its arguments which caused frustratingly opaque failures under specific conditions.
- ๐ Fixed bug where external updates weren't applied to
ListBox
- ๐ Fix bug where tuples weren't coerced to List which causes concatenation errors
- Fixed bug where string coercion in
argparse_to_json
was too broad and caused type errors - ๐ Fixed bug where wrong validator was applied to Dropdown type causing preflight checks to always fail
- ๐ Fixed bug where Radio Groups would apply too much vertical spacing between components
- ๐ Fixed bug where subgroups with single items were attached to the wrong UI parent
- ๐ Fixed bug where legacy default groups weren't being translated
- ๐ Fixed bug where certain languages would sometimes cause components to be rendered off screen
-
v1.0.3.1 Changes
April 25, 2020๐ This is a temporary hotfix downgrading the wxpython used by Gooey to 4.0.7.
๐ WxPython 4.10 introduced unexpected breaking changes. These changes caused Gooey to fail when starting up.
๐ If you are seeing errors such as this when running Gooey
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_HORIZONTAL)" failed at ..\..\src\common\sizer.cpp(2106) in wxBoxSizer::DoInsert(): Horizontal alignment flags are ignored in horizontal sizers
๐ This release will resolve them.
Longer term solution to follow pending additional research.