Skip to content

Comments

chore: move to justfile for test hugr generation#308

Merged
vanyae-cqc merged 6 commits intomainfrom
chore/uv-test-fixture-files
Jan 22, 2026
Merged

chore: move to justfile for test hugr generation#308
vanyae-cqc merged 6 commits intomainfrom
chore/uv-test-fixture-files

Conversation

@vanyae-cqc
Copy link
Collaborator

An experiment in using a justfile for the generation of compiled test files.

@vanyae-cqc vanyae-cqc requested a review from ferbetanzo January 19, 2026 13:38
Copy link
Collaborator

@ferbetanzo ferbetanzo left a comment

Choose a reason for hiding this comment

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

Love the idea of using just! I just have a couple of comments.


The compiled HUGR is stored (alongside the guppy python program) with a `.hugr` extension.

Run `just recompile` in this directory (or `just recompile-test-hugrs` on
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small typo, the justfile command in the root is recompile-test-files.

# Re-generate all hugr files.
recompile-hugrs:
#!/usr/bin/env sh
for example in $(find . -type f -name "*.py"); do
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might be a good opportunity to start using the proposed .gpy.py extension for guppy source files. This could also come handy if later the example guppy files get more complicated and they have to make use of utility functions in regular python files.

Though it means that the files would end up being example_hugr.gpy.py and example_hugr.gpy.hugr. Not ideal. I'd suggest changing the name of the example file to example_bell.gpy.py, which would generate a corresponding example_bell.gpy.hugr.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good suggestions, have adapted the code to save the test hugrs with just a .hugr extension - see what you think!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm looks like it is unhappy with the .gpy.py extension

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

@vanyae-cqc vanyae-cqc requested a review from ferbetanzo January 20, 2026 16:21
Copy link
Collaborator

@ferbetanzo ferbetanzo left a comment

Choose a reason for hiding this comment

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

Another small comment.


The compiled HUGR is stored (alongside the guppy python program) with a `.hugr` extension.

Run `just recompile` in this directory (or `just recompile-hugrs` on
Copy link
Collaborator

Choose a reason for hiding this comment

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

Another small typo. The just command in the root is called recompile-test-files too. Do you intend to have different names for them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good spot, I think everything now refers to the command recompile-test-files (justfiles and readmes alike)

Copy link
Collaborator

@ferbetanzo ferbetanzo left a comment

Choose a reason for hiding this comment

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

Thx!

@vanyae-cqc vanyae-cqc merged commit 66e57dc into main Jan 22, 2026
7 checks passed
@vanyae-cqc vanyae-cqc deleted the chore/uv-test-fixture-files branch January 22, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants