Skip to content

Commit

Permalink
I added two test files.
Browse files Browse the repository at this point in the history
  • Loading branch information
mklauser committed Feb 14, 2014
1 parent de677f8 commit fab69cc
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
74 changes: 74 additions & 0 deletions tardis/io/default_conf_test/conf_def.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
value_test:
integer:
property_type: int
default: 99.1
mandatory: True
help: integer value for testing
float:
property_type: float
default: 99.99
mandatory: True
help: float value for testing
string:
property_type: string
default: DEFAULT
mandatory: True
help: string for testing
quantity:
property_type: quantity
default: 99.99 cm
mandatory: True
help: quantity for testing
range:
property_type: range
default: [0,10] #[Start,End]
mandatory: False
help: range for testing
range_sampled:
property_type: range_sampled
default: [0,10,1] #[Start,End,Nsample]
mandatory: False
help: range for testing





supernova:
luminosity_requested:
property_type: quantity ### log_lbol to be discussed
default: 2 m
mandatory: True
help: requested luminosity for simulation
time_explosion:
property_type: quantity
default: 10 cm
mandatory: False
help: time since explosion
test:
structure:
property_type : container-property
type:
property_type: container-declaration
containers: ['file', 'specific']
_file: ['file_property']
file_property:
filename:
property_type: string
default: None
mandatory: True
help: file name (with path) to atomic data HDF5 file
file_container:
property_type : container-property
type:
property_type: container-declaration
containers: ['bla','blub']
_bla: ['subset']
subset:
subvalue:
property_type: string
default: blabla
mandatory: False
help: very helpful


21 changes: 21 additions & 0 deletions tardis/io/default_conf_test/conf_tes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
value_test:
integer: 10
float: 10.5
string: bla bla
quantity: 10 cm
list: ['bla','blub']

supernova:
luminosity_requested: 1 cm
time_explosion: 12 d
test:
structure:
type: file
file_property:
filename: bla
file_container:
type: bla
subset:
subvalue: TEST


7 changes: 7 additions & 0 deletions tardis/io/default_conf_test/default_test_load.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
__author__ = 'michi'
import yaml

f = open('default_conf_test/conf_def.yaml')
default = yaml.safe_load(f)
f = open('default_conf_test/conf_tes.yaml')
config = yaml.safe_load(f)

0 comments on commit fab69cc

Please sign in to comment.