diff --git a/AUTHORS b/AUTHORS index f6e3bb8..1819d02 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,3 +6,5 @@ Emmanuel Garette developer Daniel Dehennin contributor Philippe Caseiro contributor + +Gerald Schwartzmann tiramisu's logo (made with The Gimp) diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..0f82de4 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0rc1 diff --git a/doc/config.txt b/doc/config.txt index c833172..ed1a3ca 100644 --- a/doc/config.txt +++ b/doc/config.txt @@ -67,17 +67,6 @@ But there are special exceptions. We will see later on that an option can be a :term:`mandatory option`. A mandatory option is an option that must have a value defined. -Appart from this case, if no value have been set yet, the value is `None`. When -the option is called to retrieve a value, an exception is raised. - -What if a value has been set and `None` is to be returned again ? Don't worry, -an option value can be reseted:: -:: - - >>> cfg.cfgimpl_get_values().reset(gcdummy) - >>> cfg.dummy - False - Setting the values of the options ---------------------------------------- @@ -110,7 +99,7 @@ adhere to the option description). Common manipulations ------------------------ -Let's perform some common manipulation on some options: +Let's perform some common manipulation on some options >>> from tiramisu.config import Config >>> from tiramisu.option import UnicodeOption, OptionDescription @@ -141,9 +130,7 @@ value let's modify a value (careful to the value's type...) >>> c.od1.var1 = 'value' -Traceback (most recent call last): -[...] -ValueError: invalid value value for option var1 +Traceback (most recent call last): ValueError: invalid value value for option var1 >>> c.od1.var1 = u'value' >>> print c.od1.var1 value @@ -161,16 +148,13 @@ The value is saved in a :class:`~tiramisu.value.Value` object. It is on this object that we have to trigger the `reset`, wich take the option itself (`var2`) as a parameter. -On the other side, in the `read_only` mode, it is not possible to modify the value:: +On the other side, in the `read_only` mode, it is not possible to modify the value + +>>> c.read_only() +>>> c.od1.var2 = u'value2' +Traceback (most recent call last): +tiramisu.error.PropertiesOptionError: cannot change the value to var2 for option ['frozen'] this option is frozen - >>> c.read_only() - >>> c.od1.var2 = u'value2' - Traceback (most recent call last): - [...] - tiramisu.error.PropertiesOptionError: - cannot change the value to var2 - for option ['frozen'] this option is frozen - let's retrieve the option `var1` description >>> var1.impl_get_information('doc') @@ -314,7 +298,6 @@ with a hidden option:: >>> print c.od1.var1 Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: trying to access to an option named: var1 with properties ['hidden'] >>> c.read_only() @@ -331,7 +314,6 @@ mode. But in read only mode, an error is raised if no value has been defined:: >>> c.read_only() >>> print c.od1.var2 Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: trying to access to an option named: var2 with properties ['mandatory'] >>> c.read_write() @@ -348,7 +330,6 @@ Let's try to modify a frozen option:: value >>> c.od1.var3 = u'value2' Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: cannot change the value for option var3 this option is frozen >>> c.read_only() >>> print c.od1.var3 @@ -360,7 +341,6 @@ read/write or read only mode:: >>> c.cfgimpl_get_settings().append('inconnu') >>> print c.od1.var3 Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: trying to access to an option named: var3 with properties ['inconnu'] >>> c.cfgimpl_get_settings().remove('inconnu') @@ -373,7 +353,6 @@ Properties can also be defined on an option group, (that is, on an >>> c.read_write() >>> print c.od2.var4 Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: trying to access to an option named: od2 with properties ['hidden'] >>> c.read_only() @@ -387,7 +366,6 @@ Furthermore, let's retrieve the properties, delete and add the `hidden` property ['hidden'] >>> print c.od1.var1 Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: trying to access to an option named: var1 with properties ['hidden'] >>> c.cfgimpl_get_settings()[rootod.od1.var1].remove('hidden') @@ -400,7 +378,6 @@ Furthermore, let's retrieve the properties, delete and add the `hidden` property ['hidden'] >>> print c.od1.var1 Traceback (most recent call last): - [...] tiramisu.error.PropertiesOptionError: trying to access to an option named: var1 with properties ['hidden'] @@ -442,7 +419,6 @@ But it is not possible to set a value to a multi-option wich is not a list:: >>> c.od1.var1 = u'error' Traceback (most recent call last): - [...] ValueError: invalid value error for option var1 which must be a list @@ -514,17 +490,14 @@ But it is forbidden to change the lenght of a slave:: slave2 = [u'default', u'default'] >>> c.master.slave1 = [u'new1'] Traceback (most recent call last): - [...] tiramisu.error.SlaveError: invalid len for the slave: slave1 which has master.master as master >>> c.master.slave1 = [u'new1', u'new2', u'new3'] - [...] tiramisu.error.SlaveError: invalid len for the slave: slave1 which has master.master as master you have to call the `pop` function on the master:: >>> c.master.master = [u'oui'] Traceback (most recent call last): - [...] tiramisu.error.SlaveError: invalid len for the master: master which has slave1 as slave with greater len >>> c.master.master.pop(0) u'oui' diff --git a/doc/index.txt b/doc/index.txt index 41c2ce3..21cf692 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -10,7 +10,7 @@ The tasting of `Tiramisu` ========================= -.. image:: tiramisu.jpeg +.. image:: logo.png :height: 150px `Tiramisu` diff --git a/doc/logo.png b/doc/logo.png new file mode 100644 index 0000000..08e33cd Binary files /dev/null and b/doc/logo.png differ diff --git a/doc/tiramisu.jpeg b/doc/tiramisu.jpeg deleted file mode 100644 index 0b5c4ae..0000000 Binary files a/doc/tiramisu.jpeg and /dev/null differ diff --git a/test/test_config_api.py b/test/test_config_api.py index 62a74c0..ba268bc 100644 --- a/test/test_config_api.py +++ b/test/test_config_api.py @@ -19,7 +19,6 @@ def make_description(): boolop = BoolOption('boolop', 'Test boolean option op', default=True) wantref_option = BoolOption('wantref', 'Tests', default=False) wantframework_option = BoolOption('wantframework', 'Test', default=False) - gcgroup = OptionDescription('gc', '', [gcoption, gcdummy, floatoption]) descr = OptionDescription('tiramisu', '', [gcgroup, booloption, objspaceoption, wantref_option, stroption,