Changeset 2464 for TOOLS


Ignore:
Timestamp:
04/02/15 13:21:49 (7 years ago)
Author:
labetoulle
Message:
  • Use allow_no_value option from ConfigParser?, for dods directory in config.ini
  • keep default config.ini.init on svn instead of config.ini, which is to be adapted to each implementation
  • debug project_name processing
Location:
TOOLS/ConsoGENCMIP6/bin
Files:
1 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/ConsoGENCMIP6/bin

    • Property svn:ignore
      •  

        old new  
        11*.pyc 
         2config.ini 
  • TOOLS/ConsoGENCMIP6/bin/libconso.py

    r2463 r2464  
    5252  OUT = {} 
    5353 
    54   config = cp.ConfigParser() 
     54  config = cp.ConfigParser(allow_no_value=True) 
    5555  config.optionxform = str 
    5656  config.read(filename) 
     
    7171  section = "directories" 
    7272  for option in config.options(section): 
    73     res = config.get(section, option) 
    74     if res != "None": 
    75       DIR[option] = res 
    76     else: 
    77       DIR[option] = None 
     73    DIR[option] = config.get(section, option) 
    7874 
    7975    if DIR[option] and not os.path.isdir(DIR[option]): 
     
    221217 
    222218  #--------------------------------------- 
    223   def __init__(self): 
    224     self.project   = "" 
     219  def __init__(self, project_name): 
     220    self.project   = project_name 
    225221    self.date_init = "" 
    226222    self.deadline  = "" 
     
    231227    import json 
    232228    dico = json.load(open(filein, "r")) 
    233     self.project = dico["name"] 
    234229    self.deadline = string_to_date(dico["deadline"]) + \ 
    235230                    dt.timedelta(days=-1) 
  • TOOLS/ConsoGENCMIP6/bin/plot_bilan.py

    r2460 r2464  
    393393  # .. Get project info .. 
    394394  # ====================== 
    395   projet = Project() 
     395  projet = Project(project_name) 
    396396  projet.fill_data(file_param) 
    397397  projet.get_date_init(file_utheo) 
  • TOOLS/ConsoGENCMIP6/bin/plot_bilan_jobs.py

    r2460 r2464  
    424424  # .. Get project info .. 
    425425  # ====================== 
    426   projet = Project() 
     426  projet = Project(project_name) 
    427427  projet.fill_data(file_param) 
    428428  projet.get_date_init(file_utheo) 
  • TOOLS/ConsoGENCMIP6/bin/plot_jobs.py

    r2460 r2464  
    2626    """ 
    2727    """ 
    28     # delta = date_end - date_beg 
    29     # delta = delta + dt.timedelta(days=1) 
    3028    delta = date_end - date_beg + dt.timedelta(days=1) 
    3129 
     
    343341  # .. Get project info .. 
    344342  # ====================== 
    345   projet = Project() 
     343  projet = Project(project_name) 
    346344  projet.fill_data(file_param) 
    347345  projet.get_date_init(file_utheo) 
     
    422420  plot_data(ax, xcoord, dates, run_jobs, pen_jobs, run_std, pen_std) 
    423421 
    424   # # ... Tweak figure ... 
    425   # # -------------------- 
     422  # ... Tweak figure ... 
     423  # -------------------- 
    426424  title = "Suivi des jobs {}\n({:%d/%m/%Y} - {:%d/%m/%Y})".format( 
    427425    projet.project.upper(), 
  • TOOLS/ConsoGENCMIP6/bin/plot_login.py

    r2462 r2464  
    180180  # .. Get project info .. 
    181181  # ====================== 
    182   projet = Project() 
     182  projet = Project(project_name) 
    183183  projet.fill_data(file_param) 
    184184  projet.get_date_init(file_utheo) 
  • TOOLS/ConsoGENCMIP6/bin/plot_store.py

    r2462 r2464  
    232232  # .. Get project info .. 
    233233  # ====================== 
    234   projet = Project() 
     234  projet = Project(project_name) 
    235235  projet.fill_data(file_param) 
    236236  projet.get_date_init(file_utheo) 
Note: See TracChangeset for help on using the changeset viewer.