flopy.mf6.utils.generate_classes module

backup_existing_dfns(flopy_dfn_path)[source]
cli_main()[source]

Command-line interface for generate_classes().

delete_files(files, pth, allow_failure=False, exclude=None)[source]
delete_mf6_classes()[source]
download_dfn(owner, repo, ref, new_dfn_pth)[source]
generate_classes(owner='MODFLOW-USGS', repo='modflow6', branch=None, ref='master', dfnpath=None, backup=True)[source]

Generate the MODFLOW 6 flopy classes using definition files from the MODFLOW 6 GitHub repository or a set of definition files in a folder provided by the user.

Parameters:
  • owner (str, default "MODFLOW-USGS") – Owner of the MODFLOW 6 repository to use to update the definition files and generate the MODFLOW 6 classes.

  • repo (str, default "modflow6") – Name of the MODFLOW 6 repository to use to update the definition.

  • branch (str, optional) –

    Branch name of the MODFLOW 6 repository to use to update the definition files and generate the MODFLOW 6 classes.

    Deprecated since version 3.5.0: Use ref instead.

  • ref (str, default "master") – Branch name, tag, or commit hash to use to update the definition.

  • dfnpath (str) – Path to a definition file folder that will be used to generate the MODFLOW 6 classes. Default is none, which means that the branch will be used instead. dfnpath will take precedence over branch if dfnpath is specified.

  • backup (bool, default True) – Keep a backup of the definition files in dfn_backup with a date and timestamp from when the definition files were replaced.

list_files(pth, exts=['py'])[source]
replace_dfn_files(new_dfn_pth, flopy_dfn_path)[source]