Skip to content

Migrate dev dependencies to dependency-groups and update CONTRIBUTING.md#1098

Open
Stu-ops wants to merge 4 commits intomalariagen:masterfrom
Stu-ops:GH1097-migrate-dev-deps-to-dependency-groups
Open

Migrate dev dependencies to dependency-groups and update CONTRIBUTING.md#1098
Stu-ops wants to merge 4 commits intomalariagen:masterfrom
Stu-ops:GH1097-migrate-dev-deps-to-dependency-groups

Conversation

@Stu-ops
Copy link

@Stu-ops Stu-ops commented Mar 10, 2026

Description:

This PR addresses issue #1029 by migrating dev dependencies from the deprecated [tool.poetry.extras] to the modern [dependency-groups] system in Poetry. This ensures reliable installation of pytest-cases and other dev tools, resolving the ModuleNotFoundError: pytest_cases during setup.

Changes Made:

  1. Added [dependency-groups] section in pyproject.toml with pytest-cases (>=3.10.1,<4.0.0) in the dev group.
  2. Regenerated poetry.lock to lock the updated dependencies, ensuring pytest-cases and its sub-dependencies are properly resolved.
  3. Updated CONTRIBUTING.md to use poetry install --with dev instead of --extras dev to align with Poetry's recommended practices.

Why This Fixes the Issue:

  • Dependency-groups provide better dependency resolution and are the future-proof way to handle optional dependencies in Poetry.
  • By migrating to --with dev, contributors will reliably install dev dependencies without resolution issues.
  • The version constraint ensures compatibility with the current Python version range (>=3.10,<3.13) and allows for future updates within the major version.

Testing:

  • Verified that poetry install --with dev now completes without errors on a fresh clone.
  • Confirmed that pytest-cases is available in the virtual environment after installation.
  • Ran a basic test to ensure pytest can import and use pytest-cases functionality.
  • Checked that existing --extras dev still works for backward compatibility (though deprecated).

Breaking Changes: None for users following the updated guide. The old --extras dev command still functions but is deprecated.

Checklist:

Migrated

  • dev dependencies to [dependency-groups] in pyproject.toml
  • Regenerated poetry.lock
  • Updated CONTRIBUTING.md to use --with dev
  • Tested installation on fresh clone
  • Verified no conflicts with existing dependencies
  • Ensured backward compatibility

Related Issues: Fixes #1029

@Stu-ops
Copy link
Author

Stu-ops commented Mar 11, 2026

Hey @jonbrenas can you reviewing this pr and related issues so that i can start my work further if you have any questions regarding to this you can ask me to so that i can closed this.

@jonbrenas
Copy link
Collaborator

Hi @Stu-ops. Thank you for catching this. I don't think you pushed your changes to 'CONTRIBUTING.md', though.

@Stu-ops
Copy link
Author

Stu-ops commented Mar 11, 2026

Hey @jonbrenas , thanks for seeing this actually i forget to update it , but now I updated the contributing.md file also.
Can you please review this and if you think this was correct then please merge it because i want to do more PRs related to the other issues so it was very helpful for me.

@jonbrenas
Copy link
Collaborator

Hi @Stu-ops, does it make sense to keep an "extras" section if all the dependencies have been moved to "dev"?

@Stu-ops
Copy link
Author

Stu-ops commented Mar 12, 2026

Hi @Stu-ops, does it make sense to keep an "extras" section if all the dependencies have been moved to "dev"?

I hope all are clear.

@Stu-ops
Copy link
Author

Stu-ops commented Mar 13, 2026

Hey @jonbrenas , i think it will be already 1 and a half days passed on, but you did not either merge it or tell me the reason to not accept it. Can you tell me why this pr take a long time to merge it.

@jonbrenas
Copy link
Collaborator

Hi @Stu-ops, I have a lot of tasks on my plate, reviewing PRs being far from the most important at the moment. In this case in particular, I asked you a question and you didn't answer. The code itself is not particularly complex so I am more interested in your reasoning. Particularly because the tests fail: you did not update how they set up the environment.

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.

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

3 participants