Changeset c22c5e3 in sasview for docs/sphinx-docs


Ignore:
Timestamp:
May 8, 2015 2:15:19 PM (10 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
ac7be54
Parents:
c23de6a
Message:

copy bumps optimizer docs into sasview docs, if available

File:
1 edited

Legend:

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

    r7168b8b rc22c5e3  
    1111import shutil 
    1212import imp 
     13from glob import glob 
    1314 
    1415from distutils.dir_util import copy_tree 
     
    3233SPHINX_SOURCE_MODELS = os.path.join(SPHINX_SOURCE, "user", "models") 
    3334SPHINX_SOURCE_PERSPECTIVES = os.path.join(SPHINX_SOURCE, "user", "perspectives") 
     35 
     36BUMPS_DOCS = os.path.join(CURRENT_SCRIPT_DIR, "..", "..", "..", 
     37                          "bumps", "doc", "guide") 
     38BUMPS_TARGET = os.path.join(SPHINX_SOURCE_PERSPECTIVES, "fitting") 
    3439 
    3540def _remove_dir(dir_path): 
     
    8287            copy_tree(docs, dest_dir) 
    8388 
     89def retrieve_bumps_docs(): 
     90    """ 
     91    Copies select files from the bumps documentation into fitting perspective 
     92    """ 
     93    if os.path.exists(BUMPS_DOCS): 
     94        print "=== Retrieve BUMPS Docs ===" 
     95        filenames = [os.path.join(BUMPS_DOCS, "optimizer.rst")] 
     96        filenames += glob(os.path.join(BUMPS_DOCS, "dream-*.png")) 
     97        filenames += glob(os.path.join(BUMPS_DOCS, "fit-*.png")) 
     98        for f in filenames: 
     99            print "Copying file", f 
     100            shutil.copy(f, BUMPS_TARGET) 
     101    else: 
     102        print """ 
     103*** Error *** missing directory %s 
     104The documentation will not include the optimizer selection section. 
     105Checkout the bumps source tree and rebuild the docs. 
     106 
     107 
     108""" % BUMPS_DOCS 
     109 
    84110def apidoc(): 
    85111    """ 
     
    115141    clean() 
    116142    retrieve_user_docs() 
     143    retrieve_bumps_docs() 
    117144    apidoc() 
    118145    build() 
Note: See TracChangeset for help on using the changeset viewer.