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

The --tldr flag does not give example commands in the format of a standard tldr tool #39

Closed
gkapfham opened this issue Oct 24, 2024 · 4 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@gkapfham
Copy link
Collaborator

Hello @hemanialaparthi, thanks for implementing the --tldr feature. While I recognize that it has already been merged, I have some feedback concerning it before we attempt a release to PyPI:

  • Instead of implementing the code like this:
def display_tldr(console: Console) -> None:
    """Display a list of example commands and their descriptions."""
    console.print(
        "[bold yellow]Too Lazy; Didn't Read: Example Commands[/bold yellow]\n"
    )
    console.print(
        "[bold red]Please ensure you are in the directory with the pyproject.toml file to run these commands.[/bold red]\n"
    )

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests>[/bold cyan]"
    )
    console.print(
        "    Run executable exam for a project with the specified test files."
    )

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests> --mark <mark>[/bold cyan]"
    )
    console.print("    Run the tests with the specified mark(s).")

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests> --maxfail[/bold cyan]"
    )
    console.print("    Limit the number of test failures before stopping.")

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests> --report <report_type>/<all>[/bold cyan]"
    )
    console.print(
        "    Generate the specified type(s) of reports after the exam. Use 'all' to generate all available report types."
    )

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests> --advice-model <model> --advice-method <method>[/bold cyan]"
    )
    console.print(
        "    Use specified LLM model and method for providing advice on test failures."
    )

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests> <--debug>/<--no-debug>[/bold cyan]"
    )
    console.print("    Display or disable debugging information.")

    console.print(
        "[bold cyan]poetry run execexam <path-to-project> <path-to-tests> <--fancy>/<--no-fancy>[/bold cyan]"
    )
    console.print("    Display or disable fancy output formatting.")

    console.print(
        "\n[bold yellow]help:[/bold yellow] Use [bold yellow]--help[/bold yellow] to see more options."
    )

I think that there should be a dictionary that contains a key for a command and then a value for the actual example of that command. I think that this will make the code more maintainable.

  • The output of --tldr assumes the use of Poetry. But, I think that is an "implementation detail" since many people will probably use execexam without using Poetry. I suggest that prefix be removed. What do you think?

  • Here is an example of a tool that prints TLDR like information: https://github.com/tldr-pages/tldr. Please note that this tool never uses bracketed text like <path-to-project>. It always uses realistic examples, which I think that execexam should do as well. What do you think?

  • Finally, we need to add your name as a contributor in the pyproject.toml file otherwise you will not be recognized for your contributions to the project, which I think is appropriate to do.

@gkapfham gkapfham added bug Something isn't working enhancement New feature or request labels Oct 24, 2024
@gkapfham gkapfham self-assigned this Oct 24, 2024
@gkapfham
Copy link
Collaborator Author

Hi @hemanialaparthi, once you have resolved these issues to enhance the way in which ExecExam displays the TLDR information, please connect this issue to the appropriate PR. I would like to make sure that the revisions to this TLDR feature are part of the 0.3.0 release of ExecExam that should be made automatically to PyPI using the functionality we've already merged. Thanks!

@gkapfham
Copy link
Collaborator Author

Hello @hemanialaparthi do you have a finalized version of a PR that can resolve this issue? If possible, I think that we might prefer to merge this PR first so that it would allow us to automatically make a 0.3.0 release to PyPI with a complete, working version of the --tdlr flag. We have a partially completed version of this feature, but it would be great if we can finalize it and then have it released to PyPI using the system that @PCain02 created.

@boulais01
Copy link
Collaborator

@hemanialaparthi just wanted to confirm that this has been fixed by merging PR #47. If so, please close this issue.

@gkapfham
Copy link
Collaborator Author

Done, this issue is resolved by the merge of the previously referenced PR, thanks @hemanialaparthi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants