2 #-*-coding:iso-8859-1-*-
3 # Copyright (C) 2008-2009 EDF R&D
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 # Author : André RIBES (EDF R&D)
27 from optparse import OptionParser
28 from daYacsSchemaCreator.methods import *
29 from daYacsSchemaCreator.help_methods import *
31 def create_schema(config_file, yacs_schema_filename):
37 logging.fatal("Exception in loading " + config_file)
41 if "study_config" not in locals():
42 logging.fatal("Cannot found study_config in " + str(config_file))
45 globals()['study_config'] = locals()['study_config']
47 check_study(study_config)
48 proc = create_yacs_proc(study_config)
49 write_yacs_proc(proc, yacs_schema_filename)