module documentation

Undocumented

Function f2cmap_f90 Generates a single f90 file for testing
Function get_io_paths Takes in a temporary file for testing and returns the expected output and input paths
Function hello_world_f77 Generates a single f77 file for testing
Function hello_world_f90 Generates a single f90 file for testing
Function retreal_f77 Generates a single f77 file for testing
Function test_build_dir Ensures that the build directory can be specified
Function test_debugcapi Ensures that debugging wrappers are written
Function test_debugcapi_bld Ensures that debugging wrappers work
Function test_f2cmap Check that Fortran-to-Python KIND specs can be passed
Function test_f2py_only Test that functions can be kept by only: CLI :: only:
Function test_f2py_skip Tests that functions can be skipped CLI :: skip:
Function test_file_processing_switch Tests that it is possible to return to file processing mode CLI :: : BUG: numpy-gh #20520
Function test_gen_pyf Ensures that a signature file is generated via the CLI CLI :: -h
Function test_gen_pyf_no_overwrite Ensures that the CLI refuses to overwrite signature files CLI :: -h without --overwrite-signature
Function test_gen_pyf_stdout Ensures that a signature file can be dumped to stdout CLI :: -h
Function test_hlink Add to the include directories
Function test_inclheader Add to the include directories
Function test_inclpath Add to the include directories
Function test_latexdoc Ensures that TeX documentation is written out
Function test_lower_cmod Lowers cases by flag or when -h is present
Function test_lower_sig Lowers cases in signature files by flag or when -h is present
Function test_mod_gen_f77 Checks the generation of files based on a module name CLI :: -m
Function test_nolatexdoc Ensures that TeX documentation is written out
Function test_norestexdoc Ensures that TeX documentation is written out
Function test_nowrapfunc Ensures that fortran subroutine wrappers for F77 can be disabled
Function test_npd_arch CLI :: -c --arch
Function test_npd_compiler CLI :: -c --compiler
Function test_npd_debug CLI :: -c --debug
Function test_npd_define CLI :: -D<define>
Function test_npd_f77exec CLI :: -c --f77exec
Function test_npd_f77flags CLI :: -c --f77flags
Function test_npd_f90exec CLI :: -c --f90exec
Function test_npd_f90flags CLI :: -c --f90flags
Function test_npd_fcompiler CLI :: -c --fcompiler
Function test_npd_help_fcompiler CLI :: -c --help-fcompiler
Function test_npd_incl CLI :: -I/path/to/include/
Function test_npd_lib CLI :: -c -L/path/to/lib/ -l<libname>
Function test_npd_link_auto CLI :: -c --link-<resource>
Function test_npd_linker CLI :: <filename>.o <filename>.so <filename>.a
Function test_npd_noarch CLI :: -c --noarch
Function test_npd_noopt CLI :: -c --noopt
Function test_npd_opt CLI :: -c --opt
Function test_npd_undefine CLI :: -U<name>
Function test_npdistop CLI :: -c
Function test_overwrite Ensures that the build directory can be specified
Function test_quiet Reduce verbosity
Function test_restdoc Ensures that RsT documentation is written out
Function test_shortlatex Ensures that truncated documentation is written out
Function test_verbose Increase verbosity
Function test_version Ensure version
Function test_wrapfunc_def Ensures that fortran subroutine wrappers for F77 are included by default
Variable PPaths Undocumented
@pytest.fixture(scope='session')
def f2cmap_f90(tmpdir_factory): (source)

Generates a single f90 file for testing

def get_io_paths(fname_inp, mname='untitled'): (source)

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 names are typically incorrect
Parameters
fname_inp:strThe input filename
mname:str, optionalThe name of the module, untitled by default
Returns
NamedTuple PPathsgenp - The possible paths which are generated, not all of which exist
@pytest.fixture(scope='session')
def hello_world_f77(tmpdir_factory): (source)

Generates a single f77 file for testing

@pytest.fixture(scope='session')
def hello_world_f90(tmpdir_factory): (source)

Generates a single f90 file for testing

@pytest.fixture(scope='session')
def retreal_f77(tmpdir_factory): (source)

Generates a single f77 file for testing

def test_build_dir(capfd, hello_world_f90, monkeypatch): (source)

Ensures that the build directory can be specified

CLI :: --build-dir

def test_debugcapi(capfd, hello_world_f90, monkeypatch): (source)

Ensures that debugging wrappers are written

CLI :: --debug-capi

@pytest.mark.xfail(reason='Consistently fails on CI.')
def test_debugcapi_bld(hello_world_f90, monkeypatch): (source)

Ensures that debugging wrappers work

CLI :: --debug-capi -c

def test_f2cmap(capfd, f2cmap_f90, monkeypatch): (source)

Check that Fortran-to-Python KIND specs can be passed

CLI :: --f2cmap

def test_f2py_only(capfd, retreal_f77, monkeypatch): (source)

