docs: clarify workflow YAML locations and custom additions#1
Open
LighTend3r wants to merge 4 commits intofreelabz:mainfrom
Open
docs: clarify workflow YAML locations and custom additions#1LighTend3r wants to merge 4 commits intofreelabz:mainfrom
LighTend3r wants to merge 4 commits intofreelabz:mainfrom
Conversation
Author
|
I had a clarify one upper case option, because if an user add : "L": {
"short": "L",
"is_flag": True,
"default": True,
"help": "Follow redirects",
},The mapping whit "L" options can't process, the probleme is inherant to lib import click
from click.testing import CliRunner
@click.command()
@click.option('--L', help="Option majuscule.")
def cli(**kwargs):
"""Command line function to test uppercase option."""
print(kwargs)
# Test function
def test_cli_with_uppercase_option():
runner = CliRunner()
# Run the CLI command with the --L option
result = runner.invoke(cli, ['--L', 'TestValue'])
# Assertions to validate the behavior
assert result.exit_code == 0, f"Unexpected exit code: {result.exit_code}"
assert "{'l': 'TestValue'}" in result.output, f"Output mismatch: {result.output}"
print("Test passed:", result.output)
# Main block to execute the test
if __name__ == "__main__":
test_cli_with_uppercase_option()So it's important to mention this |
Author
|
I’ve also added a section to clarify how to define custom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I wanted to add my own tools to
secator, but I noticed that the documentation was missing details on two essential points:Availability of external commands: It needed clarification that commands must be available in the
PATHto be executed correctly bysecator. I added an explanation and a command (which) to help users verify command availability.Location of workflow YAML files: The documentation didn’t specify where to find existing workflow YAML files. I included their location in the library (
python3.11/site-packages/...) and added a command to locate them easily. I also explained how and where to add custom workflows (~/.secator/templates/**).PS
In my opinion, the default workflows should ideally be placed in
~/.secator/templatesinstead of remaining in the installed library files. This would make it much easier for users to modify or remove them, as managing them directly within the library is not very practical.Thank you so much for your work! Adding tools to
secatoris incredibly cool and straightforward thanks to your approach. 😊