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

Table Features Backlog #266

Open
jarvisteach opened this Issue Oct 14, 2017 · 9 comments

Comments

Projects
None yet
3 participants
@jarvisteach
Owner

jarvisteach commented Oct 14, 2017

Grid is getting close to stable now. Lots of issues open regarding it, going to close them all and move them here:

  • Have widget fill window #255, #263
  • Have a configurable size #263
  • Option to expand GUI #255
  • Finish implementing setting colours/fonts #232
  • Fix menu, so some items get greyed out
  • Look at using a paned window to allow resizing bounds
  • Look at renaming (Table/Waffle)
  • Look at alternative implementation #152
  • make tables sortable #271
  • Easy link to sqlite
  • Easy link to Pandas
  • Quick way to select a row or column
  • DB rows/columns break once changed - the DB ID is used, which doesn't match the position
  • See issue #383 for better styling
  • See issue #383 for adding columns of tick boxes, hyperlinks, etc
  • Configurable entry row (see #383)
  • Use labels drawn on canvas instead (see #392)
  • Check boxes available on rows/columns (#464)
  • Vertical orientation tables (#511)
  • Investigate missing add but (#502)
  • Include additional colour properties (#517]

@jarvisteach jarvisteach added this to the 1.0 milestone Oct 14, 2017

jarvisteach added a commit that referenced this issue Oct 15, 2017

Resolved ScrollPane config
Fixed issues with calling config on SimpleGrid #270, #266

jarvisteach added a commit that referenced this issue Oct 15, 2017

Solution for resize issues
Now when a column is added, grid should keep its size #266

jarvisteach added a commit that referenced this issue Oct 15, 2017

Function to sort grids #271
Added simple functions for sorting grids #266

jarvisteach added a commit that referenced this issue Oct 15, 2017

Grid Menu Items disabled #266
Grid now disables inappropriate menu items correctly

jarvisteach added a commit that referenced this issue Oct 15, 2017

Updates to grid #266
Some more calls to resize grid.

Also, changed bg of button highlight and cell type for buttons.

jarvisteach added a commit that referenced this issue Oct 15, 2017

new function for getting type
Tidying up OO #270 - minimised use of __class__
Also, can now set Grid width/height #266
@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Oct 17, 2017

Should be easy & documented to load data from sqlite.

Code addRows to be compatible with a cursor:

cursor.execute('''SELECT name, email, phone FROM users''')
names = [description[0] for description in cursor.description]
for row in cursor:
    print('{0} : {1}, {2}'.format(row[0], row[1], row[2]))

Get rows should return a list of tuples:

users = [(name1,phone1, email1, password1),
         (name2,phone2, email2, password2),
         (name3,phone3, email3, password3)]
cursor.executemany(''' INSERT INTO users(name, phone, email, password) VALUES(?,?,?,?)''', users)

jarvisteach added a commit that referenced this issue Oct 17, 2017

Settings Updates #236
Can now have appJar use settings files automatically:
* constructor has useSettings flag
* command line argument for useSettings & optional fileName
* go() then uses a settings file
* stop() will save to the settings file

This required a change to how geom was handled - didn’t deal well with
a full geom string

Also, included fix for googleMaps #275

Also, tweaked grid entry boxes, so they are header cells #266

jarvisteach added a commit that referenced this issue Nov 29, 2017

Linking database to grid #266
Experimenting with how to link grids to sqlite

Have working prototype - new function: `.addDbGrid(title, db, table)`

jarvisteach added a commit that referenced this issue Dec 3, 2017

DB Grid updates #266
Function to replace DB data in a grid
* Updates the headers
* Then replaces all data

Modified update headers to add in additional columns.

jarvisteach added a commit that referenced this issue Dec 10, 2017

jarvisteach added a commit that referenced this issue Dec 10, 2017

jarvisteach added a commit that referenced this issue Jan 27, 2018

Tweaking #266
Working on using DB grid
@othoma

This comment has been minimized.

othoma commented Feb 6, 2018

Hello, Not really an issue, but didn't know where to post.
Is there any chance that Grid get compatible with pandas dataframe the same way it is with Databases?

Thanks

@BlueKenny

This comment has been minimized.

Contributor

BlueKenny commented Feb 6, 2018

Hey, good work 👍
Is there a way to let the user select a entire row if he click on one cell ?

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Feb 6, 2018

@othoma & @BlueKenny - these are both good feature requests, I've added them to the list above.

There's currently no way built in to do either, you could code a function to display a pandas dataframe, it should be fairly straightforward - if you do, share the code, then I can incorporate it into the library.

For selecting rows/columns, I can build that into the right click menu, and perhaps introduce an extra cell at the top/side of columns/rows for selecting...

@BlueKenny

This comment has been minimized.

Contributor

BlueKenny commented Feb 6, 2018

I think an option to active single cells selection or only row selection should be usefull ?

@othoma

This comment has been minimized.

othoma commented Feb 6, 2018

@jarvisteach Great to read that the request have been taken into account. Thanks
Yet, I've jumped into programming (and python as it's the first language I learn) two weeks ago.
I'll try but if anyone dare to help....

@othoma

This comment has been minimized.

othoma commented Feb 7, 2018

Additionally, after giving it a try last night, I'm now able to mention this: Grid, probably isn't the best solution for pandas dataframe...

the function I use is the following:

def openfile(self):
    path = app.openBox(title="myfile", dirName=None, fileTypes=[('text', '*.txt'), ('text', '*.csv')], asFile=False, parent=None)
    dataframe = pd.read_csv(path, sep='\t', encoding="ISO-8859-1", low_memory=False)
    df = dataframe.head().values.tolist()
    app.addGrid("grid", df)
    app.setStatusbar("Your file is: %s" % (path), field=0)
    app.setStatusbar("Rows: %s | Columns: %s" % (dataframe.shape[0], dataframe.shape[1]), field=1)

I receive a grid with the content without the index.
That is more a pandas option that I need to investigate.

However the file I'm trying to show contains 258903 rows and 83 columns. (180 Mb)

I let the modified function run overnight without the

head()

as I wanted to have the whole dataframe to show up

df = dataframe.values.tolist()

After ten hours, it was still computing the conversion to a grid, while in the console with
print(tabulate(dataframe, headers='keys', tablefmt='psql')) or the view dataframe in pycharm variable explorer only take a second or so.

I also gave a try to this https://github.com/bluenote10/PandasDataFrameGUI which is very good but some kind of standalone window where we could be more interested in a widget.

Any views or idea on this ?

jarvisteach added a commit that referenced this issue Feb 11, 2018

New log level, stop property, error checking on autoEntries, grid opt…
…ions

#367 - new TRACE log level, for appjar messages
#340 - stop function & parameter to constructor
#266 ability to select row/column - not finished, and has issues if new
rows/columns added
#366 - error messages when calling autoEntry functions on
non-autoEntries

jarvisteach added a commit that referenced this issue Feb 11, 2018

Grid updates & logLevel property #340
New functions for DB grid #266:
* select row/column
* add db option box
* refresh db grid/optionBox
* fixed issue with incorrect rows for db grid & bad entry boxes
* updated click menu for new select functions

jarvisteach added a commit that referenced this issue Feb 12, 2018

jarvisteach added a commit that referenced this issue Feb 12, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Feb 12, 2018

Have started the process of migrating to being called Table, rather than Grid

Will leave in old function names until version 1.1, with deprecated messages.

@othoma

This comment has been minimized.

othoma commented Feb 14, 2018

Excited about the easy link to pandas. If I can help in testing, I'd be glad to do so.

jarvisteach added a commit that referenced this issue Feb 18, 2018

Working table colours #266
Table now has configurable colours
Also, updated styling a little

jarvisteach added a commit that referenced this issue Feb 18, 2018

Table Updates #266
Some work on fonts & styling.
Multiple buttons supported.
Rows no longer look for db key.
Simplified select row.

jarvisteach added a commit that referenced this issue Feb 18, 2018

jarvisteach added a commit that referenced this issue Feb 18, 2018

Fixed column select/delete #266
Also a bit more styling

jarvisteach added a commit that referenced this issue Feb 18, 2018

jarvisteach added a commit that referenced this issue Feb 18, 2018

Final table tweaks #266
Fixed issue inserting before.

jarvisteach added a commit that referenced this issue Feb 18, 2018

Table button updates #266
Having a single row button doesn’t pass button name, otherwise name is
also passed

jarvisteach added a commit that referenced this issue Feb 18, 2018

jarvisteach added a commit that referenced this issue Mar 1, 2018

Grid updates
Improved performance of Grid #266
* moved some calculations outside of loops
* changed some loops to use map or list comprehension
* used join instead of string concatenation

Changed how DB grids get data - now instead of generating a list, and
passing the list as a param, it passes the cursor, and grid loops
through that.

New option to disabled entry boxes - pass in an array of positions to
disable, or call new function `.disableTableEntry()`

Also, new option to stop GUIs without destroying widgets #395

jarvisteach added a commit that referenced this issue Mar 1, 2018

testing issue #388
Fixed Db table problems in #266
* Can’t check for Cursor, unless sqlite3 is imported
* Fixed use of max to count num columns

jarvisteach added a commit that referenced this issue Mar 2, 2018

jarvisteach added a commit that referenced this issue Jul 3, 2018

Investigating #475
Change to table #266:
* Introduced changeFunction to tables - called when the table is modified by the r-click menu.
* Fixed issue recently introduced that new columns weren't grided with same expansion.
* Fixed weird issue where new columns weren't calling join properly?

jarvisteach added a commit that referenced this issue Jul 25, 2018

Working on: #475, #266, #396
Table now returns a `lastChange` dict, detailing the last event.
The editMenu can be configured to generate an event, insetad of perform an action.
Renamed some menuHelper values.

jarvisteach added a commit that referenced this issue Jul 25, 2018

Working on #475, #266, #396
Moved dbDemo to isssue 396

@jarvisteach jarvisteach changed the title from Grid Updates to Table Features Backlog Aug 10, 2018

This was referenced Aug 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment