Changeset 91c5fdc in sasmodels for doc


Ignore:
Timestamp:
Mar 16, 2016 8:07:28 AM (9 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3936ad3, 348557a
Parents:
7b3e62c
Message:

fix doc build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/genmodel.py

    rd138d43 r91c5fdc  
    1 import sys 
    2 sys.path.insert(0,'..') 
     1import sys, os 
     2sys.path.insert(0, os.path.abspath('..')) 
     3from sasmodels import generate, core 
    34 
    4 # Convert ../sasmodels/models/name.py to sasmodels.models.name 
    5 module_name = sys.argv[1][3:-3].replace('/','.').replace('\\','.') 
    6 #print module_name 
    7 module = __import__(module_name) 
    8 for part in module_name.split('.')[1:]: 
    9     module = getattr(module, part) 
    10 #print module 
     5# Convert ../sasmodels/models/name.py to name 
     6model_name = os.path.basename(sys.argv[1])[:-3] 
    117 
    128# Load the doc string from the module definition file and store it in rst 
    13 from sasmodels import generate 
    14 docstr = generate.doc(module) 
     9docstr = generate.make_doc(core.load_model_info(model_name)) 
    1510open(sys.argv[2],'w').write(docstr) 
Note: See TracChangeset for help on using the changeset viewer.