Commit Graph

608 Commits (fb643bd26d005a0a15e90a32166ae97ab5eb31b3)
 

Author SHA1 Message Date
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
Salvo 'LtWorf' Tomaselli 0a9bdb12a7 Re generated UI 2015-06-07 01:50:10 +07:00
Salvo 'LtWorf' Tomaselli f363d4b536 removed title from operators groupbox 2015-06-07 01:49:53 +07:00
Salvo 'LtWorf' Tomaselli 6c44932727 Improve font handling 2015-06-07 01:46:47 +07:00
Salvo 'LtWorf' Tomaselli 83eaf3e57e Reduce hardcoded size
Reduce hardcoded font size.
2015-06-06 18:54:38 +07:00
Salvo 'LtWorf' Tomaselli 2b32e080c9 Dejavu fonts are being used
Install them.
2015-06-06 18:52:20 +07:00
Salvo 'LtWorf' Tomaselli 32c6395d40 Improve fonts settings on windows
Hardcode a size in the UI. This is not optimal buf for the moment I
can't do better.

Also, use yet another font for the delete buttons.
2015-06-06 18:51:29 +07:00
Salvo 'LtWorf' Tomaselli 0237b6222c Update windows exe creation
Add new instructions on how to create the .exe
2015-06-06 18:18:24 +07:00
Salvo 'LtWorf' Tomaselli cdbd59bab3 Update UI for header changes
Updates the UI to work with the new header changes
2015-06-06 15:27:11 +07:00
Salvo 'LtWorf' Tomaselli a033cb769a Make header inherit from tupl
Rather than having a header class that contains a list of header,
change it to directly be an immutable tuple.

This simplifies the code because header can now be compared and
indexed like any other tuple.

Code had to be changed all over the place to cope with this new
datatype.
2015-06-06 15:22:11 +07:00
Salvo 'LtWorf' Tomaselli d754a166a1 Removed duplicated check 2015-06-06 14:17:27 +07:00
Salvo 'LtWorf' Tomaselli b12ea8d27a Raise exception for duplicated attrs in projection
Rather than ignoring them, raise an exception
2015-06-06 14:15:47 +07:00
Salvo 'LtWorf' Tomaselli bbc2855cc5 Use list comprehension 2015-06-06 14:12:02 +07:00
Salvo 'LtWorf' Tomaselli a059afa9ce Added new tests on joins 2015-06-06 14:06:02 +07:00
Salvo 'LtWorf' Tomaselli 229a83f3ad Missing import 2015-06-06 13:52:39 +07:00
Salvo 'LtWorf' Tomaselli 01dc9391d1 Adds len() to relation
Returns the cardinality
2015-06-05 18:28:44 +07:00
Salvo 'LtWorf' Tomaselli d05c2e2d3c Replace intermediate lists with iterators
Some more intermediate lists created during joins are now
not created in favour of iterators instead
2015-06-05 18:15:03 +07:00
Salvo 'LtWorf' Tomaselli f974fc316d Use intersection method of header
Rather than manually implement that with 2 for loops
2015-06-05 18:02:46 +07:00
Salvo 'LtWorf' Tomaselli c8db7b619c Replace temp lists with iterators 2015-06-05 17:54:54 +07:00
Salvo 'LtWorf' Tomaselli f0a9650174 Added iter function
Adds __iter__ and __contains__ to relations and headers.
2015-06-05 17:41:09 +07:00
Salvo 'LtWorf' Tomaselli 92adb10bc6 Able to load non .csv files from UI 2015-06-04 22:38:25 +07:00
Salvo 'LtWorf' Tomaselli cd0e41b8d7 Don't install Dejavu fonts
Apparently they don't contain the symbols needed, so
they aren't needed
2015-06-04 22:35:00 +07:00