Skip to content

Fix development environment setup and dependency management inconsistencies #403

@Littie28

Description

@Littie28

Checklist

  • I have searched the existing issues and discussions for a similar question or problem.
  • I have read the documentation and tried to find an answer there.
  • I am using the latest version of Optiland (if not, please update and retry).
  • I have tried to reproduce or debug the issue myself before opening this.
  • I have included all necessary context, such as version info, error messages, or minimal reproducible examples.

Thanks for taking the time to go through this — it really helps us help you!

Bug Report

Describe the bug
The development environment setup has several inconsistencies that prevent contributors from following the instructions in CONTRIBUTING.md:

  1. CONTRIBUTING.md instructs running pytest --cov=optiland --cov-report=xml, but pytest-cov is not in the dev dependency group
  2. CI workflow manually installs dependencies with uv add --dev ... instead of using declared dependency groups
  3. Contributors are required to run coverage manually, despite it being automated in CI
  4. Project uses legacy [project.optional-dependencies] instead of modern PEP 735 [dependency-groups]

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository
  2. Run uv sync --dev to install development dependencies
  3. Follow CONTRIBUTING.md and run pytest --cov=optiland --cov-report=xml
  4. See error: pytest: error: unrecognized arguments: --cov=optiland --cov-report=xml

Expected behavior

  • Development dependencies should include all tools mentioned in CONTRIBUTING.md
  • CI workflow should use uv sync --dev to ensure reproducibility
  • CONTRIBUTING.md should align with actual CI requirements (coverage is automated)
  • Modern PEP 735 dependency groups should be used for better tooling support

Environment

  • Optiland Version: 0.5.7
  • Python Version: 3.10+
  • OS: All
  • Additional Info: Using uv for dependency management

Additional context
This affects all contributors trying to set up a development environment. The fix involves:

  • Migrating to PEP 735 [dependency-groups]
  • Adding pytest-cov to dev dependencies
  • Updating CI to use uv sync --dev
  • Updating CONTRIBUTING.md to remove redundant coverage instructions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions