Skip to content

refactor(utils): add progress visualisation logic - #139

Merged
BioPhoton merged 67 commits into
mainfrom
add-progress-bar
Oct 30, 2023
Merged

refactor(utils): add progress visualisation logic#139
BioPhoton merged 67 commits into
mainfrom
add-progress-bar

Conversation

@BioPhoton

@BioPhotonBioPhoton commented Oct 23, 2023

Copy link
Copy Markdown
Collaborator

This PR includes:

⚠️ Note:
Next to the listed changes quite some adoptions went into test flakeyness

  • adding a new third party package for the progress bar visualisation multi-progress-bar
  • a new helper in helper called getProgressBar
  • updates to the executePlugins function in core
  • styling helper to abstract color's and style into states
  • condition to show progress-bar depending on CLI arg

As the tests where really flakey I reused more of the same config files and added timestamps to the plugin outputs. This did dot fully sole the issue.

Example string:
Run Plugins: ████████████████████████████ 70% | Executing: Async Plugin 7
Run Plugins: ███████████████████████████████████████▉ 100% | Done running plugins

You can demo the progress bar by running:
nx execute cli collect --config=./packages/cli/test/plugin-progress-bar.config.mock.ts

cli-progress-bar.mov

closes#116

@BioPhotonBioPhoton self-assigned this Oct 25, 2023
@BioPhotonBioPhoton added this to the 1. Internal MVP milestone Oct 25, 2023
@BioPhotonBioPhoton mentioned this pull request Oct 28, 2023
2 tasks
Comment threadpackages/cli/src/lib/implementation/config-middleware.spec.ts Outdated
Comment threadpackages/core/src/lib/implementation/execute-plugin.ts Outdated
Comment threadpackages/core/src/lib/implementation/execute-plugin.ts Outdated
Comment threadpackages/core/test/plugin-progress-bar.config.mock.ts Outdated
Comment threadpackages/models/README.md Outdated
Comment threadpackages/models/test/fixtures/report.mock.ts
Comment threadpackages/models/test/fixtures/runner.mock.ts
BioPhotonand others added 3 commits October 29, 2023 11:00
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@BioPhotonBioPhoton mentioned this pull request Oct 29, 2023
Comment threadpackages/core/test/plugin-progress-bar.config.mock.ts
Comment threadpackages/core/test/plugin-progress-bar.config.mock.ts Outdated
Comment threadpackages/core/test/plugin-progress-bar.config.mock.ts
Comment threadpackages/models/test/fixtures/report.mock.ts
Comment threadtmp/.gitkeep
@BioPhotonBioPhoton mentioned this pull request Oct 29, 2023
BioPhotonand others added 2 commits October 29, 2023 18:12
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@BioPhoton

Copy link
Copy Markdown
CollaboratorAuthor

#139 (comment) will get fixed in #180

@TlacenkaTlacenka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From what folder should I run the progress bar to get the example you mentioned working? When I run it from the root folder, I get the wrong score.
image

@BioPhoton
BioPhoton merged commit 7d11d81 into mainOct 30, 2023
@BioPhoton
BioPhoton deleted the add-progress-bar branch October 30, 2023 10:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add progress logging to CLI

4 participants

@BioPhoton@Tlacenka@IKatsuba@matejchalk