[Python-modules-commits] [cookiecutter] 01/08: Import cookiecutter_1.5.0.orig.tar.gz
Vincent Bernat
bernat at moszumanska.debian.org
Sun Dec 25 20:18:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
bernat pushed a commit to branch master
in repository cookiecutter.
commit 119be0b58de22342b1850173629a4db9cfc7d1d6
Author: Vincent Bernat <bernat at debian.org>
Date: Sun Dec 25 20:43:50 2016 +0100
Import cookiecutter_1.5.0.orig.tar.gz
---
.github/ISSUE_TEMPLATE.md | 15 +
.gitmodules | 3 +
.travis.yml | 28 +-
AUTHORS.rst | 42 +
CONTRIBUTING.rst | 914 +++++++++++----------
HISTORY.rst | 251 +++++-
Makefile | 17 +-
README.rst | 485 +++++++----
__main__.py | 7 +
appveyor.yml | 7 +
case_studies.rst | 42 +
cookiecutter/__init__.py | 3 +-
cookiecutter/__main__.py | 9 +
cookiecutter/cli.py | 80 +-
cookiecutter/config.py | 30 +-
cookiecutter/environment.py | 31 +-
cookiecutter/exceptions.py | 5 +-
cookiecutter/extensions.py | 19 +
cookiecutter/find.py | 20 +-
cookiecutter/generate.py | 113 ++-
cookiecutter/hooks.py | 110 ++-
cookiecutter/log.py | 47 ++
cookiecutter/main.py | 91 +-
cookiecutter/prompt.py | 103 ++-
cookiecutter/repository.py | 103 +++
cookiecutter/utils.py | 6 +-
cookiecutter/vcs.py | 80 +-
docs/advanced/calling_from_python.rst | 18 +
docs/advanced/choice_variables.rst | 81 ++
docs/advanced/cli_options.rst | 6 +
docs/advanced/copy_without_render.rst | 17 +
docs/advanced/dict_variables.rst | 65 ++
docs/advanced/hooks.rst | 61 ++
docs/advanced/index.rst | 22 +
docs/advanced/injecting_content.rst | 30 +
docs/advanced/replay.rst | 42 +
docs/advanced/suppressing_prompts.rst | 33 +
docs/advanced/template_extensions.rst | 32 +
docs/advanced/templates_in_context.rst | 37 +
docs/advanced/user_config.rst | 53 ++
docs/advanced_usage.rst | 406 ---------
docs/case_studies.rst | 1 +
docs/conf.py | 6 +-
docs/cookiecutter.rst | 8 +
docs/first_steps.rst | 1 +
docs/index.rst | 9 +-
docs/installation.rst | 36 +-
docs/overview.rst | 14 +-
docs/sprint-contributors.rst | 66 ++
docs/troubleshooting.rst | 2 +-
docs/tutorial1.rst | 25 +-
docs/tutorial2.rst | 6 +-
docs/tutorials.rst | 10 +-
docs/usage.rst | 5 +-
setup.cfg | 2 +-
setup.py | 16 +-
tests/conftest.py | 57 +-
tests/fake-repo-dict/cookiecutter.json | 20 +
.../{{cookiecutter.project_slug}}/README.md | 20 +
.../{{cookiecutter.repo_name}}/README.rst | 2 +
tests/fake-repo/cookiecutter.json | 0
tests/files/{{cookiecutter.jsonify_file}}.txt | 1 +
tests/replay/conftest.py | 1 +
tests/repository/test_abbreviation_expansion.py | 54 ++
.../test_determine_repo_dir_clones_repo.py | 72 ++
...termine_repo_dir_finds_existing_cookiecutter.py | 36 +
...t_determine_repository_should_use_local_repo.py | 70 ++
.../test_is_repo_url.py} | 8 +-
.../test_repository_has_cookiecutter_json.py | 20 +
tests/skipif_markers.py | 35 -
.../custom-extension-post/cookiecutter.json | 5 +
.../hooks/post_gen_project.py | 4 +
.../{{cookiecutter.project_slug}}/README.rst | 1 +
.../custom-extension-pre/cookiecutter.json | 5 +
.../custom-extension-pre/hooks/pre_gen_project.py | 4 +
.../{{cookiecutter.project_slug}}/README.rst | 1 +
tests/test-extensions/hello_extension/__init__.py | 1 +
.../hello_extension/hello_extension.py | 20 +
tests/test-pyhooks/hooks/post_gen_project.py | 0
tests/test-pyhooks/hooks/pre_gen_project.py | 0
tests/test-pyshellhooks/hooks/post_gen_project.py | 0
tests/test-pyshellhooks/hooks/pre_gen_project.py | 0
.../test-shellhooks-empty/hooks/pre_gen_project.sh | 0
.../input{{cookiecutter.shellhooks}}/README.rst | 1 +
tests/test_abbreviation_expansion.py | 68 --
tests/test_cli.py | 240 ++++--
tests/test_cookiecutter_local_no_input.py | 50 +-
tests/test_cookiecutter_local_with_input.py | 1 -
tests/test_cookiecutter_repo_arg.py | 71 --
tests/test_cookiecutters.py | 73 --
tests/test_custom_extensions_in_hooks.py | 51 ++
tests/test_find.py | 1 -
tests/test_generate_context.py | 1 -
tests/test_generate_copy_without_render.py | 1 -
tests/test_generate_file.py | 20 +-
tests/test_generate_files.py | 1 -
tests/test_generate_hooks.py | 43 +-
tests/test_get_config.py | 21 +-
tests/test_get_user_config.py | 47 +-
tests/test_hooks.py | 75 +-
tests/test_identify_repo.py | 39 -
tests/test_is_vcs_installed.py | 17 -
tests/test_log.py | 133 +++
tests/test_main.py | 106 +--
tests/test_more_cookiecutters.py | 72 --
tests/test_output_folder.py | 1 -
tests/test_prompt.py | 172 +++-
tests/test_read_user_dict.py | 129 +++
tests/test_read_user_variable.py | 0
tests/test_specify_output_dir.py | 4 +-
tests/test_utils.py | 1 -
tests/test_vcs.py | 145 ----
tests/test_vcs_prompt.py | 88 --
tests/vcs/test_clone.py | 219 +++++
tests/vcs/test_identify_repo.py | 59 ++
tests/vcs/test_is_vcs_installed.py | 19 +
tests/vcs/test_prompt_and_delete_repo.py | 56 ++
tox.ini | 6 +-
118 files changed, 4093 insertions(+), 2146 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..a3254bb
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,15 @@
+* Cookiecutter version:
+* Template project url:
+* Python version:
+* Operating System:
+
+### Description:
+
+// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?
+
+### What I've run:
+
+```
+// REPLACE ME: Paste a log of command(s) you ran and cookiecutter's output, tracebacks, etc, here
+```
+
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..e0372d2
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "docs/HelloCookieCutter1"]
+ path = docs/HelloCookieCutter1
+ url = https://github.com/BruceEckel/HelloCookieCutter1
diff --git a/.travis.yml b/.travis.yml
index 7c31e24..ceff4f5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,22 +2,32 @@
sudo: false
language: python
-python: 3.5
-env:
- - TOX_ENV=py27
- - TOX_ENV=py33
- - TOX_ENV=py34
- - TOX_ENV=py35
- - TOX_ENV=pypy
- - TOX_ENV=flake8
+
+matrix:
+ include:
+ - python: 2.7
+ env: TOX_ENV=py27
+ - python: 3.3
+ env: TOX_ENV=py33
+ - python: 3.4
+ env: TOX_ENV=py34
+ - python: 3.5
+ env: TOX_ENV=py35
+ - python: 3.6-dev
+ env: TOX_ENV=py36
+ - python: pypy
+ env: TOX_ENV=pypy
+ - python: 3.5
+ env: TOX_ENV=flake8
script: tox -e $TOX_ENV
install:
- pip install tox
+
after_success:
# Report coverage results to codecov.io
# and export tox environment variables
- pip install codecov
- - codecov -e TOX_ENV
+ - codecov -e TOX_ENV TRAVIS_OS_NAME
diff --git a/AUTHORS.rst b/AUTHORS.rst
index 1cd4893..4fe8c86 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -84,6 +84,27 @@ Contributors
* Cédric Krier (`@cedk`_)
* Tim Osborn (`@ptim`_)
* Aaron Gallagher (`@habnabit`_)
+* Fábio C. Barrionuevo da Luz (`@luzfcb`_)
+* mozillazg (`@mozillazg`_)
+* Joachim Jablon (`@ewjoachim`_)
+* Andrew Ittner (`@tephyr`_)
+* Diane DeMers Chen (`@purplediane`_)
+* zzzirk (`@zzzirk`_)
+* Carol Willing (`@willingc`_)
+* phoebebauer (`@phoebebauer`_)
+* Adam Chainz (`@adamchainz`_)
+* Sulé (`@suledev`_)
+* Evan Palmer (`@palmerev`_)
+* Bruce Eckel (`@BruceEckel`_)
+* Robert Lyon (`@ivanlyon`_)
+* Terry Bates (`@terryjbates`_)
+* Brett Cannon (`@brettcannon`_)
+* Michael Warkentin (`@mwarkentin`_)
+* Bartłomiej Kurzeja (`@B3QL`_)
+* Thomas O'Donnell (`@andytom`_)
+* Jeremy Carbaugh (`@jcarbaugh`_)
+* Nathan Cheung (`@cheungnj`_)
+* Abdó Roig-Maranges (`@aroig`_)
.. _`@cedk`: https://github.com/cedk
.. _`@johtso`: https://github.com/johtso
@@ -156,3 +177,24 @@ Contributors
.. _`@wdm0006`: https://github.com/wdm0006
.. _`@ptim`: https://github.com/ptim
.. _`@habnabit`: https://github.com/habnabit
+.. _`@luzfcb`: https://github.com/luzfcb
+.. _`@mozillazg`: https://github.com/mozillazg
+.. _`@ewjoachim`: https://github.com/ewjoachim
+.. _`@tephyr`: https://github.com/tephyr
+.. _`@purplediane`: https://github.com/purplediane
+.. _`@willingc`: https://github.com/willingc
+.. _`@phoebebauer`: https://github.com/phoebebauer
+.. _`@adamchainz`: https://github.com/adamchainz
+.. _`@suledev`: https://github.com/suledev
+.. _`@palmerev`: https://github.com/palmerev
+.. _`@BruceEckel`: https://github.com/BruceEckel
+.. _`@ivanlyon`: https://github.com/ivanlyon
+.. _`@terryjbates`: https://github.com/terryjbates
+.. _`@zzzirk`: https://github.com/zzzirk
+.. _`@brettcannon`: https://github.com/brettcannon
+.. _`@mwarkentin`: https://github.com/mwarkentin
+.. _`@B3QL`: https://github.com/B3QL
+.. _`@andytom`: https://github.com/andytom
+.. _`@jcarbaugh`: https://github.com/jcarbaugh
+.. _`@cheungnj`: https://github.com/cheungnj
+.. _`@aroig`: https://github.com/aroig
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index cf36c48..77362b1 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1,453 +1,461 @@
-============
-Contributing
-============
-
-Contributions are welcome, and they are greatly appreciated! Every
-little bit helps, and credit will always be given.
-
-.. toctree::
- :numbered:
- :maxdepth: 2
-
- types_of_contributions
- contributor_setup
- contributor_guidelines
- contributor_testing
- core_committer_guide
-
-Types of Contributions
-----------------------
-
-You can contribute in many ways:
-
-Create Cookiecutter Templates
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Some other Cookiecutter templates to list in the :ref:`README <readme>` would
-be great.
-
-If you create a Cookiecutter template, submit a pull request adding it to
-README.rst.
-
-Report Bugs
-~~~~~~~~~~~
-
-Report bugs at https://github.com/audreyr/cookiecutter/issues.
-
-If you are reporting a bug, please include:
-
-* Your operating system name and version.
-* Any details about your local setup that might be helpful in troubleshooting.
-* If you can, provide detailed steps to reproduce the bug.
-* If you don't have steps to reproduce the bug, just note your observations in
- as much detail as you can. Questions to start a discussion about the issue
- are welcome.
-
-Fix Bugs
-~~~~~~~~
-
-Look through the GitHub issues for bugs. Anything tagged with "bug"
-is open to whoever wants to implement it.
-
-Implement Features
-~~~~~~~~~~~~~~~~~~
-
-Look through the GitHub issues for features. Anything tagged with "enhancement"
-is open to whoever wants to implement it.
-
-Please do not combine multiple feature enhancements into a single pull request.
-
-Note: this project is a bit conservative, so new features might not get into core.
-If possible, it's best to try and implement feature ideas as separate projects
-outside of the core codebase.
-
-Write Documentation
-~~~~~~~~~~~~~~~~~~~
-
-Cookiecutter could always use more documentation, whether as part of the
-official Cookiecutter docs, in docstrings, or even on the web in blog posts,
-articles, and such.
-
-If you want to review your changes on the documentation locally, you can do::
-
- pip install -r docs/requirements.txt
- make servedocs
-
-This will compile the documentation, open it in your browser and start
-watching the files for changes, recompiling as you save.
-
-Submit Feedback
-~~~~~~~~~~~~~~~
-
-The best way to send feedback is to file an issue at
-https://github.com/audreyr/cookiecutter/issues.
-
-If you are proposing a feature:
-
-* Explain in detail how it would work.
-* Keep the scope as narrow as possible, to make it easier to implement.
-* Remember that this is a volunteer-driven project, and that contributions
- are welcome :)
-
-Setting Up the Code for Local Development
------------------------------------------
-
-Here's how to set up `cookiecutter` for local development.
-
-1. Fork the `cookiecutter` repo on GitHub.
-2. Clone your fork locally::
-
- $ git clone git at github.com:your_name_here/cookiecutter.git
-
-3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
-
- $ mkvirtualenv cookiecutter
- $ cd cookiecutter/
- $ python setup.py develop
-
-4. Create a branch for local development::
-
- $ git checkout -b name-of-your-bugfix-or-feature
-
-Now you can make your changes locally.
-
-5. When you're done making changes, check that your changes pass the tests and flake8::
-
- $ pip install tox
- $ tox
-
-Please note that tox runs flake8 automatically, since we have a test environment for it.
-
-If you feel like running only the flake8 environment, please use the following command::
-
- $ tox -e flake8
-
-6. Commit your changes and push your branch to GitHub::
-
- $ git add .
- $ git commit -m "Your detailed description of your changes."
- $ git push origin name-of-your-bugfix-or-feature
-
-7. Check that the test coverage hasn't dropped::
-
- $ tox -e cov-report
-
-8. Submit a pull request through the GitHub website.
-
-Contributor Guidelines
------------------------
-
-Pull Request Guidelines
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-Before you submit a pull request, check that it meets these guidelines:
-
-1. The pull request should include tests.
-2. If the pull request adds functionality, the docs should be updated. Put
- your new functionality into a function with a docstring, and add the
- feature to the list in README.rst.
-3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5, and PyPy on Appveyor and Travis CI.
-4. Check https://travis-ci.org/audreyr/cookiecutter/pull_requests and
- https://ci.appveyor.com/project/audreyr/cookiecutter/history to ensure the tests pass for all supported Python versions and platforms.
-
-Coding Standards
-~~~~~~~~~~~~~~~~
-
-* PEP8
-* Functions over classes except in tests
-* Quotes via http://stackoverflow.com/a/56190/5549
-
- * Use double quotes around strings that are used for interpolation or that are natural language messages
- * Use single quotes for small symbol-like strings (but break the rules if the strings contain quotes)
- * Use triple double quotes for docstrings and raw string literals for regular expressions even if they aren't needed.
- * Example:
-
- .. code-block:: python
-
- LIGHT_MESSAGES = {
- 'English': "There are %(number_of_lights)s lights.",
- 'Pirate': "Arr! Thar be %(number_of_lights)s lights."
- }
-
- def lights_message(language, number_of_lights):
- """Return a language-appropriate string reporting the light count."""
- return LIGHT_MESSAGES[language] % locals()
-
- def is_pirate(message):
- """Return True if the given message sounds piratical."""
- return re.search(r"(?i)(arr|avast|yohoho)!", message) is not None
-
- * Write new code in Python 3.
-
-Testing with tox
-----------------
-
-Tox uses py.test under the hood, hence it supports the same syntax for selecting tests.
-
-For further information please consult the `pytest usage docs`_.
-
-To run a particular test class with tox::
-
- $ tox -e py '-k TestFindHooks'
-
-To run some tests with names matching a string expression::
-
- $ tox -e py '-k generate'
-
-Will run all tests matching "generate", test_generate_files for example.
-
-To run just one method::
-
- $ tox -e py '-k "TestFindHooks and test_find_hook"'
-
-
-To run all tests using various versions of python in virtualenvs defined in tox.ini, just run tox.::
-
- $ tox
-
-This configuration file setup the pytest-cov plugin and it is an additional
-dependency. It generate a coverage report after the tests.
-
-It is possible to tests with some versions of python, to do this the command
-is::
-
- $ tox -e py27,py34,pypy
-
-Will run py.test with the python2.7, python3.4 and pypy interpreters, for
-example.
-
-Troubleshooting for Contributors
----------------------------------
-
-Python 3.3 tests fail locally
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Try upgrading Tox to the latest version. I noticed that they were failing
-locally with Tox 1.5 but succeeding when I upgraded to Tox 1.7.1.
-
-.. _`pytest usage docs`: https://pytest.org/latest/usage.html#specifying-tests-selecting-tests
-
-Core Committer Guide
-====================
-
-Vision and Scope
------------------
-
-Core committers, use this section to:
-
-* Guide your instinct and decisions as a core committer
-* Limit the codebase from growing infinitely
-
-Command-Line Accessible
-~~~~~~~~~~~~~~~~~~~~~~~
-
-* Provides a command-line utility that creates projects from cookiecutters
-* Extremely easy to use without having to think too hard
-* Flexible for more complex use via optional arguments
-
-API Accessible
-~~~~~~~~~~~~~~
-
-* Entirely function-based and stateless (Class-free by intentional design)
-* Usable in pieces for developers of template generation tools
-
-Being Jinja2-specific
-~~~~~~~~~~~~~~~~~~~~~
-
-* Sets a standard baseline for project template creators, facilitating reuse
-* Minimizes the learning curve for those who already use Flask or Django
-* Minimizes scope of Cookiecutter codebase
-
-Extensible
-~~~~~~~~~~
-
-Being extendable by people with different ideas for Jinja2-based project template tools.
-
-* Entirely function-based
-* Aim for statelessness
-* Lets anyone write more opinionated tools
-
-Freedom for Cookiecutter users to build and extend.
-
-* No officially-maintained cookiecutter templates, only ones by individuals
-* Commercial project-friendly licensing, allowing for private cookiecutters and private Cookiecutter-based tools
-
-Fast and Focused
-~~~~~~~~~~~~~~~~
-
-Cookiecutter is designed to do one thing, and do that one thing very well.
-
-* Cover the use cases that the core committers need, and as little as possible beyond that :)
-* Generates project templates from the command-line or API, nothing more
-* Minimize internal line of code (LOC) count
-* Ultra-fast project generation for high performance downstream tools
-
-Inclusive
-~~~~~~~~~
-
-* Cross-platform and cross-version support are more important than features/functionality
-* Fixing Windows bugs even if it's a pain, to allow for use by more beginner coders
-
-Stable
-~~~~~~
-
-* Aim for 100% test coverage and covering corner cases
-* No pull requests will be accepted that drop test coverage on any platform, including Windows
-* Conservative decisions patterned after CPython's conservative decisions with stability in mind
-* Stable APIs that tool builders can rely on
-* New features require a +1 from 3 core committers
-
-VCS-Hosted Templates
-~~~~~~~~~~~~~~~~~~~~~
-
-Cookiecutter project templates are intentionally hosted VCS repos as-is.
-
-* They are easily forkable
-* It's easy for users to browse forks and files
-* They are searchable via standard Github/Bitbucket/other search interface
-* Minimizes the need for packaging-related cruft files
-* Easy to create a public project template and host it for free
-* Easy to collaborate
-
-Process: Pull Requests
-------------------------
-
-If a pull request is untriaged:
-
-* Look at the roadmap
-* Set it for the milestone where it makes the most sense
-* Add it to the roadmap
-
-How to prioritize pull requests, from most to least important:
-
-#. Fixes for broken tests. Broken means broken on any supported platform or Python version.
-#. Extra tests to cover corner cases.
-#. Minor edits to docs.
-#. Bug fixes.
-#. Major edits to docs.
-#. Features.
-
-Ensure that each pull request meets all requirements in this checklist:
-https://gist.github.com/audreyr/4feef90445b9680475f2
-
-Process: Issues
-----------------
-
-If an issue is a bug that needs an urgent fix, mark it for the next patch release.
-Then either fix it or mark as please-help.
-
-For other issues: encourage friendly discussion, moderate debate, offer your thoughts.
-
-New features require a +1 from 2 other core committers (besides yourself).
-
-Process: Roadmap
------------------
-
-The roadmap is https://github.com/audreyr/cookiecutter/milestones?direction=desc&sort=due_date&state=open
-
-Due dates are flexible. Core committers can change them as needed. Note that GitHub sort on them is buggy.
-
-How to number milestones:
-
-* Follow semantic versioning. See http://semver.org
-
-Milestone size:
-
-* If a milestone contains too much, move some to the next milestone.
-* Err on the side of more frequent patch releases.
-
-Process: Pull Request merging and HISTORY.rst maintenance
----------------------------------------------------------
-
-If you merge a pull request, you're responsible for updating `AUTHORS.rst` and `HISTORY.rst`
-
-When you're processing the first change after a release, create boilerplate following the existing pattern:
-
- x.y.z (Development)
- ~~~~~~~~~~~~~~~~~~~
-
- The goals of this release are TODO: release summary of features
-
- Features:
-
- * Feature description, thanks to @contributor (#PR).
-
- Bug Fixes:
-
- * Bug fix description, thanks to @contributor (#PR).
-
- Other changes:
-
- * Description of the change, thanks to @contributor (#PR).
-
- .. _`@contributor`: https://github.com/contributor
-
-Process: Accepting Template Pull Requests
------------------------------------------
-
-#. Run the template to generate the project.
-#. Attempt to start/use the rendered project.
-#. Merge the template in.
-#. Update the history file.
-
-.. note:: Adding a template doesn't give authors credit.
-
-
-Process: Generating CONTRIBUTING.rst
--------------------------------------
-
-From the `cookiecutter` project root::
-
- $ make contributing
-
-This will generate the following message::
-
- rm CONTRIBUTING.rst
- touch CONTRIBUTING.rst
- cat docs/contributing.rst >> CONTRIBUTING.rst
- echo "\r\r" >> CONTRIBUTING.rst
- cat docs/types_of_contributions.rst >> CONTRIBUTING.rst
- echo "\r\r" >> CONTRIBUTING.rst
- cat docs/contributor_setup.rst >> CONTRIBUTING.rst
- echo "\r\r" >> CONTRIBUTING.rst
- cat docs/contributor_guidelines.rst >> CONTRIBUTING.rst
- echo "\r\r" >> CONTRIBUTING.rst
- cat docs/contributor_tips.rst >> CONTRIBUTING.rst
- echo "\r\r" >> CONTRIBUTING.rst
- cat docs/core_committer_guide.rst >> CONTRIBUTING.rst
- echo "\r\rAutogenerated from the docs via \`make contributing\`" >> CONTRIBUTING.rst
- echo "WARNING: Don't forget to replace any :ref: statements with literal names"
- WARNING: Don't forget to replace any :ref: statements with literal names
-
-Process: Your own code changes
--------------------------------
-
-All code changes, regardless of who does them, need to be reviewed and merged by someone else.
-This rule applies to all the core committers.
-
-Exceptions:
-
-* Minor corrections and fixes to pull requests submitted by others.
-* While making a formal release, the release manager can make necessary, appropriate changes.
-* Small documentation changes that reinforce existing subject matter. Most commonly being, but not limited to spelling and grammar corrections.
-
-Responsibilities
------------------
-
-#. Ensure cross-platform compatibility for every change that's accepted. Windows, Mac, Debian & Ubuntu Linux.
-#. Ensure that code that goes into core meets all requirements in this checklist: https://gist.github.com/audreyr/4feef90445b9680475f2
-#. Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community feedback.
-#. Don't add any classes to the codebase unless absolutely needed. Err on the side of using functions.
-#. Keep feature versions as small as possible, preferably one new feature per version.
-#. Be welcoming to newcomers and encourage diverse new contributors from all backgrounds. See the Python Community Code of Conduct (https://www.python.org/psf/codeofconduct/).
-
-Becoming a Core Committer
---------------------------
-
-Contributors may be given core commit privileges. Preference will be given to those with:
-
-A. Past contributions to Cookiecutter and other open-source projects. Contributions to Cookiecutter include both code (both accepted and pending) and friendly participation in the issue tracker. Quantity and quality are considered.
-B. A coding style that the other core committers find simple, minimal, and clean.
-C. Access to resources for cross-platform development and testing.
-D. Time to devote to the project regularly.
-
Autogenerated from the docs via `make contributing`
+============
+Contributing
+============
+
+Contributions are welcome, and they are greatly appreciated! Every
+little bit helps, and credit will always be given.
+
+.. toctree::
+ :numbered:
+ :maxdepth: 2
+
+ types_of_contributions
+ contributor_setup
+ contributor_guidelines
+ contributor_testing
+ core_committer_guide
+
+
+Types of Contributions
+----------------------
+
+You can contribute in many ways:
+
+Create Cookiecutter Templates
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Some other Cookiecutter templates to list in the :ref:`README <readme>` would
+be great.
+
+If you create a Cookiecutter template, submit a pull request adding it to
+README.rst.
+
+Report Bugs
+~~~~~~~~~~~
+
+Report bugs at https://github.com/audreyr/cookiecutter/issues.
+
+If you are reporting a bug, please include:
+
+* Your operating system name and version.
+* Any details about your local setup that might be helpful in troubleshooting.
+* If you can, provide detailed steps to reproduce the bug.
+* If you don't have steps to reproduce the bug, just note your observations in
+ as much detail as you can. Questions to start a discussion about the issue
+ are welcome.
+
+Fix Bugs
+~~~~~~~~
+
+Look through the GitHub issues for bugs. Anything tagged with "bug"
+is open to whoever wants to implement it.
+
+Implement Features
+~~~~~~~~~~~~~~~~~~
+
+Look through the GitHub issues for features. Anything tagged with "enhancement"
+and "please-help" is open to whoever wants to implement it.
+
+Please do not combine multiple feature enhancements into a single pull request.
+
+Note: this project is very conservative, so new features that aren't tagged
+with "please-help" might not get into core. We're trying to keep the code base
+small, extensible, and streamlined. Whenever possible, it's best to try and
+implement feature ideas as separate projects outside of the core codebase.
+
+Write Documentation
+~~~~~~~~~~~~~~~~~~~
+
+Cookiecutter could always use more documentation, whether as part of the
+official Cookiecutter docs, in docstrings, or even on the web in blog posts,
+articles, and such.
+
+If you want to review your changes on the documentation locally, you can do::
+
+ pip install -r docs/requirements.txt
+ make servedocs
+
+This will compile the documentation, open it in your browser and start
+watching the files for changes, recompiling as you save.
+
+Submit Feedback
+~~~~~~~~~~~~~~~
+
+The best way to send feedback is to file an issue at
+https://github.com/audreyr/cookiecutter/issues.
+
+If you are proposing a feature:
+
+* Explain in detail how it would work.
+* Keep the scope as narrow as possible, to make it easier to implement.
+* Remember that this is a volunteer-driven project, and that contributions
+ are welcome :)
+
+
+Setting Up the Code for Local Development
+-----------------------------------------
+
+Here's how to set up `cookiecutter` for local development.
+
+1. Fork the `cookiecutter` repo on GitHub.
+2. Clone your fork locally::
+
+ $ git clone git at github.com:your_name_here/cookiecutter.git
+
+3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
+
+ $ mkvirtualenv cookiecutter
+ $ cd cookiecutter/
+ $ python setup.py develop
+
+4. Create a branch for local development::
+
+ $ git checkout -b name-of-your-bugfix-or-feature
+
+Now you can make your changes locally.
+
+5. When you're done making changes, check that your changes pass the tests and flake8::
+
+ $ pip install tox
+ $ tox
+
+Please note that tox runs flake8 automatically, since we have a test environment for it.
+
+If you feel like running only the flake8 environment, please use the following command::
+
+ $ tox -e flake8
+
+6. Commit your changes and push your branch to GitHub::
+
+ $ git add .
+ $ git commit -m "Your detailed description of your changes."
+ $ git push origin name-of-your-bugfix-or-feature
+
+7. Check that the test coverage hasn't dropped::
+
+ $ tox -e cov-report
+
+8. Submit a pull request through the GitHub website.
+
+
+Contributor Guidelines
+-----------------------
+
+Pull Request Guidelines
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Before you submit a pull request, check that it meets these guidelines:
+
+1. The pull request should include tests.
+2. If the pull request adds functionality, the docs should be updated. Put
+ your new functionality into a function with a docstring, and add the
+ feature to the list in README.rst.
+3. The pull request should work for Python 2.7, 3.3, 3.4, 3.5, and PyPy on Appveyor and Travis CI.
+4. Check https://travis-ci.org/audreyr/cookiecutter/pull_requests and
+ https://ci.appveyor.com/project/audreyr/cookiecutter/history to ensure the tests pass for all supported Python versions and platforms.
+
+Coding Standards
+~~~~~~~~~~~~~~~~
+
+* PEP8
+* Functions over classes except in tests
+* Quotes via http://stackoverflow.com/a/56190/5549
+
+ * Use double quotes around strings that are used for interpolation or that are natural language messages
+ * Use single quotes for small symbol-like strings (but break the rules if the strings contain quotes)
+ * Use triple double quotes for docstrings and raw string literals for regular expressions even if they aren't needed.
+ * Example:
+
+ .. code-block:: python
+
+ LIGHT_MESSAGES = {
+ 'English': "There are %(number_of_lights)s lights.",
+ 'Pirate': "Arr! Thar be %(number_of_lights)s lights."
+ }
+
+ def lights_message(language, number_of_lights):
+ """Return a language-appropriate string reporting the light count."""
+ return LIGHT_MESSAGES[language] % locals()
+
+ def is_pirate(message):
+ """Return True if the given message sounds piratical."""
+ return re.search(r"(?i)(arr|avast|yohoho)!", message) is not None
+
+ * Write new code in Python 3.
+
+
+Testing with tox
+----------------
+
+Tox uses py.test under the hood, hence it supports the same syntax for selecting tests.
+
+For further information please consult the `pytest usage docs`_.
+
+To run a particular test class with tox::
+
+ $ tox -e py '-k TestFindHooks'
+
+To run some tests with names matching a string expression::
+
+ $ tox -e py '-k generate'
+
+Will run all tests matching "generate", test_generate_files for example.
+
+To run just one method::
+
+ $ tox -e py '-k "TestFindHooks and test_find_hook"'
+
+
+To run all tests using various versions of python in virtualenvs defined in tox.ini, just run tox.::
+
+ $ tox
+
+This configuration file setup the pytest-cov plugin and it is an additional
+dependency. It generate a coverage report after the tests.
+
+It is possible to tests with some versions of python, to do this the command
+is::
+
+ $ tox -e py27,py34,pypy
+
+Will run py.test with the python2.7, python3.4 and pypy interpreters, for
+example.
+
+Troubleshooting for Contributors
+---------------------------------
+
+Python 3.3 tests fail locally
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Try upgrading Tox to the latest version. I noticed that they were failing
+locally with Tox 1.5 but succeeding when I upgraded to Tox 1.7.1.
+
+.. _`pytest usage docs`: https://pytest.org/latest/usage.html#specifying-tests-selecting-tests
+
+
+Core Committer Guide
+====================
+
+Vision and Scope
+-----------------
+
+Core committers, use this section to:
+
+* Guide your instinct and decisions as a core committer
+* Limit the codebase from growing infinitely
+
+Command-Line Accessible
+~~~~~~~~~~~~~~~~~~~~~~~
+
+* Provides a command-line utility that creates projects from cookiecutters
+* Extremely easy to use without having to think too hard
+* Flexible for more complex use via optional arguments
+
+API Accessible
+~~~~~~~~~~~~~~
+
+* Entirely function-based and stateless (Class-free by intentional design)
+* Usable in pieces for developers of template generation tools
+
+Being Jinja2-specific
+~~~~~~~~~~~~~~~~~~~~~
+
+* Sets a standard baseline for project template creators, facilitating reuse
+* Minimizes the learning curve for those who already use Flask or Django
+* Minimizes scope of Cookiecutter codebase
+
+Extensible
+~~~~~~~~~~
+
+Being extendable by people with different ideas for Jinja2-based project template tools.
+
+* Entirely function-based
+* Aim for statelessness
+* Lets anyone write more opinionated tools
+
+Freedom for Cookiecutter users to build and extend.
... 7503 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cookiecutter.git
More information about the Python-modules-commits
mailing list