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

(PDK-625) Formatting of modified status report and addition of full c… #365

Merged
merged 2 commits into from
Dec 1, 2017

Conversation

HelenCampbell
Copy link
Contributor

…onvert report generation

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 92.672% when pulling 99135c2 on HelenCampbell:report into 960c0ca on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 92.672% when pulling e29ca85 on HelenCampbell:report into 960c0ca on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 92.672% when pulling 44e0f35 on HelenCampbell:report into 960c0ca on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 93.148% when pulling 6458f0e on HelenCampbell:report into 960c0ca on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 93.148% when pulling bd95fa7 on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

@bmjen
Copy link
Contributor

bmjen commented Dec 1, 2017

Example of the summary:

[~/proj/sdk/test_modules/puppetlabs-motd]$ pdk convert --noop
-----------------------------------Files added----------------------------------
.gitlab-ci.yml
.pmtignore
.yardopts
spec/default_facts.yml
----------------------------------Files removed---------------------------------
---------------------------------Files modified---------------------------------
metadata.json
.gitignore
.rubocop.yml
.travis.yml
appveyor.yml
Gemfile
Rakefile
spec/spec_helper.rb
--------------------------------------------------------------------------------

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 92.476% when pulling 326713e on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 93.19% when pulling 3bafc0e on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 93.19% when pulling 94d6877 on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

@DavidS
Copy link
Contributor

DavidS commented Dec 1, 2017

  1. the empty "Files removed" section is confusing
  2. looking at the middle part, it's not clear if the dashed line applies to the list below, or above. Adding an empty line before the heading could help:
  3. A summary of the summary at the bottom, to reinforce what was shown.
[~/proj/sdk/test_modules/puppetlabs-motd]$ pdk convert --noop
-----------------------------------Files added----------------------------------
.gitlab-ci.yml
.pmtignore
.yardopts
spec/default_facts.yml

---------------------------------Files modified---------------------------------
metadata.json
.gitignore
.rubocop.yml
.travis.yml
appveyor.yml
Gemfile
Rakefile
spec/spec_helper.rb
--------------------------------------------------------------------------------

4 files added, 8 files modified.

@bmjen
Copy link
Contributor

bmjen commented Dec 1, 2017

Updated output

[~/proj/sdk/test_modules/puppetlabs-motd]$ pdk convert --noop
-----------------------------------Files added----------------------------------
.gitlab-ci.yml
.pmtignore
.yardopts
spec/default_facts.yml
---------------------------------Files modified---------------------------------
metadata.json
.gitignore
.rubocop.yml
.travis.yml
appveyor.yml
Gemfile
Rakefile
spec/spec_helper.rb
--------------------------------------------------------------------------------
4 files added, 8 files modified.
You can find detailed differences in convert_report.txt.
[~/proj/sdk/test_modules/puppetlabs-motd]$ cd ../foo/
[~/proj/sdk/test_modules/foo]$ pdk convert --noop
No changes required.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 93.232% when pulling 084c1ae on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

@bmjen
Copy link
Contributor

bmjen commented Dec 1, 2017

Latest update:

[~/proj/sdk/test_modules/puppetlabs-motd]$ pdk convert --noop

-----------------------------------Files added----------------------------------
.gitlab-ci.yml
.pmtignore
.yardopts
spec/default_facts.yml

---------------------------------Files modified---------------------------------
metadata.json
.gitignore
.rubocop.yml
.travis.yml
appveyor.yml
Gemfile
Rakefile
spec/spec_helper.rb

--------------------------------------------------------------------------------

4 files added, 8 files modified.
You can find detailed differences in convert_report.txt.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 93.232% when pulling 7c41af9 on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

def self.print_summary(update_manager)
summary = {}
update_manager.changes.keys.each do |category|
update_category = update_manager.changes[category]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you simplify this to:

update_manager.changes.each do |category, update_category|
  update_category = update_category.keys if update_category.respond_to?(:keys)

  ...
end

Then I think you could avoid the type checking conditional below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or if you want to avoid redefining updaate_category you could also do something like: update_files = update_category.respond_to?(:keys) ? update_category.keys : update_category

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 93.22% when pulling 3411ad4 on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

Copy link
Contributor

@scotje scotje left a comment

Choose a reason for hiding this comment

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

🥂

@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 93.216% when pulling 7a776df on HelenCampbell:report into 3fb9b91 on puppetlabs:master.

@bmjen bmjen merged commit 9e1c643 into puppetlabs:master Dec 1, 2017
@bmjen bmjen deleted the report branch December 1, 2017 21:27
@bmjen bmjen restored the report branch December 1, 2017 21:27
@rickmonro
Copy link
Contributor

I'm late to the party here so won't request further changes at this point, and fwiw it looks great.

The only contribution I'll make when we get to a review of output consistency is to nudge the titles over to the left to allow for easier scanning.

[~/proj/sdk/test_modules/puppetlabs-motd]$ pdk convert --noop

--- Files added -----------------------------------------------------------------

.gitlab-ci.yml
.pmtignore
.yardopts
spec/default_facts.yml


--- Files modified -----------------------------------------------------------------

metadata.json
.gitignore
.rubocop.yml
.travis.yml
...

@bmjen bmjen added the feature label Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants