Skip to content

Setup instructions in CONTRIBUTING.md fail with ModuleNotFoundError: pytest_cases on fresh clone #1097

@Stu-ops

Description

@Stu-ops

Description:

When following the setup instructions in CONTRIBUTING.md for a fresh clone of the repository, running poetry install --extras dev results in a failure due to a missing pytest_cases module. This prevents contributors from setting up their development environment correctly.

Steps to Reproduce:

  1. Clone the repository: git clone https://github.com/malariagen/malariagen-data-python.git
  2. Navigate to the directory: cd malariagen-data-python
  3. Run poetry install --extras dev as per CONTRIBUTING.md instructions.
  4. Observe the error: ModuleNotFoundError: No module named 'pytest_cases'

Expected Behavior:

  • poetry install --extras dev should complete successfully, installing all required dependencies including dev tools like pytest-cases.

Actual Behavior:

  • Installation fails with the above error, halting the setup process.

Root Cause:

  • Although pytest-cases is declared in [tool.poetry.extras] dev, Poetry's extras mechanism may not be resolving or locking the dependency correctly in all cases. Additionally, Poetry has deprecated extras in favor of dependency-groups for better dependency management. The project should migrate to dependency-groups to ensure reliable installation of dev dependencies.

Environment:

  • Python version: 3.10+ (as per pyproject.toml)
  • Poetry version: Latest (dependency-groups require Poetry 1.2+)
  • OS: Any (reproducible on Windows, likely others)

Additional Context:

  • This issue blocks new contributors from contributing, as they cannot run tests or set up the dev environment.
  • The package pytest-cases is used for separating test code from test cases in pytest, and is essential for running the test suite.
  • CONTRIBUTING.md currently uses --extras dev, but modern Poetry recommends --with dev for dependency-groups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions