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

Show the value that will be used if not customized #177

Merged
merged 6 commits into from
Dec 26, 2023

Conversation

rapus95
Copy link
Contributor

@rapus95 rapus95 commented May 28, 2020

No description provided.

@christopher-dG
Copy link
Member

I think I like this idea, because seeing the default value definitely gives a nice hint as to what the option actually does before you commit to customizing it.

I wonder if with this change we could change the input parsing to turn empty strings into nothing, instead of the default value. I think less people would "accidentally" choose to customize a value and then enter an empty string to get the default if they knew what the default value was right away.

Could you also make the same change in interactive(T::Type)?

src/template.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 28, 2020

Codecov Report

Merging #177 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   89.54%   89.58%   +0.04%     
==========================================
  Files          18       18              
  Lines         507      509       +2     
==========================================
+ Hits          454      456       +2     
  Misses         53       53              
Impacted Files Coverage Δ
src/template.jl 95.28% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 087dcc8...2269d72. Read the comment docs.

@christopher-dG
Copy link
Member

I extended this PR a bit and came up with this:

julia> Template(; interactive=true)
Template keywords to customize:
[press: d=done, a=all, n=none]
   [ ] user ("christopher-dG")
   [ ] authors ("Chris de Graaf <[email protected]> and contributors")
   [X] dir ("~/.local/share/julia/dev")
   [ ] host ("github.com")
   [ ] julia (v"1.0.0")
 > [X] plugins (PkgTemplates.Plugin[])
Enter value for 'dir' (String): ~/code
Select plugins:
[press: d=done, a=all, n=none]
   [ ] CompatHelper
   [ ] ProjectFile
   [ ] SrcDir
   [ ] Git
   [ ] License
   [ ] Readme
   [ ] Tests
   [X] TagBot
   [ ] AppVeyor
   [ ] CirrusCI
   [ ] Citation
 > [X] Codecov
   [ ] Coveralls
   [ ] Develop
   [ ] Documenter
   [ ] DroneCI
   [ ] GitHubActions
   [ ] GitLabCI
   [X] TravisCI
TagBot keywords to customize:
[press: d=done, a=all, n=none]
 > [ ] branches (nothing)
   [ ] changelog (nothing)
   [ ] changelog_ignore (nothing)
   [ ] cron ("0 0 * * *")
   [ ] destination ("TagBot.yml")
   [ ] dispatch (nothing)
   [ ] dispatch_delay (nothing)
   [ ] file ("~/code/PkgTemplates/templates/github/workflows/TagBot.yml")
   [ ] gpg (nothing)
   [ ] gpg_password (nothing)
   [ ] registry (nothing)
   [ ] ssh (nothing)
   [ ] ssh_password (nothing)
   [ ] token (Secret("GITHUB_TOKEN"))
Codecov keywords to customize:
[press: d=done, a=all, n=none]
 > [ ] file (nothing)
   [ ] None (No customization)
TravisCI keywords to customize:
[press: d=done, a=all, n=none]
 > [ ] arm64 (false)
   [ ] coverage (true)
   [ ] extra_versions (["1.0", "1.4", "nightly"])
   [ ] file ("~/code/PkgTemplates/templates/travis.yml")
   [ ] linux (true)
   [ ] osx (true)
   [ ] windows (true)
   [ ] x64 (true)
   [ ] x86 (false)

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (564c452) 92.95% compared to head (9152cba) 93.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   92.95%   93.80%   +0.84%     
==========================================
  Files          24       24              
  Lines         738      742       +4     
==========================================
+ Hits          686      696      +10     
+ Misses         52       46       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle gdalle requested a review from oxinabox December 19, 2023 09:49
@gdalle
Copy link
Collaborator

gdalle commented Dec 19, 2023

@oxinabox asking for a review because this might seem slightly overwhelming for beginning users (it adds a lot of info to the interactive menus), but at the same time I think the addition is welcome.

Copy link
Collaborator

@oxinabox oxinabox left a comment

Choose a reason for hiding this comment

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

I think this is a net improvement

@gdalle gdalle merged commit 46997ed into JuliaCI:master Dec 26, 2023
13 checks passed
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.

4 participants