Commit Graph

579 Commits (f12e35fef902a0b725717e8a6bc7d9c977bcf7b3)
 

Author SHA1 Message Date
Salvo 'LtWorf' Tomaselli c6d6bbfeaf Refresh relation list in any case
If a query was failing, created relations were not shown in the list
of relations.
2015-09-09 14:45:17 +07:00
Salvo 'LtWorf' Tomaselli 1b2dc96af1 Re-generated UI 2015-09-09 12:43:25 +07:00
Salvo 'LtWorf' Tomaselli 862c71fdfb Clear session button and changed layout
Added a button to clear the current session

changed the disposition of the operator buttons, to take up less
vertical space. Now it should be better to fit smaller screens.
2015-09-09 12:42:00 +07:00
Salvo 'LtWorf' Tomaselli 66855ad50c Clear session function
Added a function to clear the current session
2015-09-09 12:38:54 +07:00
Salvo 'LtWorf' Tomaselli 7742afd046 Removed redundant comments
Just pointing the documentation towards the website so that
only one copy of it must be kept up to date.
2015-08-05 20:32:57 +07:00
Salvo 'LtWorf' Tomaselli 9ea5e32563 changelog 2015-08-03 16:01:10 +07:00
Salvo 'LtWorf' Tomaselli edc5078475 Use session handling in GUI
The UI stores the session when closing and loads it at the next
use.
2015-08-03 15:58:11 +07:00
Salvo 'LtWorf' Tomaselli 0aa372792f Session management
Adds some functions to store and load an entire session as a binary
blob.

In this way the user does not need to re-load all the relations from the
previous session.
2015-08-03 15:56:37 +07:00
Salvo 'LtWorf' Tomaselli 5a9c2f23a5 Changelog 2015-07-14 15:43:41 +07:00
Salvo 'LtWorf' Tomaselli be7e6fe12d Classes have now names that begin with uppercase
This is more Pythonic and makes the code more readable.

Backwards compatibility is provided by giving an alias with the
previous name of the class.

It will not be broken until the next major release.
2015-07-14 15:39:35 +07:00
Salvo 'LtWorf' Tomaselli af02b5a59b Improved docstring 2015-07-14 15:08:39 +07:00
Salvo 'LtWorf' Tomaselli c275c1caf3 Improve performance of __eq__
If the cardinality of two relations does not match, the expensive
rearrange procedure is not performed at all.
2015-07-14 11:11:13 +07:00
Salvo 'LtWorf' Tomaselli f787630edb Use isinstance rather than comparing class attribute
This allows to create subclasses
2015-07-14 11:09:42 +07:00
Salvo 'LtWorf' Tomaselli 73dd14d9dd Style 2015-07-14 11:01:35 +07:00
Salvo 'LtWorf' Tomaselli 98ac364dc7 Removed encoding string
Not needed in Python 3
2015-07-14 10:43:13 +07:00
Salvo 'LtWorf' Tomaselli 9a570b4386 Use regexp constant
The regexp used was not even the same one…
2015-07-14 10:39:38 +07:00
Salvo 'LtWorf' Tomaselli 33d9545d66 Improved docstring 2015-07-14 10:38:14 +07:00
Salvo 'LtWorf' Tomaselli e2ab59bcc4 Added public attribute with relation name regexp
Also simplified the function to check whether a name is valid for
a relation.
2015-07-14 10:35:54 +07:00
Salvo 'LtWorf' Tomaselli a655e81b28 Remove useless comments 2015-07-14 01:18:54 +07:00
Salvo 'LtWorf' Tomaselli 9416a9fef9 Removed useless unicode marker from strings
We are using Python3 now, so that is not needed
2015-07-09 23:43:54 +07:00
Salvo 'LtWorf' Tomaselli df485e4bd4 Make use of callable string
Instead of explicitly using eval, make use of the
new callable string feature
2015-07-09 23:42:52 +07:00
Salvo 'LtWorf' Tomaselli 33651430d0 Removed curses module
unused
2015-07-09 23:37:20 +07:00
Salvo 'LtWorf' Tomaselli 4f85a545bf parse function returns a callable string
The python string returned by the parser are now directly callable.

They accept an optional parameter for the context.
2015-07-09 23:35:45 +07:00
Salvo 'LtWorf' Tomaselli f5e8e442a0 Removed unused variables 2015-07-09 23:32:46 +07:00
Salvo 'LtWorf' Tomaselli 494469e10c Changelog 2015-07-09 22:39:33 +07:00
Salvo 'LtWorf' Tomaselli f6b4c6708b _rearrange() is an identity if not needed
Operations are possible even when the order of the attributes is
not the same. Because ordering is just an implementation detail and
not an actual part of relational algebra.

A _rearrange() function exists to convert relations to have a similar
format and be able to operate on them.

The function would perform a projection in any case, which would cause
the creation of a new temporary relation, even when the relations where
already using the same order of attributes.

This commit fixes the issue by making it return an identity if the
operation is not necessary.
2015-06-25 16:46:10 +07:00
Salvo 'LtWorf' Tomaselli 95e375f44a Use dictionary comprehension in selection
When doing a selection, a new context (in the form of a dictionary)
is created.

Instead of re-using the same dictionary re-assigning the values, now
use a comprehension to avoid redundant reads.
2015-06-25 16:34:47 +07:00
Salvo 'LtWorf' Tomaselli bcc7053892 Removed a couple of un-pythonic lines 2015-06-17 17:13:35 +07:00
Salvo 'LtWorf' Tomaselli 5218f41e7b Use handler to suggest name 2015-06-17 16:35:14 +07:00
Salvo 'LtWorf' Tomaselli 59d712e53f Interface handler can suggest names
The interface handler can suggest names for loaded
relations.

This can be used to remove duplicated code.
2015-06-17 16:35:01 +07:00
Salvo 'LtWorf' Tomaselli 05e13bfeac Use the new class
Simplify error reporting with a new function.
2015-06-16 13:22:58 +07:00
Salvo 'LtWorf' Tomaselli 226b340969 Create class in maintenance module to help the UIs
The class has methods commonly used by user interfaces, so that
they don't need to be implemented multiple times by different
UIs.
2015-06-16 13:15:11 +07:00
Salvo 'LtWorf' Tomaselli 8daaf599df Removed debian patch for encoding in tests
The encoding is set in the source code now, so
the patch is no longer necessary.
2015-06-16 10:32:40 +07:00
Salvo 'LtWorf' Tomaselli cb8a1563c7 Using new field for python version 2015-06-13 19:15:43 +07:00
Salvo 'LtWorf' Tomaselli 923e515535 Fix the version checker for python3 2015-06-13 17:39:42 +07:00
Salvo 'LtWorf' Tomaselli 5552923633 Prepare for version 2.1 2015-06-13 17:34:13 +07:00
Salvo 'LtWorf' Tomaselli 0385478f91 Set encoding in test driver
Python3 handles encoding differently, and files are loaded
according to the locale set on the system.

This means that when building on a locale-less chroot,
the tests will always fail because it will try to load utf-8
and encode it as ASCII.

This forces the encoding. The tests are encoded in utf-8 anyway
so any other encoding set by the locale would cause a failure.
2015-06-13 17:24:38 +07:00
Salvo 'LtWorf' Tomaselli 4c41132705 Mark bug as closed 2015-06-13 17:21:43 +07:00
Salvo 'LtWorf' Tomaselli c49fbe5024 Update pyversion 2015-06-09 16:31:00 +07:00
Salvo 'LtWorf' Tomaselli 60b56fafd0 Patch to build 2015-06-09 16:28:43 +07:00
Salvo 'LtWorf' Tomaselli f3c13a2fd5 Bumped compat and debhelper 2015-06-09 15:49:08 +07:00
Salvo 'LtWorf' Tomaselli 21d30733c7 Re-generated UI 2015-06-08 01:15:14 +07:00
Salvo 'LtWorf' Tomaselli ac255e4509 Re-create connections for operators 2015-06-08 01:14:56 +07:00
Salvo 'LtWorf' Tomaselli ee97a99e7f Fixed windows setup script
Fixed it to actually run the redistributable installation.

Also, remove Dejavu fonts which aren't used any longer.
2015-06-08 01:02:56 +07:00
Salvo 'LtWorf' Tomaselli 86a3580b15 Change relation creator to use new headers
Update the relation editor/creator to use the new style headers
2015-06-07 15:54:19 +07:00
Salvo 'LtWorf' Tomaselli 5021f1f8cb Use the insert() method to load files
In this way, checks are performed automatically on every tuple
and code is simplified.

This should make it safer to raise exceptions on files that are
not relations.
2015-06-07 14:03:24 +07:00
Salvo 'LtWorf' Tomaselli 60f0584063 regenerated UI 2015-06-07 13:39:28 +07:00
Salvo 'LtWorf' Tomaselli 0aacdefade UI restyling
Try to use up less space, in case users have smaller screens.
2015-06-07 13:38:50 +07:00
Salvo 'LtWorf' Tomaselli 3060a8562f Ask for relation name if filename is not valid
By default when loading a file, a relation with the same name is
created.
Now, if the filename is not a valid relation name, the user will be
prompted to manually insert a relation name.

De-duplicated code for doing this when a new relation is created.
2015-06-07 13:37:24 +07:00
Salvo 'LtWorf' Tomaselli 54ffbbdc3c Updated windows instructions
to include the 2010 redistributable.

<rant>Windows is several GiB large, but they felt like having to
save space when they had to include a 5MiB library that is used
by everything.</rant>
2015-06-07 09:57:46 +07:00