Closed eswolinsky3241 closed 3 months ago
@ofek Sorry if this question is answered elsewhere, but I was wondering if you had any guidance here? I think I'm a bit confused overall on how hatch is intended to manage dependencies for an application rather than a library. Would it be feasible to add an option to allow the hatch-test
environment to inherit settings from default
?
Yes, internal environments do not inherit from default
so you would have to configure them separately. Thanks for the reminder, I forgot to respond!
Hi, I'm sorry if I'm missing this in the documentation, but I'm looking to understand best practices for the internal
hatch-
environments, specifically for building applications rather than libraries.I'm using the
hatch-pip-compile
plugin to pin my dependencies for my application. My default environment looks like this:When I create this environment, I see the
lockfiles/requirements-default.txt
file as expected.I think the
hatch test
command is great in that I don't have to define my own test scripts and dependencies for every project. However, I'd like to pin my dependencies to avoid a future change breaking my tests in CI. I was surprised that using thetest
command did not generate lockfiles, given that I was expecting thehatch-test*
environments to inherit from my default environment configuration, meaning those environments would also be pip-compile environments.So it seems like maybe the
internal
environments do not follow the inheritance rule, and I was wondering if there is any guidance on whether I should be separately configuring thehatch-test
environment to duplicate the pip-compile` configuration? Or is it preferred to leave the internal environments opinionated, and create my own custom test environment? Thanks in advance!