new logo for the tiramisu project
This commit is contained in:
parent
5624a69e41
commit
52a6705fbf
2
AUTHORS
2
AUTHORS
@ -6,3 +6,5 @@ Emmanuel Garette <egarette@cadoles.com> developer
|
||||
|
||||
Daniel Dehennin <daniel.dehennin@ac-dijon.fr> contributor
|
||||
Philippe Caseiro <pcaseiro@cadoles.com> contributor
|
||||
|
||||
Gerald Schwartzmann <gschartzmann@cadoles.com> tiramisu's logo (made with The Gimp)
|
||||
|
@ -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'
|
||||
|
@ -10,7 +10,7 @@
|
||||
The tasting of `Tiramisu`
|
||||
=========================
|
||||
|
||||
.. image:: tiramisu.jpeg
|
||||
.. image:: logo.png
|
||||
:height: 150px
|
||||
|
||||
`Tiramisu`
|
||||
|
BIN
doc/logo.png
Normal file
BIN
doc/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 148 KiB |
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user