Test that functions can be kept by only: CLI :: only:

@pytest.mark.xfail
def test_f2py_skip(capfd, retreal_f77, monkeypatch): (source)

Tests that functions can be skipped CLI :: skip:

def test_file_processing_switch(capfd, hello_world_f90, retreal_f77, monkeypatch): (source)

Tests that it is possible to return to file processing mode CLI :: : BUG: numpy-gh #20520

def test_gen_pyf(capfd, hello_world_f90, monkeypatch): (source)

Ensures that a signature file is generated via the CLI CLI :: -h

def test_gen_pyf_no_overwrite(capfd, hello_world_f90, monkeypatch): (source)

Ensures that the CLI refuses to overwrite signature files CLI :: -h without --overwrite-signature

def test_gen_pyf_stdout(capfd, hello_world_f90, monkeypatch): (source)

Ensures that a signature file can be dumped to stdout CLI :: -h

def test_hlink(): (source)

Add to the include directories

CLI :: --help-link

def test_inclheader(capfd, hello_world_f90, monkeypatch): (source)

Add to the include directories

CLI :: -include TODO: Document this in the help string

def test_inclpath(): (source)

Add to the include directories

CLI :: --include-paths

def test_latexdoc(capfd, hello_world_f90, monkeypatch): (source)

Ensures that TeX documentation is written out

CLI :: --latex-doc

def test_lower_cmod(capfd, hello_world_f77, monkeypatch): (source)

Lowers cases by flag or when -h is present

CLI :: --[no-]lower

def test_lower_sig(capfd, hello_world_f77, monkeypatch): (source)

Lowers cases in signature files by flag or when -h is present

CLI :: --[no-]lower -h

def test_mod_gen_f77(capfd, hello_world_f90, monkeypatch): (source)

Checks the generation of files based on a module name CLI :: -m

def test_nolatexdoc(capfd, hello_world_f90, monkeypatch): (source)

Ensures that TeX documentation is written out

CLI :: --no-latex-doc

def test_norestexdoc(capfd, hello_world_f90, monkeypatch): (source)

Ensures that TeX documentation is written out

CLI :: --no-rest-doc

def test_nowrapfunc(capfd, hello_world_f90, monkeypatch): (source)

Ensures that fortran subroutine wrappers for F77 can be disabled

CLI :: --no-wrap-functions

def test_npd_arch(): (source)

CLI :: -c --arch

def test_npd_compiler(): (source)

CLI :: -c --compiler

def test_npd_debug(): (source)

CLI :: -c --debug

def test_npd_define(): (source)

CLI :: -D<define>

def test_npd_f77exec(): (source)

CLI :: -c --f77exec

def test_npd_f77flags(): (source)

CLI :: -c --f77flags

def test_npd_f90exec(): (source)

CLI :: -c --f90exec

def test_npd_f90flags(): (source)

CLI :: -c --f90flags

def test_npd_fcompiler(): (source)

CLI :: -c --fcompiler

def test_npd_help_fcompiler(): (source)

CLI :: -c --help-fcompiler

def test_npd_incl(): (source)

CLI :: -I/path/to/include/

def test_npd_lib(): (source)

CLI :: -c -L/path/to/lib/ -l<libname>

def test_npd_link_auto(): (source)

CLI :: -c --link-<resource>

def test_npd_linker(): (source)

CLI :: <filename>.o <filename>.so <filename>.a

def test_npd_noarch(): (source)

CLI :: -c --noarch

def test_npd_noopt(): (source)

CLI :: -c --noopt

def test_npd_opt(): (source)

CLI :: -c --opt

def test_npd_undefine(): (source)

CLI :: -U<name>

@pytest.mark.xfail(reason='Consistently fails on CI.')
def test_npdistop(hello_world_f90, monkeypatch): (source)

CLI :: -c

def test_overwrite(capfd, hello_world_f90, monkeypatch): (source)

Ensures that the build directory can be specified

CLI :: --overwrite-signature

def test_quiet(capfd, hello_world_f90, monkeypatch): (source)

Reduce verbosity

CLI :: --quiet

def test_restdoc(capfd, hello_world_f90, monkeypatch): (source)

Ensures that RsT documentation is written out

CLI :: --rest-doc

def test_shortlatex(capfd, hello_world_f90, monkeypatch): (source)

Ensures that truncated documentation is written out

TODO: Test to ensure this has no effect without --latex-doc CLI :: --latex-doc --short-latex

def test_verbose(capfd, hello_world_f90, monkeypatch): (source)

Increase verbosity

CLI :: --verbose

def test_version(capfd, monkeypatch): (source)

Ensure version

CLI :: -v

def test_wrapfunc_def(capfd, hello_world_f90, monkeypatch): (source)

Ensures that fortran subroutine wrappers for F77 are included by default

CLI :: --[no]-wrap-functions

Undocumented