Changeset a261a83 in sasmodels for sasmodels/generate.py


Ignore:
Timestamp:
Nov 30, 2017 12:25:06 AM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
7dde87f
Parents:
0b07b91 (diff), 10ee838 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ticket-786' into generic_integration_loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    rff31782 ra261a83  
    163163 
    164164import sys 
    165 from os.path import abspath, dirname, join as joinpath, exists, isdir, getmtime 
     165from os.path import abspath, dirname, join as joinpath, exists, getmtime 
    166166import re 
    167167import string 
     
    174174from .custom import load_custom_kernel_module 
    175175 
     176# pylint: disable=unused-import 
    176177try: 
    177178    from typing import Tuple, Sequence, Iterator, Dict 
     
    179180except ImportError: 
    180181    pass 
     182# pylint: enable=unused-import 
    181183 
    182184# jitter projection to use in the kernel code.  See explore/jitter.py 
     
    672674    line instead. 
    673675    """ 
    674     for path, code in sources: 
     676    for _path, code in sources: 
    675677        if _IQXY_PATTERN.search(code): 
    676678            return True 
    677     else: 
    678         return False 
     679    return False 
    679680 
    680681 
     
    790791    # TODO: allow mixed python/opencl kernels? 
    791792 
    792     ocl = kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name) 
    793     dll = kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name) 
     793    ocl = _kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name) 
     794    dll = _kernels(kernel_code, call_iq, call_iqxy, clear_iqxy, model_info.name) 
    794795    result = { 
    795796        'dll': '\n'.join(source+dll[0]+dll[1]+dll[2]), 
     
    800801 
    801802 
    802 def kernels(kernel, call_iq, call_iqxy, clear_iqxy, name): 
     803def _kernels(kernel, call_iq, call_iqxy, clear_iqxy, name): 
    803804    # type: ([str,str], str, str, str) -> List[str] 
    804805    code = kernel[0] 
     
    949950 
    950951def make_html(model_info): 
     952    # type: (ModelInfo) -> str 
    951953    """ 
    952954    Convert model docs directly to html. 
     
    958960 
    959961def view_html(model_name): 
     962    # type: (str) -> None 
     963    """ 
     964    Load the model definition and view its help. 
     965    """ 
    960966    from . import modelinfo 
    961967    kernel_module = load_kernel_module(model_name) 
     
    964970 
    965971def view_html_from_info(info): 
     972    # type: (ModelInfo) -> None 
     973    """ 
     974    View the help for a loaded model definition. 
     975    """ 
    966976    from . import rst2html 
    967977    url = "file://"+dirname(info.filename)+"/" 
     
    988998    Program which prints the source produced by the model. 
    989999    """ 
    990     import sys 
    9911000    from .modelinfo import make_model_info 
    9921001 
Note: See TracChangeset for help on using the changeset viewer.