Skip to content

Per-directory envs #8

@flying-sheep

Description

@flying-sheep

We should have settings like:

{
    // used by language servers
    "hatch.env.default": "default",  // hatch’s `default` env
    // used to map files and subdirectories to envs
    "hatch.env.override": {
        "tests/": "hatch-test.3.13",  // hatch’s default env, e.g. `hatch-test.py3.13` 
        "docs/": "docs",  // custom env for running sphinx
        "*.ipynb": "data-science",  // custom env for running notebooks, with `ipykernel`
    }, 
}

the defaults would probably be

{
    "hatch.env.default": "default",
    "hatch.env.override": {
        "tests/": "hatch-test.*",
    }, 
}

if we want to make globbing envs a thing, but that’s probably hard to determine: would it be the same that hatch test uses?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions