Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pixi run selection should only open up if task is not in default feature #767

Closed
pavelzw opened this issue Feb 2, 2024 · 3 comments
Closed

Comments

@pavelzw
Copy link
Contributor

pavelzw commented Feb 2, 2024

[project]
name = "polarify"
description = "Simplifying conditional Polars Expressions with Python 🐍 πŸ»β€β„οΈ"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]

[dependencies]
python = ">=3.9"
polars = ">=0.14.24,<0.21"

[tasks]
postinstall = "pip install --no-build-isolation --no-deps --disable-pip-version-check -e ."

[feature.py39.dependencies]
python = "3.9.*"
[feature.py310.dependencies]
python = "3.10.*"
[feature.py311.dependencies]
python = "3.11.*"
[feature.py312.dependencies]
python = "3.12.*"

[host-dependencies]
python = "*"
pip = "*"
hatchling = "*"

[feature.test.dependencies]
pytest = "*"
pytest-md = "*"
pytest-emoji = "*"
hypothesis = "*"
[feature.test.tasks]
test = "pytest"

[feature.lint.dependencies]
pre-commit = "*"
[feature.lint.tasks]
lint = "pre-commit run --all"

[environments]
default = ["py312", "test"]
py39 = ["py39", "test"]
py310 = ["py310", "test"]
py311 = ["py311", "test"]
py312 = ["py312", "test"]
$ pixi run postinstall
✨ Pixi task (default): pip install --no-build-isolation --no-deps --disable-pip-version-check -e .
...
$ pixi run test
? The task 'test' can be run in multiple environments.

Please select an environment to run the task in: β€Ί
❯ default
  py39
  py310
  py311
  py312
@ruben-arts
Copy link
Contributor

I'm actually not sure if that is a better user experience, as there is no auto completion on the cli -e command.

@pavelzw
Copy link
Contributor Author

pavelzw commented Feb 2, 2024

The availability of the test command is basically the same as the postinstall command. I find it a bit irritating that they behave differently πŸ˜…
Maybe we should add all commands available to the default env to autocompletion?

ruben-arts pushed a commit that referenced this issue Feb 2, 2024
Once #767 is fixed, `pixi run test` will also work
baszalmstra pushed a commit that referenced this issue Feb 8, 2024
This addresses @pavelzw issue in #767 

Which means that if a task is in the default environment we always
automatically run it from that environment.
@pavelzw
Copy link
Contributor Author

pavelzw commented Feb 23, 2024

Fixed by #772

@pavelzw pavelzw closed this as completed Feb 23, 2024
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

No branches or pull requests

2 participants