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

Move console report #103

Closed
wants to merge 1 commit into from
Closed

Move console report #103

wants to merge 1 commit into from

Conversation

JuanVqz
Copy link
Member

@JuanVqz JuanVqz commented Feb 7, 2023

Related #50

  • Add an entry to CHANGELOG.md that links to this PR under the "main (unreleased)" heading.

Description:

I'm looking forward implementing the HTML report but as first step we need to move the console report away of the status reporter class.

If changes to the behavior are made, clearly describe what changes.

I will abide by the code of conduct.

@JuanVqz JuanVqz self-assigned this Feb 7, 2023
@JuanVqz JuanVqz marked this pull request as ready for review February 7, 2023 03:56
@JuanVqz JuanVqz requested a review from a team as a code owner February 7, 2023 03:56
@JuanVqz JuanVqz requested review from ashwinisukale and mateusdeap and removed request for a team February 7, 2023 03:56
@JuanVqz JuanVqz mentioned this pull request Feb 8, 2023
1 task
@JuanVqz JuanVqz marked this pull request as draft February 9, 2023 00:39
@JuanVqz JuanVqz changed the base branch from main to add-ruby-3-2-support February 10, 2023 01:35
@JuanVqz JuanVqz changed the base branch from add-ruby-3-2-support to update-skunk-workflow February 10, 2023 01:37
@codecov
Copy link

codecov bot commented Feb 11, 2023

Codecov Report

Merging #103 (730c868) into main (84e04ce) will decrease coverage by 4.30%.
The diff coverage is 97.61%.

❗ Current head 730c868 differs from pull request most recent head ca0b319. Consider uploading reports for the commit ca0b319 to get more accurate results

@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   98.41%   94.11%   -4.30%     
==========================================
  Files          17       18       +1     
  Lines         315      323       +8     
==========================================
- Hits          310      304       -6     
- Misses          5       19      +14     
Impacted Files Coverage Δ
lib/skunk/cli/generators/console_report.rb 97.43% <97.43%> (ø)
lib/skunk/cli/commands/status_reporter.rb 100.00% <100.00%> (+2.50%) ⬆️
lib/skunk/cli/commands/status_sharer.rb 68.18% <100.00%> (-29.50%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Base automatically changed from update-skunk-workflow to main February 14, 2023 13:37
Copy link
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@JuanVqz I like the idea behind this PR, what's the status? Is it ready to be reviewed?

Please let me know. Thanks!

As first step we need to move the console report away of the status
reporter class.

Related #50
Copy link
Member

@etagwerker etagwerker left a comment

Choose a reason for hiding this comment

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

@JuanVqz The changes in this PR break the test suite.

Here are the two failures I see with Ruby 3.2.1:

Fabulous run in 1.387182s, 19.4639 runs/s, 23.7892 assertions/s.

  1) Failure:
Skunk::Cli::Application::#execute::when passing --out option with a file#test_0001_writes output to the file [/Users/etagwerker/Projects/fastruby/skunk/test/lib/skunk/application_test.rb:55]:
--- expected
+++ actual
@@ -1,13 +1 @@
-"+---------------------------------------+----------------+------------------+--------------+--------------+--------------+
-| file                                  | skunk_score    | churn_times_cost | churn        | cost         | coverage     |
-+---------------------------------------+----------------+------------------+--------------+--------------+--------------+
-| samples/rubycritic/analysed_module.rb | 0.59           | 0.59             | 1            | 0.59         | 100.0        |
-+---------------------------------------+----------------+------------------+--------------+--------------+--------------+
-
-SkunkScore Total: 0.59
-Modules Analysed: 1
-SkunkScore Average: 0.59
-Worst SkunkScore: 0.59 (samples/rubycritic/analysed_module.rb)
-
-Generated with Skunk v0.5.2
-"
+""



  2) Error:
Skunk::Cli::Application::#execute::when passing an environment variable SHARE=true#test_0001_share report to default server:
NameError: undefined local variable or method `sorted_modules' for #<Skunk::Command::StatusSharer:0x0000000111aba538 @options={:mode=>nil, :root=>nil, :formats=>[], :deduplicate_symlinks=>nil, :paths=>["samples/rubycritic"], :suppress_ratings=>nil, :minimum_score=>nil, :no_browser=>nil, :base_branch=>nil, :feature_branch=>nil, :threshold_score=>nil, :formatters=>nil, :help_text=>"Usage: skunk [options] [paths]\n    -b, --branch BRANCH              Set branch to compare\n    -o, --out FILE                   Output report to file\n    -v, --version                    Show gem's version\n    -h, --help                       Show this message\n", :churn_after=>nil, :output_filename=>"tmp/shared_report.txt"}, @status=0, @analysed_modules=#<RubyCritic::AnalysedModulesCollection:0x0000000111c1e820 @modules=[#<RubyCritic::AnalysedModule:0x00000001119976d8 @pathname=#<Pathname:samples/rubycritic/analysed_module.rb>, @coverage=0.0, @name="RubyCritic::AnalysedModule", @smells_count=nil, @file_location=nil, @file_name=nil, @line_count=nil, @smells=[], @churn=5, @committed_at="2021-02-19 15:48:53 -0500", @complexity=14.72, @duplication=0, @methods_count=1, @path="samples/rubycritic/analysed_module.rb", @cost=0.5888, @churn_times_cost=0.59>]>>
    /Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:61:in `json_results'
    /Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:71:in `payload'
    /Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:82:in `post_payload'
    /Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/status_sharer.rb:24:in `share'
    /Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/commands/shareable.rb:16:in `share'
    /Users/etagwerker/Projects/fastruby/skunk/lib/skunk/cli/application.rb:34:in `execute'
    /Users/etagwerker/Projects/fastruby/skunk/test/lib/skunk/application_test.rb:92:in `block (7 levels) in <top (required)>'

27 runs, 33 assertions, 1 failures, 1 errors, 0 skips
rake aborted!
Command failed with status (1)
/Users/etagwerker/Projects/fastruby/skunk/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/Users/etagwerker/.rbenv/versions/3.2.1/bin/bundle:25:in `load'
/Users/etagwerker/.rbenv/versions/3.2.1/bin/bundle:25:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)

@JuanVqz JuanVqz mentioned this pull request Jul 22, 2023
3 tasks
JuanVqz added a commit that referenced this pull request Jul 31, 2023
@JuanVqz JuanVqz mentioned this pull request Jul 31, 2023
1 task
@JuanVqz
Copy link
Member Author

JuanVqz commented Jul 31, 2023

Closed in favor of #114

@JuanVqz JuanVqz closed this Jul 31, 2023
@JuanVqz JuanVqz deleted the move-console-report branch July 31, 2023 07:22
JuanVqz added a commit that referenced this pull request Jul 31, 2023
Sign up for free to 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.

None yet

2 participants