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

Specify user config file via cli or environment variable #565

Merged
merged 23 commits into from
Nov 10, 2015

Conversation

hackebrot
Copy link
Member

Retrieve the user config file from a custom location via:

$ cookiecutter --config /home/audreyr/my-custom-config.yaml cookiecutter-pypackage

or

$ export COOKIECUTTER_CONFIG=/home/audreyr/my-custom-config.yaml

--config takes precedence over COOKIECUTTER_CONFIG over ~/.cookiecutterrc.

Close #424, close #258 cc @jhermann @pfmoore

@hackebrot hackebrot added enhancement This issue/PR relates to a feature request. needs-review PR Only: This PR require review from other developer labels Oct 24, 2015
@codecov-io
Copy link

Current coverage is 98.44%

Merging #565 into master will increase coverage by +0.04% as of 72fa578

@@            master    #565   diff @@
======================================
  Files           12      12       
  Stmts          501     513    +12
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            493     505    +12
  Partial          0       0       
  Missed           8       8       

Review entire Coverage Diff as of 72fa578


Uncovered Suggestions

  1. +0.78% via ...iecutter/generate.py#233...236
  2. +0.39% via ...okiecutter/config.py#19...20
  3. +0.39% via ...ookiecutter/utils.py#27...28

Powered by Codecov. Updated on successful CI builds.

@hackebrot
Copy link
Member Author

Review pls 🙇

@hackebrot hackebrot force-pushed the specify-user-config-file branch from 02fec56 to 21c0f67 Compare November 5, 2015 17:15
@hackebrot
Copy link
Member Author

Rebased 😤

@pydanny
Copy link
Member

pydanny commented Nov 5, 2015

@hackebrot
Copy link
Member Author

Can you trigger a rebuild, please? Errors seem to be git related. Thanks 🙇

@hackebrot
Copy link
Member Author

Nvm, removed an obsolete TODO 😹

@hackebrot
Copy link
Member Author

Take that, appveyor! 👊

@luzfcb
Copy link
Contributor

luzfcb commented Nov 5, 2015

Take that, appveyor! 👊

I laughed 😸

@pydanny
Copy link
Member

pydanny commented Nov 5, 2015

Ha ha ha. Me too! 🌜

@hackebrot
Copy link
Member Author

Hrhr :trollface:

@hackebrot
Copy link
Member Author

TODO

  • support forced default config
  • do not break backwards compatibility in cli and main
  • fix test failures

@hackebrot
Copy link
Member Author

Added support for ignoring a user config altogether via --default-config or passing None to main.cookiecutter. Please see https://github.com/audreyr/cookiecutter/pull/565/files#diff-abec5659ca71b4547a2f66a5023bbc4fR69

I feel this PR drastically improves the ability to write isolated tests. 🚀

Please let me know your thoughts. 🙇

pydanny added a commit that referenced this pull request Nov 10, 2015
Specify user config file via cli or environment variable
@pydanny pydanny merged commit 9cf50af into cookiecutter:master Nov 10, 2015
@hackebrot hackebrot deleted the specify-user-config-file branch November 10, 2015 16:37
hackebrot added a commit that referenced this pull request Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request. needs-review PR Only: This PR require review from other developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants