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

Tool name and command standardization #10

Merged

Conversation

clebergnu
Copy link
Contributor

We've been using the tool name and the actual command in different ways among the different check scripts. This standardizes them to use the same style, and the same behavior.

While it would make sense to call the tools by their names because that would be applicable to any tool (be it Python based on or) there are situations on too many platforms where, given the installation of the tool using PIP, the scripts are not readily available on the PATH.

Even worse, is that different versions may be picked up from outside a virtual environment, like from system packages. This change standardizes on using the Python module entrypoint for the tools written Python, which will get the right tool if inside a virtual environment becase "python3" will be already set to the active one. A similar change was done for "selftests/style.sh" on Avocado itself.

This standardizes the following:

  • TOOL_NAME is the descriptive name that is given to humans
  • TOOL_CMD is the actual command that will be called

Reference: avocado-framework/avocado@77ca585

@clebergnu clebergnu self-assigned this Sep 11, 2024
We've been using the tool name and the actual command in different
ways among the different check scripts.  This standardizes them to use
the same style, and the same behavior.

While it would make sense to call the tools by their names because
that would be applicable to any tool (be it Python based on or) there
are situations on too many platforms where, given the installation of
the tool using PIP, the scripts are not readily available on the PATH.

Even worse, is that different versions may be picked up from outside a
virtual environment, like from system packages.  This change
standardizes on using the Python module entrypoint for the tools
written Python, which will get the right tool if inside a virtual
environment becase "python3" will be already set to the active one.
A similar change was done for "selftests/style.sh" on Avocado itself.

This standardizes the following:

 * TOOL_NAME is the descriptive name that is given to humans
 * TOOL_CMD is the actual command that will be called

Reference: avocado-framework/avocado@77ca585
Signed-off-by: Cleber Rosa <[email protected]>
@clebergnu clebergnu force-pushed the python_tools_use_module_entrypoint branch from 1b1753e to e245ca8 Compare September 11, 2024 14:24
Copy link
Contributor

@richtja richtja left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@richtja richtja merged commit 2f53ec2 into avocado-framework:main Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 108
Development

Successfully merging this pull request may close these issues.

2 participants