Skip to content

Avoid nested Hatch invocations in snapshot scripts#1997

Open
plypaul wants to merge 3 commits intomainfrom
p/misc__01
Open

Avoid nested Hatch invocations in snapshot scripts#1997
plypaul wants to merge 3 commits intomainfrom
p/misc__01

Conversation

@plypaul
Copy link
Contributor

@plypaul plypaul commented Mar 20, 2026

I recently updated my dev environment (e.g. updated package versions, changed how hatch was installed) and saw that there was an error running make regenerate-test-snapshots. The issue was due to nested hatch invocations: the script was called using a hatch command, and the script calls hatch commands using a different environment.

This PR removes dependencies from the top-level script so that it can be run without hatch. Please view by commit.

@plypaul plypaul marked this pull request as ready for review March 20, 2026 23:54
@plypaul plypaul requested a review from a team as a code owner March 20, 2026 23:54
Copy link
Contributor

@theyostalservice theyostalservice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for setting this up for reviewing by commit; it made it much more reasonable to review!

run_command(
f"hatch -v run {hatch_env}:pytest -vv --log-cli-level info --use-persistent-source-schema "
"tests_metricflow/source_schema_tools.py::populate_source_schema"
if test_configuration.engine not in ENGINES_WITH_PERSISTENT_SOURCE_SCHEMAS:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants