Skip to content

Commit 646eb19

Browse files
committed
examples: fixed paths
1 parent 48e8bb4 commit 646eb19

39 files changed

+7142
-53
lines changed

docs/source/examples/do.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PyMCNP enables common workflows using `pyvista`, `pandas`, `subprocesss`, `matpl
66

77
```{eval-rst}
88
.. note::
9-
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_00.inp>`_.
9+
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.inp>`_.
1010
```
1111

1212
Code:
@@ -18,14 +18,14 @@ Code:
1818

1919
Output:
2020

21-
Checking INP file: `PyMCNP/files/inp/example_00.inp`
22-
Fixing and writing to INP file: `PyMCNP/files/inp/example_00.inp`
21+
Checking INP file: `example_00.inp`
22+
Fixing and writing to INP file: `example_00.inp`
2323

2424
## Converting OUTP Files
2525

2626
```{eval-rst}
2727
.. note::
28-
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_00.outp>`_.
28+
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.outp>`_.
2929
```
3030

3131
Code:
@@ -44,7 +44,7 @@ Output:
4444

4545
```{eval-rst}
4646
.. note::
47-
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_00.outp>`_.
47+
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.outp>`_.
4848
```
4949

5050
Code:
@@ -68,7 +68,7 @@ Output:
6868

6969
```{eval-rst}
7070
.. note::
71-
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_00.inp>`_, `example_01.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_01.inp>`_, and `example_02.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_02.inp>`_.
71+
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.inp>`_, `example_01.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_01.inp>`_, and `example_02.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_02.inp>`_.
7272
```
7373

7474
Code:
@@ -97,7 +97,7 @@ Output:
9797

9898
```{eval-rst}
9999
.. note::
100-
This example requires `valid_29.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/valid_29.inp>`_.
100+
This example requires `example_05.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_05.inp>`_.
101101
```
102102

103103
Code:
@@ -109,16 +109,16 @@ Code:
109109

110110
Output:
111111

112-
Visualizing all surfaces from `PyMCNP/files/inp/valid_29.inp`.
113-
Writing visualizations of all surfaces from `PyMCNP/files/inp/valid_29.inp` to `valid_29-surfaces.pdf`
112+
Visualizing all surfaces from `example_05.inp`.
113+
Writing visualizations of all surfaces from `example_05.inp` to `example_05-surfaces.pdf`
114114

115115
![do_visualize](../images/do_visualize.png)
116116

117117
## Parameter Scan
118118

119119
```{eval-rst}
120120
.. note::
121-
This example requires `example_01.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_01.outp>`_ and `example_04.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_04.inp>`_.
121+
This example requires `example_01.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_01.outp>`_ and `example_04.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_04.inp>`_.
122122
```
123123

124124
Code:

docs/source/examples/read.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PyMCNP provides endpoints to read MCNP files.
66

77
```{eval-rst}
88
.. note::
9-
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_00.inp>`_.
9+
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.inp>`_.
1010
```
1111

1212
Code:
@@ -18,7 +18,7 @@ Code:
1818

1919
Output:
2020

21-
Reading INP from `PyMCNP/files/inp/example_00.inp`:
21+
Reading INP from `example_00.inp`:
2222
Isotropic neutron source over lunar regolith with two gamma detectors
2323
c
2424
c cell cards
@@ -34,7 +34,7 @@ Output:
3434

3535
```{eval-rst}
3636
.. note::
37-
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_00.inp>`_.
37+
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.inp>`_.
3838
```
3939

4040
Code:
@@ -46,14 +46,14 @@ Code:
4646

4747
Output:
4848

49-
Reading cell from `PyMCNP/files/inp/example_00.inp`:
49+
Reading cell from `example_00.inp`:
5050
100 100 -1.54 -1 imp:P,N 1
5151

5252
## Reading INP Material
5353

5454
```{eval-rst}
5555
.. note::
56-
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_00.inp>`_.
56+
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.inp>`_.
5757
```
5858

5959
Code:
@@ -65,7 +65,7 @@ Code:
6565

6666
Output:
6767

68-
Reading material from `PyMCNP/files/inp/example_00.inp`:
68+
Reading material from `example_00.inp`:
6969
m100 013027 -0.1701 020040 -0.131742819 020042 -0.000879273 020044 &
7070
-0.002834874 026054 -0.00086506 026056 -0.013579592 026057 -0.000313612 &
7171
008016 -0.45489192 019039 -0.0001865162 019041 -0.0000134604 012024 &
@@ -78,7 +78,7 @@ Output:
7878

7979
```{eval-rst}
8080
.. note::
81-
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/files/inp/example_00.inp>`_.
81+
This example requires `example_00.inp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.inp>`_.
8282
```
8383

8484
Code:
@@ -90,14 +90,14 @@ Code:
9090

9191
Output:
9292

93-
Reading surface from `PyMCNP/files/inp/example_00.inp`:
93+
Reading surface from `example_00.inp`:
9494
2 rcc 50 0 0 0 0 7.62 3.81
9595

9696
## Reading OUTP
9797

9898
```{eval-rst}
9999
.. note::
100-
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_00.outp>`_.
100+
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.outp>`_.
101101
```
102102

103103
Code:
@@ -123,7 +123,7 @@ Output:
123123

124124
```{eval-rst}
125125
.. note::
126-
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_00.outp>`_.
126+
This example requires `example_00.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_00.outp>`_.
127127
```
128128

129129
Code:
@@ -155,7 +155,7 @@ Output:
155155

156156
```{eval-rst}
157157
.. note::
158-
This example requires `example_03.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_03.outp>`_.
158+
This example requires `example_03.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_03.outp>`_.
159159
```
160160

161161
Code:
@@ -187,7 +187,7 @@ Output:
187187

188188
```{eval-rst}
189189
.. note::
190-
This example requires `example_02.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_02.outp>`_.
190+
This example requires `example_02.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_02.outp>`_.
191191
```
192192

193193
Code:
@@ -219,7 +219,7 @@ Output:
219219

220220
```{eval-rst}
221221
.. note::
222-
This example requires `example_01.outp <https://github.com/FSIBT/PyMCNP/blob/master/files/outp/example_01.outp>`_.
222+
This example requires `example_01.outp <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_01.outp>`_.
223223
```
224224

225225
Code:
@@ -251,7 +251,7 @@ Output:
251251

252252
```{eval-rst}
253253
.. note::
254-
This example requires `example_02.ptrac <https://github.com/FSIBT/PyMCNP/blob/master/files/ptrac/example_02.ptrac>`_.
254+
This example requires `example_02.ptrac <https://github.com/FSIBT/PyMCNP/blob/master/examples/example_02.ptrac>`_.
255255
```
256256

257257
Code:

examples/do_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import pymcnp
1111

1212
# Initializing `Check`.
13-
path = pathlib.Path(__file__).parent.parent / 'files' / 'inp' / 'example_00.inp'
13+
path = pathlib.Path('example_00.inp')
1414
checker = pymcnp.Check(path)
1515

1616
# Checking.

examples/do_convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
TALLY = '1'
1313

1414
# Reading OUTP.
15-
path = pathlib.Path(__file__).parent.parent / 'files' / 'outp' / 'example_00.outp'
15+
path = pathlib.Path('example_00.outp')
1616
outp = pymcnp.Outp.from_file(path)
1717

1818
# Initializing `Convert`.

examples/do_parameter_scan.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class MyRun(pymcnp.Run):
2121
def posthook_file(self, path, index):
2222
# Copying OUTP (ECHO used for demo).
23-
path_copy = pathlib.Path(__file__).parent.parent / 'files' / 'outp' / 'example_01.outp'
23+
path_copy = pathlib.Path('example_01.outp')
2424
path_outp = path / f'run-{index}.outp'
2525

2626
with path_outp.open('w') as file_outp:
@@ -44,7 +44,7 @@ def posthook_batch(self, path):
4444

4545

4646
# Reading INP.
47-
path_inp = pathlib.Path(__file__).parent.parent / 'files' / 'inp' / 'example_04.inp'
47+
path_inp = pathlib.Path('example_04.inp')
4848
inp = pymcnp.Inp.from_file(path_inp)
4949

5050
# Scanning.

examples/do_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
TALLY = '1'
1515

1616
# Reading OUTP.
17-
path = pathlib.Path(__file__).parent.parent / 'files' / 'outp' / 'example_00.outp'
17+
path = pathlib.Path('example_00.outp')
1818
outp = pymcnp.Outp.from_file(path)
1919

2020
# Initializing `Plot`

examples/do_run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def posthook_batch(self, path):
3131

3232

3333
# Reading INP.
34-
path0 = pathlib.Path(__file__).parent.parent / 'files' / 'inp' / 'example_00.inp'
35-
path1 = pathlib.Path(__file__).parent.parent / 'files' / 'inp' / 'example_01.inp'
36-
path2 = pathlib.Path(__file__).parent.parent / 'files' / 'inp' / 'example_02.inp'
34+
path0 = pathlib.Path('example_00.inp')
35+
path1 = pathlib.Path('example_01.inp')
36+
path2 = pathlib.Path('example_02.inp')
3737
inp0 = pymcnp.Inp.from_file(path0)
3838
inp1 = pymcnp.Inp.from_file(path1)
3939
inp2 = pymcnp.Inp.from_file(path2)

examples/do_visualize.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Example visualizing INP files using `Visualize`.
33
4-
This example visualizes the surfaces in `valid_29.inp` INP file using
4+
This example visualizes the surfaces in `example_05.inp` INP file using
55
`to_show_surfaces`, and it generates a PDF file containing the images.
66
"""
77

@@ -10,7 +10,7 @@
1010
import pymcnp
1111

1212
# Reading INP.
13-
path = pathlib.Path(__file__).parent.parent / 'files' / 'inp' / 'valid_29.inp'
13+
path = pathlib.Path('example_05.inp')
1414
inp = pymcnp.Inp.from_file(path)
1515

1616
# Visualizing surfaces.
@@ -19,5 +19,5 @@
1919
visualizer.to_show_surfaces().show()
2020

2121
# Converting to PDF.
22-
print(f'Writing visualizations of all surfaces from `{path}` to `valid_29-surfaces.pdf`')
23-
visualizer.to_pdf_surfaces('valid_29-surfaces.pdf')
22+
print(f'Writing visualizations of all surfaces from `{path}` to `example_05-surfaces.pdf`')
23+
visualizer.to_pdf_surfaces('example_05-surfaces.pdf')

0 commit comments

Comments
 (0)