Comments (4)
Thanks, I should have thought of that.
For posterity, here's what worked for me.
[tool.hatch.envs.test.overrides]
matrix.python.dependencies = [
{ value = "pydantic<2", if = ["3.8"] },
{ value = "pydantic>=2.0.0", if = ["3.12"] },
]
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.12"]
from hatch.
please enumerate the exact environments you want with which dependencies
from hatch.
Thanks for the fast response. I would like to test on the following environments:
- Python 3.8 with pydantic v1
- Python 3.12 with pydantic v2
Here is my current configuration in pyproject.toml
.
[tool.hatch.envs.test.overrides]
matrix.pydantic.dependencies = [
{ value = "pydantic<2", if = ["pydantic-v1"] },
{ value = "pydantic>=2.0.0", if = ["pydantic-v2"] },
]
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.12"]
pydantic = ["pydantic-v1", "pydantic-v2"]
This results in four runs of the test suite. I would like to have just two.
from hatch.
the condition should be based on the Python version
from hatch.
Related Issues (20)
- zipfile will fail if SOURCE_DATE_EPOCH is before 1980 HOT 2
- Support reading the default Python version from `.python-version` HOT 2
- hatch-static-analysis environment fails to create HOT 5
- How to pass arguments to ruff? HOT 8
- Self-referencing optional dependencies check PyPi version instead of local `pyproject.toml` HOT 4
- Can't run pre-install-commands in detached environment HOT 1
- wrong path escaping on macos HOT 12
- hatch run from directory outside of project tree? HOT 5
- Unfortunate default environments display in narrow terminals HOT 2
- feat: add option to pass arguments to `uv` HOT 1
- hatch python install CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate HOT 1
- `hatch test` fails for packages that install executables in the virtualenv's `bin`
- Index restricted packages: installing specific packages from specific indices
- tool.hatch.envs.default.python version is not being used in hatch test HOT 2
- Indicator to show the selected environment for hatch test
- Hatch requires depricated ImpImporter in 3.12 HOT 1
- How can a `BuildHookInterface` class determine whether it's being run for an editable build? HOT 4
- If a build hook force-includes a path, editable installs will be broken HOT 1
- Documentation. What type of editable installs hatch supports? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hatch.