mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-24 21:41:46 +02:00
Add ezfio_dir to optional keyword in EZFIO.cfg
This commit is contained in:
parent
db558258b2
commit
78d42e2455
@ -1,2 +0,0 @@
|
||||
properties
|
||||
z_one_point 3.9
|
@ -203,7 +203,7 @@ def get_dict_config_file(config_file_path, module_lower):
|
||||
- ezfio_name : Will be the name of the file
|
||||
- ezfio_dir : Will be the folder who containt the ezfio_name
|
||||
* /ezfio_dir/ezfio_name
|
||||
* equal to MODULE_lower name for the moment.
|
||||
* equal to MODULE_lower name by default.
|
||||
- interface : The provider is a imput or a output
|
||||
- default : The default value /!\ stored in a Type named type!
|
||||
if interface == output
|
||||
@ -216,7 +216,7 @@ def get_dict_config_file(config_file_path, module_lower):
|
||||
|
||||
d = defaultdict(dict)
|
||||
l_info_required = ["doc", "interface"]
|
||||
l_info_optional = ["ezfio_name", "size"]
|
||||
l_info_optional = ["ezfio_dir", "ezfio_name", "size"]
|
||||
|
||||
# ~#~#~#~#~#~#~#~#~#~#~ #
|
||||
# L o a d _ C o n f i g #
|
||||
@ -238,10 +238,8 @@ def get_dict_config_file(config_file_path, module_lower):
|
||||
pvd = section.lower()
|
||||
|
||||
# Create the dictionary who containt the value per default
|
||||
d_default = {"ezfio_name": pvd}
|
||||
|
||||
# Set the ezfio_dir
|
||||
d[pvd]["ezfio_dir"] = module_lower
|
||||
d_default = {"ezfio_name": pvd,
|
||||
"ezfio_dir": module_lower}
|
||||
|
||||
# Check if type if avalaible
|
||||
type_ = config_file.get(section, "type")
|
||||
@ -294,6 +292,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
|
||||
default
|
||||
size}
|
||||
create the a list who containt all the code for the provider
|
||||
output = output_dict_info['ezfio_dir'
|
||||
return [code, ...]
|
||||
"""
|
||||
from ezfio_generate_provider import EZFIO_Provider
|
||||
|
@ -45,7 +45,7 @@ END_PROVIDER
|
||||
self.set_write()
|
||||
for v in self.values:
|
||||
if not v:
|
||||
msg = "Error : %s is not set in ezfio_with_default.py" % (v)
|
||||
msg = "Error : %s is not set in EZFIO.cfg" % (v)
|
||||
print >>sys.stderr, msg
|
||||
sys.exit(1)
|
||||
return self.data % self.__dict__
|
||||
|
@ -1,13 +0,0 @@
|
||||
BEGIN_SHELL [ /usr/bin/python ]
|
||||
from ezfio_with_default import EZFIO_Provider
|
||||
T = EZFIO_Provider()
|
||||
T.set_type ( "double precision" )
|
||||
T.set_name ( "z_one_point" )
|
||||
T.set_doc ( "z point on which the integrated delta rho is calculated" )
|
||||
T.set_ezfio_dir ( "properties" )
|
||||
T.set_ezfio_name( "z_one_point" )
|
||||
T.set_output ( "output_full_ci" )
|
||||
print T
|
||||
|
||||
END_SHELL
|
||||
|
@ -1,2 +0,0 @@
|
||||
properties
|
||||
z_one_point double precision
|
Loading…
Reference in New Issue
Block a user