Changeset a728658 in sasview for docs/sphinx-docs


Ignore:
Timestamp:
Mar 19, 2016 1:11:53 PM (9 years ago)
Author:
smk78
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
66f21cd
Parents:
3c53d7f
Message:

First pass integrated old (sasview) and new (sasmodels) documentation
build.

File:
1 edited

Legend:

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

    r354524d ra728658  
    3434# We are currently here: 
    3535#/sasview-local-trunk/docs/sphinx-docs/build_sphinx.py 
    36  
     36SASMODELS_SOURCE_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc") 
     37#SASMODELS_SOURCE_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "ref", "models") 
    3738SASMODELS_SOURCE_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model") 
    3839SASMODELS_SOURCE_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", "sasmodels", "doc", "model", "img") 
     40SASMODELS_DEST_PROLOG = os.path.join(CURRENT_SCRIPT_DIR, "source") 
     41SASMODELS_DEST_REF_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "source", "user") 
    3942SASMODELS_DEST_MODELS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media") 
    4043SASMODELS_DEST_IMG = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "src", "sas", "models", "media", "img") 
    4144 
     45#if os.path.exists(SASMODELS_SOURCE_PROLOG): 
     46#    print "Found models prolog folder at ", SASMODELS_SOURCE_PROLOG 
     47#if os.path.exists(SASMODELS_SOURCE_REF_MODELS): 
     48#    print "Found models ref folder at ", SASMODELS_SOURCE_REF_MODELS 
    4249#if os.path.exists(SASMODELS_SOURCE_MODELS): 
    4350#    print "Found models folder at ", SASMODELS_SOURCE_MODELS 
    4451#if os.path.exists(SASMODELS_SOURCE_IMG): 
    4552#    print "Found img folder at ", SASMODELS_SOURCE_IMG 
     53#if os.path.exists(SASMODELS_DEST_REF_MODELS): 
     54#    print "Found models ref folder at ", SASMODELS_DEST_REF_MODELS 
    4655#if os.path.exists(SASMODELS_DEST_MODELS): 
    4756#    print "Found models folder at ", SASMODELS_DEST_MODELS 
    4857#if os.path.exists(SASMODELS_DEST_IMG): 
    4958#    print "Found img folder at ", SASMODELS_DEST_IMG 
     59#sys.exit() 
    5060 
    5161SPHINX_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build") 
     
    126136        if os.path.exists(SASMODELS_DEST_IMG): 
    127137            print "Found img  folder SASMODELS_DEST_IMG      at ", SASMODELS_DEST_IMG 
     138            print "Copying sasmodels model image files..." 
    128139            for files in os.listdir(SASMODELS_SOURCE_IMG): 
    129140                fromhere=os.path.join(SASMODELS_SOURCE_IMG,files) 
     
    131142                shutil.copy(fromhere,tohere) 
    132143 
     144    # And the rst prolog with the unit substitutions 
     145    if os.path.exists(SASMODELS_SOURCE_PROLOG): 
     146        print "Found prolog folder SASMODELS_SOURCE_PROLOG at ", SASMODELS_SOURCE_PROLOG 
     147        if os.path.exists(SASMODELS_DEST_PROLOG): 
     148            print "Found docs folder SASMODELS_DEST_PROLOG   at ", SASMODELS_DEST_PROLOG 
     149            print "Copying sasmodels rst_prolog file..." 
     150            for files in os.listdir(SASMODELS_SOURCE_PROLOG): 
     151                if files.startswith("rst"): 
     152                    fromhere=os.path.join(SASMODELS_SOURCE_PROLOG,files) 
     153                    tohere=os.path.join(SASMODELS_DEST_PROLOG,files) 
     154                    shutil.copy(fromhere,tohere) 
     155 
     156    # ACTUALLY IT TURNED OUT WE NEED TO EDIT THE TOCTREES SO THIS COPY WASN'T USEFUL IN THE END! 
    133157    # And the relevant rst descriptions for the new sasmodels documentation 
     158#    if os.path.exists(SASMODELS_SOURCE_REF_MODELS): 
     159#        print "Found docs folder SASMODELS_SOURCE_REF_MODELS at ", SASMODELS_SOURCE_REF_MODELS 
     160#        if os.path.exists(SASMODELS_DEST_REF_MODELS): 
     161#            print "Found docs folder SASMODELS_DEST_REF_MODELS   at ", SASMODELS_DEST_REF_MODELS 
     162#            print "Copying sasmodels model toctree files..." 
     163#            for files in os.listdir(SASMODELS_SOURCE_REF_MODELS): 
     164#                if files.endswith(".rst"): 
     165#                    fromhere=os.path.join(SASMODELS_SOURCE_REF_MODELS,files) 
     166#                    tohere=os.path.join(SASMODELS_DEST_REF_MODELS,files) 
     167#                    shutil.copy(fromhere,tohere) 
     168 
    134169    if os.path.exists(SASMODELS_SOURCE_MODELS): 
    135170        print "Found docs folder SASMODELS_SOURCE_MODELS at ", SASMODELS_SOURCE_MODELS 
    136171        if os.path.exists(SASMODELS_DEST_MODELS): 
    137172            print "Found docs folder SASMODELS_DEST_MODELS   at ", SASMODELS_DEST_MODELS 
     173            print "Copying sasmodels model files..." 
    138174            for files in os.listdir(SASMODELS_SOURCE_MODELS): 
    139175                if files.endswith(".rst"): 
Note: See TracChangeset for help on using the changeset viewer.