Changeset dd72190 in sasview


Ignore:
Timestamp:
Oct 7, 2016 11:46:48 AM (8 years ago)
Author:
ajj
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b61bd57, 751f4bd
Parents:
1b1a1c1
Message:

Doc build script update to include sesans images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/sphinx-docs/build_sphinx.py

    r5dd7499 rdd72190  
    3636#/sasview-local-trunk/docs/sphinx-docs/build_sphinx.py 
    3737SASMODELS_SOURCE_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc") 
     38SASMODELS_SOURCE_GPU = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "gpu") 
    3839SASMODELS_SOURCE_SESANS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "sesans") 
     40SASMODELS_SOURCE_SESANSIMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "sesans", "sesans_img") 
    3941SASMODELS_SOURCE_MAGNETISM = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "magnetism") 
    4042SASMODELS_SOURCE_MAGIMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "magnetism", "mag_img") 
     
    5052SASMODELS_DEST_IMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "model-imgs", "new-models") 
    5153SASMODELS_DEST_MAGIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "mag_img") 
     54SASMODELS_DEST_SESANSIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "sesans_img") 
    5255SASMODELS_DEST_BUILDIMG = os.path.join(SASMODELS_DEST_PROLOG, "user", "models", "img") 
    5356 
     
    190193            tohere=os.path.join(SASMODELS_DEST_IMG,files) 
    191194            shutil.copy(fromhere,tohere) 
    192         else: print "no source directorty",SASMODELS_SOURCE_AUTOIMG ,"was found" 
     195    else: print "no source directory",SASMODELS_SOURCE_AUTOIMG ,"was found" 
    193196 
    194197    # And the rst prolog with the unit substitutions 
     
    204207                    shutil.copy(fromhere,tohere) 
    205208 
     209    if os.path.exists(SASMODELS_SOURCE_GPU): 
     210        print "Found docs folder SASMODELS_SOURCE_GPU at ", SASMODELS_SOURCE_GPU 
     211        if os.path.exists(SPHINX_SOURCE_USER): 
     212            print "Found docs folder SPHINX_SOURCE_USER      at ", SPHINX_SOURCE_USER 
     213            print "Copying sasmodels gpu files..." 
     214            for files in os.listdir(SASMODELS_SOURCE_GPU): 
     215                if files.endswith(".rst"): 
     216                    fromhere=os.path.join(SASMODELS_SOURCE_GPU,files) 
     217                    tohere=os.path.join(SPHINX_SOURCE_USER,files) 
     218                    shutil.copy(fromhere,tohere) 
     219 
     220 
    206221    if os.path.exists(SASMODELS_SOURCE_SESANS): 
    207222        print "Found docs folder SASMODELS_SOURCE_SESANS at ", SASMODELS_SOURCE_SESANS 
     
    227242 
    228243    if os.path.exists(SASMODELS_SOURCE_MAGIMG): 
    229         print "Found img  folder SASMODELS_SOURCE_MAGIMG    at ", SASMODELS_SOURCE_MAGIMG 
     244        print "Found img folder SASMODELS_SOURCE_MAGIMG   at ", SASMODELS_SOURCE_MAGIMG 
    230245        if not os.path.exists(SASMODELS_DEST_MAGIMG): 
    231246            print "Missing docs folder SASMODELS_DEST_MAGIMG at ", SASMODELS_DEST_MAGIMG 
     
    237252            tohere=os.path.join(SASMODELS_DEST_MAGIMG,files) 
    238253            shutil.copy(fromhere,tohere) 
    239         else: print "no source directorty",SASMODELS_SOURCE_MAGIMG ,"was found" 
     254    else: print "no source directory",SASMODELS_SOURCE_MAGIMG ,"was found" 
     255 
     256    if os.path.exists(SASMODELS_SOURCE_SESANSIMG): 
     257        print "Found img folder SASMODELS_SOURCE_MAGIMG   at ", SASMODELS_SOURCE_SESANSIMG 
     258        if not os.path.exists(SASMODELS_DEST_MAGIMG): 
     259            print "Missing docs folder SASMODELS_DEST_MAGIMG at ", SASMODELS_DEST_SESANSIMG 
     260            os.makedirs(SASMODELS_DEST_SESANSIMG) 
     261            print "created SASMODELS_DEST_SESANSIMG at ", SASMODELS_DEST_SESANSIMG 
     262        print "Copying sasmodels model auto-generated image files..." 
     263        for files in os.listdir(SASMODELS_SOURCE_SESANSIMG): 
     264            fromhere=os.path.join(SASMODELS_SOURCE_SESANSIMG,files) 
     265            tohere=os.path.join(SASMODELS_DEST_SESANSIMG,files) 
     266            shutil.copy(fromhere,tohere) 
     267    else: print "no source directory",SASMODELS_SOURCE_SESANSIMG ,"was found" 
    240268 
    241269    if os.path.exists(SASMODELS_SOURCE_REF_MODELS): 
Note: See TracChangeset for help on using the changeset viewer.