|
29 | 29 | 'Please download and extract the RAT release to the API folder.') |
30 | 30 | sys.path.insert(0, matlab_src_dir) |
31 | 31 |
|
32 | | -import RATapi |
33 | | -sys.path.insert(0, os.path.dirname(os.path.abspath(RATapi.__file__))) |
| 32 | +import ratapi |
| 33 | +sys.path.insert(0, os.path.dirname(os.path.abspath(ratapi.__file__))) |
34 | 34 | project = 'RAT' |
35 | 35 | copyright = u'2022-{}, ISIS Neutron and Muon Source'.format(datetime.date.today().year) |
36 | 36 | author = 'Arwel Hughes, Sethu Pastula, Alex Room, Rabiya Farooq, Paul Sharp, Stephen Nneji' |
|
52 | 52 | templates_path = ['_templates'] |
53 | 53 |
|
54 | 54 | # -- Setup example files ----------------------------------------------------- |
55 | | -PYTHON_RAT_RELEASE = metadata.version("RATapi") |
| 55 | +PYTHON_RAT_RELEASE = metadata.version("ratapi") |
56 | 56 |
|
57 | 57 | MATLAB_AVAILABLE = True |
58 | 58 | try: |
|
67 | 67 | zf.extractall() |
68 | 68 | print("Copying Jupyter notebooks...") |
69 | 69 | for directory in ['normal_reflectivity', 'domains', 'absorption']: |
70 | | - for file in Path(f"./python-RAT-{PYTHON_RAT_RELEASE}/RATapi/examples/{directory}/").glob('*'): |
| 70 | + for file in Path(f"./python-RAT-{PYTHON_RAT_RELEASE}/ratapi/examples/{directory}/").glob('*'): |
71 | 71 | shutil.copy(file, "./python_examples/notebooks/") |
72 | 72 | if MATLAB_AVAILABLE: # convert_rascal example requires matlab engine |
73 | | - for file in Path(f"./python-RAT-{PYTHON_RAT_RELEASE}/RATapi/examples/convert_rascal_project/").glob('*'): |
| 73 | + for file in Path(f"./python-RAT-{PYTHON_RAT_RELEASE}/ratapi/examples/convert_rascal_project/").glob('*'): |
74 | 74 | shutil.copy(file, "./python_examples/notebooks/") |
75 | 75 |
|
76 | 76 |
|
77 | | - shutil.copytree(f"./python-RAT-{PYTHON_RAT_RELEASE}/RATapi/examples/data", "./python_examples/data", dirs_exist_ok=True) |
| 77 | + shutil.copytree(f"./python-RAT-{PYTHON_RAT_RELEASE}/ratapi/examples/data", "./python_examples/data", dirs_exist_ok=True) |
78 | 78 |
|
79 | 79 | shutil.rmtree(f"./python-RAT-{PYTHON_RAT_RELEASE}") |
80 | 80 |
|
|
149 | 149 |
|
150 | 150 | <div class="admonition note"> |
151 | 151 | This page was generated from the notebook {{ env.docname.split('/')|last|e + '.ipynb' }} found in |
152 | | - <a class="reference external" href="https://github.com/RascalSoftware/python-RAT/blob/"""+PYTHON_RAT_RELEASE+r"""/RATapi/examples/">the Python-RAT repository</a>. |
| 152 | + <a class="reference external" href="https://github.com/RascalSoftware/python-RAT/blob/"""+PYTHON_RAT_RELEASE+r"""/ratapi/examples/">the Python-RAT repository</a>. |
153 | 153 | <a href="{{ env.docname.split('/')|last|e + '.ipynb' }}" class="reference download internal" download>Download notebook</a>. |
154 | 154 | </div> |
155 | 155 |
|
|
159 | 159 |
|
160 | 160 | .. code-block:: python |
161 | 161 |
|
162 | | - from RATapi.examples import {{ env.docname.split('/')|last|e }} |
| 162 | + from ratapi.examples import {{ env.docname.split('/')|last|e }} |
163 | 163 | project, results = {{ env.docname.split('/')|last|e }}() |
164 | 164 |
|
165 | 165 | ------------------------------------------------------------------------------------- |
|
0 commit comments