Skip to content
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

Issue #17631: Make it possible to use custom invfile.lua if needed #17693

Merged

Conversation

martin-g
Copy link
Contributor

mulled-build.py uses invfile.lua that comes pre-packaged with galaxy-tool-util.
It would be nice if the user could specify a custom invfile.lua when (s)he needs to use a modified recipe for the image creation

How to test the changes?

Export INVFILE_DIRNAME env var that points to a folder with invfile.lua in it and try to use mulled-build too. It should use the custom invfile.lua instead of the one coming with galaxy-tool-util

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

… if needed

mulled-build.py uses invfile.lua that comes pre-packaged with
galaxy-tool-util.
It would be nice if the user could specify a custom invfile.lua when
(s)he needs to use a modified recipe for the image creation

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@@ -57,7 +57,7 @@

log = logging.getLogger(__name__)

DIRNAME = os.path.dirname(__file__)
DIRNAME = os.environ.get("INVFILE_DIRNAME", os.path.dirname(__file__))
Copy link
Member

@mvdbeek mvdbeek Mar 13, 2024

Choose a reason for hiding this comment

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

This seems fine, but maybe we can be more direct here ?

Suggested change
DIRNAME = os.environ.get("INVFILE_DIRNAME", os.path.dirname(__file__))
INVFILE = os.environ.get("INVFILE", os.path.join(os.path.dirname(__file__), "invfile.lua"))

and then change line 269 to use that variable directly ?

It might also be nice to add this to the argparse parse in add_build_arguments and pass that on to mull_targets ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've applied your suggestion!

But I'm afraid I don't follow you about add_build_arguments and mull_targets

Copy link
Member

Choose a reason for hiding this comment

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

I've pushed a commit adding --involucro-lua-file, which defaults to INVFILE. That way users see it as a possible option when running mulled-build --help

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome! Thanks!

@mvdbeek mvdbeek merged commit 9a4a5bc into galaxyproject:dev Mar 13, 2024
49 of 52 checks passed
@galaxyproject galaxyproject deleted a comment from github-actions bot Mar 13, 2024
@mvdbeek
Copy link
Member

mvdbeek commented Mar 13, 2024

Thanks for adding this!

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