use global contributing guide
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Remove the per-project files so we don't have to keep them in sync. GitHub's UI links to everything except the contributing guide, so add a section about that to the readme. (cherry picked from commit 60a11a730e8aa2450115385798ab8710804c6409)
authored by David Lord · committed by David Lord · parent 5b525e9 · Browse files · 5 files·+18 added−317 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
5 files+18 added−317 removed
- other:+18 added−317 removed
Provenance
- Commit
959052f- Tree
59b0642- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
5b525e9
5 files changed+18 added−317 removed
modified:.github/ISSUE_TEMPLATE/config.yml+2 added-2 removed
123456678991011blank_issues_enabled: falsecontact_links: - name: Security issue url: https://github.com/pallets/flask/security/advisories/new about: Do not report security issues publicly. Create a private advisory. - name: Questions - name: Questions on GitHub Discussions url: https://github.com/pallets/flask/discussions/ about: Ask questions about your own code on the Discussions tab. - name: Questions on - name: Questions on Discord url: https://discord.gg/pallets about: Ask questions about your own code on our Discord chat.modified:docs/contributing.rst+8 added-1 removed
1-.. include:: ../CONTRIBUTING.rst1+Contributing2+============3+4+See the Pallets `detailed contributing documentation <_contrib>`_ for many ways5+to contribute, including reporting issues, requesting features, asking or6+answering questions, and making PRs.7+8+.. _contrib: https://palletsprojects.com/contributing/deleted:CODE_OF_CONDUCT.md-76 removed
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we ascontributors and maintainers pledge to making participation in our project andour community a harassment-free experience for everyone, regardless of age, bodysize, disability, ethnicity, sex characteristics, gender identity and expression,level of experience, education, socio-economic status, nationality, personalappearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environmentinclude:
* Using welcoming and inclusive language* Being respectful of differing viewpoints and experiences* Gracefully accepting constructive criticism* Focusing on what is best for the community* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances* Trolling, insulting/derogatory comments, and personal or political attacks* Public or private harassment* Publishing others' private information, such as a physical or electronic address, without explicit permission* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptablebehavior and are expected to take appropriate and fair corrective action inresponse to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, orreject comments, commits, code, wiki edits, issues, and other contributionsthat are not aligned to this Code of Conduct, or to ban temporarily orpermanently any contributor for other behaviors that they deem inappropriate,threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaceswhen an individual is representing the project or its community. Examples ofrepresenting a project or community include using an official project e-mailaddress, posting via an official social media account, or acting as an appointedrepresentative at an online or offline event. Representation of a project may befurther defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may bereported by contacting the project team at report@palletsprojects.com. Allcomplaints will be reviewed and investigated and will result in a response thatis deemed necessary and appropriate to the circumstances. The project team isobligated to maintain confidentiality with regard to the reporter of an incident.Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in goodfaith may face temporary or permanent repercussions as determined by othermembers of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, seehttps://www.contributor-covenant.org/faqdeleted:CONTRIBUTING.rst-238 removed
1-How to contribute to Flask2-==========================3-4-Thank you for considering contributing to Flask!5-6-7-Support questions8------------------9-10-Please don't use the issue tracker for this. The issue tracker is a tool11-to address bugs and feature requests in Flask itself. Use one of the12-following resources for questions about using Flask or issues with your13-own code:14-15-- The ``#questions`` channel on our Discord chat:16- https://discord.gg/pallets17-- Ask on `Stack Overflow`_. Search with Google first using:18- ``site:stackoverflow.com flask {search term, exception message, etc.}``19-- Ask on our `GitHub Discussions`_ for long term discussion or larger20- questions.21-22-.. _Stack Overflow: https://stackoverflow.com/questions/tagged/flask?tab=Frequent23-.. _GitHub Discussions: https://github.com/pallets/flask/discussions24-25-26-Reporting issues27-----------------28-29-Include the following information in your post:30-31-- Describe what you expected to happen.32-- If possible, include a `minimal reproducible example`_ to help us33- identify the issue. This also helps check that the issue is not with34- your own code.35-- Describe what actually happened. Include the full traceback if there36- was an exception.37-- List your Python and Flask versions. If possible, check if this38- issue is already fixed in the latest releases or the latest code in39- the repository.40-41-.. _minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example42-43-44-Submitting patches45-------------------46-47-If there is not an open issue for what you want to submit, prefer48-opening one for discussion before working on a PR. You can work on any49-issue that doesn't have an open PR linked to it or a maintainer assigned50-to it. These show up in the sidebar. No need to ask if you can work on51-an issue that interests you.52-53-Include the following in your patch:54-55-- Use `Black`_ to format your code. This and other tools will run56- automatically if you install `pre-commit`_ using the instructions57- below.58-- Include tests if your patch adds or changes code. Make sure the test59- fails without your patch.60-- Update any relevant docs pages and docstrings. Docs pages and61- docstrings should be wrapped at 72 characters.62-- Add an entry in ``CHANGES.rst``. Use the same style as other63- entries. Also include ``.. versionchanged::`` inline changelogs in64- relevant docstrings.65-66-.. _Black: https://black.readthedocs.io67-.. _pre-commit: https://pre-commit.com68-69-70-First time setup using GitHub Codespaces71-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~72-73-`GitHub Codespaces`_ creates a development environment that is already set up for the74-project. By default it opens in Visual Studio Code for the Web, but this can75-be changed in your GitHub profile settings to use Visual Studio Code or JetBrains76-PyCharm on your local computer.77-78-- Make sure you have a `GitHub account`_.79-- From the project's repository page, click the green "Code" button and then "Create80- codespace on main".81-- The codespace will be set up, then Visual Studio Code will open. However, you'll82- need to wait a bit longer for the Python extension to be installed. You'll know it's83- ready when the terminal at the bottom shows that the virtualenv was activated.84-- Check out a branch and `start coding`_.85-86-.. _GitHub Codespaces: https://docs.github.com/en/codespaces87-.. _devcontainer: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/introduction-to-dev-containers88-89-First time setup in your local environment90-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~91-92-- Make sure you have a `GitHub account`_.93-- Download and install the `latest version of git`_.94-- Configure git with your `username`_ and `email`_.95-96- .. code-block:: text97-98- $ git config --global user.name 'your name'99- $ git config --global user.email 'your email'100-101-- Fork Flask to your GitHub account by clicking the `Fork`_ button.102-- `Clone`_ your fork locally, replacing ``your-username`` in the command below with103- your actual username.104-105- .. code-block:: text106-107- $ git clone https://github.com/your-username/flask108- $ cd flask109-110-- Create a virtualenv. Use the latest version of Python.111-112- - Linux/macOS113-114- .. code-block:: text115-116- $ python3 -m venv .venv117- $ . .venv/bin/activate118-119- - Windows120-121- .. code-block:: text122-123- > py -3 -m venv .venv124- > .venv\Scripts\activate125-126-- Install the development dependencies, then install Flask in editable mode.127-128- .. code-block:: text129-130- $ python -m pip install -U pip131- $ pip install -r requirements/dev.txt && pip install -e .132-133-- Install the pre-commit hooks.134-135- .. code-block:: text136-137- $ pre-commit install --install-hooks138-139-.. _GitHub account: https://github.com/join140-.. _latest version of git: https://git-scm.com/downloads141-.. _username: https://docs.github.com/en/github/using-git/setting-your-username-in-git142-.. _email: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address143-.. _Fork: https://github.com/pallets/flask/fork144-.. _Clone: https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#step-2-create-a-local-clone-of-your-fork145-146-.. _start coding:147-148-Start coding149-~~~~~~~~~~~~150-151-- Create a branch to identify the issue you would like to work on. If you're152- submitting a bug or documentation fix, branch off of the latest ".x" branch.153-154- .. code-block:: text155-156- $ git fetch origin157- $ git checkout -b your-branch-name origin/2.0.x158-159- If you're submitting a feature addition or change, branch off of the "main" branch.160-161- .. code-block:: text162-163- $ git fetch origin164- $ git checkout -b your-branch-name origin/main165-166-- Using your favorite editor, make your changes, `committing as you go`_.167-168- - If you are in a codespace, you will be prompted to `create a fork`_ the first169- time you make a commit. Enter ``Y`` to continue.170-171-- Include tests that cover any code changes you make. Make sure the test fails without172- your patch. Run the tests as described below.173-- Push your commits to your fork on GitHub and `create a pull request`_. Link to the174- issue being addressed with ``fixes #123`` in the pull request description.175-176- .. code-block:: text177-178- $ git push --set-upstream origin your-branch-name179-180-.. _committing as you go: https://afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes181-.. _create a fork: https://docs.github.com/en/codespaces/developing-in-codespaces/using-source-control-in-your-codespace#about-automatic-forking182-.. _create a pull request: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request183-184-.. _Running the tests:185-186-Running the tests187-~~~~~~~~~~~~~~~~~188-189-Run the basic test suite with pytest.190-191-.. code-block:: text192-193- $ pytest194-195-This runs the tests for the current environment, which is usually196-sufficient. CI will run the full suite when you submit your pull197-request. You can run the full test suite with tox if you don't want to198-wait.199-200-.. code-block:: text201-202- $ tox203-204-205-Running test coverage206-~~~~~~~~~~~~~~~~~~~~~207-208-Generating a report of lines that do not have test coverage can indicate209-where to start contributing. Run ``pytest`` using ``coverage`` and210-generate a report.211-212-If you are using GitHub Codespaces, ``coverage`` is already installed213-so you can skip the installation command.214-215-.. code-block:: text216-217- $ pip install coverage218- $ coverage run -m pytest219- $ coverage html220-221-Open ``htmlcov/index.html`` in your browser to explore the report.222-223-Read more about `coverage <https://coverage.readthedocs.io>`__.224-225-226-Building the docs227-~~~~~~~~~~~~~~~~~228-229-Build the docs in the ``docs`` directory using Sphinx.230-231-.. code-block:: text232-233- $ cd docs234- $ make html235-236-Open ``_build/html/index.html`` in your browser to view the docs.237-238-Read more about `Sphinx <https://www.sphinx-doc.org/en/stable/>`__.modified:README.md+8 added
39 unmodified lines40414243444546474849505139 unmodified linesallow the maintainers to devote more time to the projects, [pleasedonate today].
[please donate today]: https://palletsprojects.com/donate
## Contributing
See our [detailed contributing documentation][contrib] for many ways tocontribute, including reporting issues, requesting features, asking or answeringquestions, and making PRs.
[contrib]: https://palletsprojects.com/contributing/