Skip to content

feat(fixtures): add use_pandas pytest fixture and --pandas CLI arg#112

Merged
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:pandas-fixture
Sep 12, 2023
Merged

feat(fixtures): add use_pandas pytest fixture and --pandas CLI arg#112
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:pandas-fixture

Conversation

@wpbonelli
Copy link
Copy Markdown
Member

@wpbonelli wpbonelli commented Sep 11, 2023

Tabular data is commonly represented in Python with numpy recarrays and pandas dataframes. FloPy recently added pandas as a core dependency. Work is underway to use pandas internally where expedient and support pandas dataframes across user-facing APIs where numpy recarrays were previously required.

Introduce a --pandas (short -P) pytest CLI option accepting values: yes, no, random. This controls the value of a boolean use_pandas fixture. Motivations:

  • allow parametrizing use_pandas argument to MFSimulation etc
  • allow controlling how package input data is provided in tests

Other miscellany:

  • some minor cleanup/reorg
  • use dest="KEEP" when configuring --keep option, access option from fixtures with request.config.option.KEEP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant