chore: move to justfile for test hugr generation#308
Conversation
ferbetanzo
left a comment
There was a problem hiding this comment.
Love the idea of using just! I just have a couple of comments.
tests/data/README.md
Outdated
|
|
||
| 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 |
There was a problem hiding this comment.
Small typo, the justfile command in the root is recompile-test-files.
tests/data/justfile
Outdated
| # Re-generate all hugr files. | ||
| recompile-hugrs: | ||
| #!/usr/bin/env sh | ||
| for example in $(find . -type f -name "*.py"); do |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Good suggestions, have adapted the code to save the test hugrs with just a .hugr extension - see what you think!
There was a problem hiding this comment.
Hmm looks like it is unhappy with the .gpy.py extension
ferbetanzo
left a comment
There was a problem hiding this comment.
Another small comment.
tests/data/README.md
Outdated
|
|
||
| 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 |
There was a problem hiding this comment.
Another small typo. The just command in the root is called recompile-test-files too. Do you intend to have different names for them?
There was a problem hiding this comment.
Good spot, I think everything now refers to the command recompile-test-files (justfiles and readmes alike)
An experiment in using a justfile for the generation of compiled test files.