Takes in a temporary file for testing and returns the expected output and input paths Here expected output is essentially one of any of the possible generated files. ..note:: Since this does not actually run f2py, none of these are guaranteed to exist, and module nam
(fname_inp, mname="untitled")
| 36 | |
| 37 | |
| 38 | def get_io_paths(fname_inp, mname="untitled"): |
| 39 | """Takes in a temporary file for testing and returns the expected output and input paths |
| 40 | |
| 41 | Here expected output is essentially one of any of the possible generated |
| 42 | files. |
| 43 | |
| 44 | ..note:: |
| 45 | |
| 46 | Since this does not actually run f2py, none of these are guaranteed to |
| 47 | exist, and module names are typically incorrect |
| 48 | |
| 49 | Parameters |
| 50 | ---------- |
| 51 | fname_inp : str |
| 52 | The input filename |
| 53 | mname : str, optional |
| 54 | The name of the module, untitled by default |
| 55 | |
| 56 | Returns |
| 57 | ------- |
| 58 | genp : NamedTuple PPaths |
| 59 | The possible paths which are generated, not all of which exist |
| 60 | """ |
| 61 | bpath = Path(fname_inp) |
| 62 | return PPaths( |
| 63 | finp=bpath.with_suffix(".f"), |
| 64 | f90inp=bpath.with_suffix(".f90"), |
| 65 | pyf=bpath.with_suffix(".pyf"), |
| 66 | wrap77=bpath.with_name(f"{mname}-f2pywrappers.f"), |
| 67 | wrap90=bpath.with_name(f"{mname}-f2pywrappers2.f90"), |
| 68 | cmodf=bpath.with_name(f"{mname}module.c"), |
| 69 | ) |
| 70 | |
| 71 | |
| 72 | ################ |
no outgoing calls
no test coverage detected
searching dependent graphs…