-
Notifications
You must be signed in to change notification settings - Fork 59
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
FR: add support for dependency-groups #565
Comments
I know this issue has been open a while, but we are closer to supporting this. Recent work gives us a more natural way to handle config from [[modules]]
path = "**.scripts"
external_depends_on = ["@scripts"] where |
Thanks @emdoyle for the update. I have a follow up question, how would this work for tests? In our case we have the tests inside the modules, in a folder called Finally, that would mean that for the toplevel |
@sk- I generally exclude test files using [[modules]]
path = "**.*test* near the bottom of your There is no way to refer to dynamic values like 'sibling' or 'parent' modules within a globbed definition at this moment though. Does this answer your questions? |
Now that PEP 735 has been accepted, it would be great to support it in tach. Specially given that
uv
already supportsdependency-groups.
In our use case we have several groups to better control out dependencies, for example we have a
test
group and ascripts
group.We are currently checking external dependencies with the command
uv run tach check-external -e "**/*test*,**/scripts"
, because otherwise tach complains thatpytest
and other dependencies are not available.My proposal is to add support for dependency groups in the following way to the
tach.toml
config file:Which would mean that files matching
**/scripts
would also have access to the dependencies defined in thescripts
group.Note that in the proposal above, dependencies present in the default group will be available to all files.
I could see how that may not fit all use cases, and maybe a more flexible approach would be to define it the other way around, as in
In that approach, we would map file patterns to available groups, where patterns are matched from the top.
The text was updated successfully, but these errors were encountered: