Skip to content

Organised Subcommand Selection, Extended cfg writing abilities, Added cfg option to disable timestamps. #259

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

Merged
merged 22 commits into from
Aug 12, 2020

Conversation

Aathish04
Copy link
Member

List of Changes

  • Moved cfg subcommand initialisation to a separate function; documented how a subcommand is selected.
  • Added some input validation for cfg write
    • It can now write (and recognise the required datatypes of) all entries in default.cfg
  • Added option in default.cfg to choose whether or not timestamps should be present in the logs.
  • Disabled timestamps when testing log file writing.

Motivation

  • For adding an option to disable timestamps and disabling them when testing log file writing.

    When discussing the efficacy of Implement Logging of Terminal Output to a .log file. #180, @huguesdevimeux recommended that an option should be added which disables logging timestamps along with the other data that is logged, allowing for word-for-word tests.
    This was to increase the accuracy of future tests that may use the log-to-file feature.

  • For adding input validation for cfg write

    As the cfg subcommands all depend on the contents of the cfg files, any changes to them will impact how they work; in particular, adding an entry would mean modifying cfg write and cfg show such that it could write/display such an entry if run.
    This could be done much easier if there was a general way to validate input for cfg write and recognise the datatypes that each entry should be.

  • For moving cfg subcommand initialisation to a separate function and documenting how a subcommand is selected.

    Issue Add Manim Project Creating Subcommand #244 requests the addition of a new subcommand, manim init. Implementing this would presumably be similar to how manim cfg was implemented. To make it clearer and easier as to how exactly a subcommand has to be implemented, the cfg subcommand initialisation has been moved to a separate function, and the subcommand selection process has been documented as docstrings.

Testing Status

Pytest exited with no errors.

Further Comments

@azarzadavila had mentioned that they would like to work on #244 , and I had suggested that they wait until I take a PR implementing some changes to subcommand selection. This is that PR, so once it's merged, they can feel free to start working on #244 :)

Acknowledgement

@Aathish04 Aathish04 requested a review from leotrs August 10, 2020 19:44
@PgBiel PgBiel added the enhancement Additions and improvements in general label Aug 11, 2020
Copy link
Member

@PgBiel PgBiel left a comment

Choose a reason for hiding this comment

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

mostly nitpicks

Aathish04 and others added 4 commits August 11, 2020 09:22
Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
@Aathish04 Aathish04 requested review from eulertour and PgBiel August 11, 2020 04:35
Thank you, @PgBiel !

Co-authored-by: Pg Biel <9021226+PgBiel@users.noreply.github.com>
@Aathish04 Aathish04 requested review from eulertour and PgBiel August 12, 2020 10:27
Copy link
Member

@huguesdevimeux huguesdevimeux left a comment

Choose a reason for hiding this comment

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

SGTM !

@Aathish04 Aathish04 merged commit 7e32cd0 into ManimCommunity:master Aug 12, 2020
@Aathish04 Aathish04 deleted the extend_subcmds branch August 12, 2020 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additions and improvements in general
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants