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)
- Caching dependencies in github action
- How do I run `hatch-test` scripts?
- Vscode's pytest integration and `hatch test` do not work well together HOT 2
- Hatch doesn't install on ARM64 Windows HOT 1
- Building variant wheels from same source code HOT 5
- Several tests related to Python distributions fail on Fedora Linux on non-x86_64 architectures in Hatch 1.12.0 HOT 3
- Option to not print `cmd` input lines when running an array of scripts
- project.readme content-tyoe does not support specifying markdown flavors HOT 1
- Pyproject.toml expected encoding seems inconsistent, bug with `hatch test --cover` and special characters HOT 2
- Hatch shell fails: `TypeError: str expected, not NoneType`
- Creating an "empty wheel" (e.g. for a meta package that only installs dependencies) requires weird workarounds HOT 2
- A virtual environment `installer` other than `pip` or `uv` silently falls back to `pip`
- env issue ModuleNotFoundError: No module named 'pip._vendor.cachecontrol.caches'
- run environment with specific python patch-release version HOT 1
- Is pinning dependencies in the `hatch-test` environments recommended? HOT 2
- Non-python binary dependency
- Hatch no longer installs on Windows ARM64 HOT 2
- PKG-INFO Missing Metadata HOT 6
- Recommended License configuration leaves license null in project meta data HOT 4
- Migration from setup.py to project.toml: comments in requirements.txt are included HOT 3
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.