Skip to content

Separate Development Dependencies from Production Dependencies #3877

@anilbeycorintis

Description

@anilbeycorintis

Hi,

Thank you for your work on Firedrake!

I noticed that requirements-ext.txt includes both production dependencies (e.g., scipy, sympy) and development dependencies (e.g., pylint, pytest, nbval). This forces users to install unnecessary dev tools, leading to overhead and conflicts.

https://github.com/firedrakeproject/firedrake/blob/76d8daa0132e5067bae17d05985401b64f443acd/requirements-ext.txt#L1:L15

Could you split these into requirements.txt (for production) and requirements-dev.txt, or use extras_require (e.g., pip install firedrake[dev])? Users of Firedrake shouldn’t have to depend on tools like pytest or pylint or nbval.

Thanks

Example: how pytest solves this problem

It is a common practice to separate development requirements. For example, pytest handles this by listing production dependencies separately from development dependencies. Users only need the production list to use pytest. Development dependencies are installed separately, typically in a different environment, only if contributing to pytest.

This approach could help make dependency management cleaner for Firedrake users. Let me know if I can assist!

dependencies = [
    "colorama; sys_platform=='win32'",
    "exceptiongroup>=1.0.0rc8; python_version<'3.11'",
    "iniconfig",
    "packaging",
    "pluggy>=1.5,<2",
    "tomli>=1; python_version<'3.11'",
]
optional-dependencies.dev = [
    "argcomplete",
    "attrs>=19.2",
    "hypothesis>=3.56",
    "mock",
    "pygments>=2.7.2",
    "requests",
    "setuptools",
    "xmlschema",
]

https://github.com/pytest-dev/pytest/blob/72f17d10d76e5260906c17f279c5fa6bd29b5a8d/pyproject.toml#L49:L66

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions