From 2363b321b7455e7101f6c309662c5e571e5428d4 Mon Sep 17 00:00:00 2001 From: Kaspersky <50753378+CasP0@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:50:24 -0500 Subject: [PATCH] Add instructions for cloning the repository using gh repo clone Add instructions for cloning the repository using `gh repo clone` and update relevant documentation. * **README.md**: Add instructions for cloning the repository, a brief description of the repository, and links to relevant documentation and resources. * **.github/CONTRIBUTING.rst**: Update contributing guidelines to include instructions for cloning the repository and setting up the development environment. * **.github/ISSUE_TEMPLATE/bug.yml**: Update the bug report template to include a note about cloning the repository and add a field for specifying the branch. * **Doc/README.rst**: Update documentation instructions to include cloning the repository and contributing to the documentation. * **Doc/reference/executionmodel.rst**: Update execution model documentation to include notes about cloning the repository and setting up the development environment. * **Doc/using/windows.rst**: Update Windows usage instructions to include cloning the repository and setting up the development environment on Windows. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/python/cpython?shareId=XXXX-XXXX-XXXX-XXXX). --- .github/CONTRIBUTING.rst | 38 +++++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/bug.yml | 8 ++++++ Doc/README.rst | 39 ++++++++++++++++++++++++++++ Doc/reference/executionmodel.rst | 44 +++++++++++++++++++++++++++++++- Doc/using/windows.rst | 39 ++++++++++++++++++++++++++++ README.md | 29 +++++++++++++++++++++ 6 files changed, 196 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst index 2ef9cdc191481e..6107ace272d9c5 100644 --- a/.github/CONTRIBUTING.rst +++ b/.github/CONTRIBUTING.rst @@ -36,6 +36,44 @@ our workflow that are not covered by a bot or status check are: - Upon your first non-trivial pull request (which includes documentation changes), feel free to add yourself to ``Misc/ACKS`` +Cloning the Repository +---------------------- +To clone the CPython repository, you can use the following command: + +```sh +gh repo clone python/cpython +``` + +Setting Up the Development Environment +-------------------------------------- +To set up your development environment, follow these steps: + +1. Clone the repository using the command mentioned above. +2. Create a virtual environment: + ```sh + python -m venv venv + ``` +3. Activate the virtual environment: + - On Windows: + ```sh + venv\Scripts\activate + ``` + - On macOS and Linux: + ```sh + source venv/bin/activate + ``` +4. Install the required dependencies: + ```sh + pip install -r requirements.txt + ``` +5. Build the CPython source code: + ```sh + ./configure + make + make test + ``` + +You are now ready to start contributing to CPython! Setting Expectations -------------------- diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 7b7810cf6965fd..68139c820a4b94 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -14,6 +14,8 @@ body: - Emailing [python-list](https://mail.python.org/mailman/listinfo/python-list) Make sure to also search the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc) to check that the bug has not already been reported. + + **Note:** If you are working on a cloned repository, make sure to pull the latest changes from the main branch using `gh repo clone python/cpython`. - type: textarea attributes: label: "Bug description:" @@ -54,3 +56,9 @@ body: - Other validations: required: false + - type: input + attributes: + label: "Branch:" + description: "Specify the branch you are working on (e.g., main, feature-branch)." + validations: + required: true diff --git a/Doc/README.rst b/Doc/README.rst index 2d1148753e0c6b..ae2b4f75a0e360 100644 --- a/Doc/README.rst +++ b/Doc/README.rst @@ -135,3 +135,42 @@ Bugs in the toolset should be reported to the tools themselves. To help with the documentation, or report any problems, please leave a message on `discuss.python.org `_. + +Cloning the Repository +====================== + +To clone the CPython repository, you can use the following command: + +```sh +gh repo clone python/cpython +``` + +Contributing to the Documentation +================================= + +If you are interested in contributing to the documentation, please follow these steps: + +1. Clone the repository using the command mentioned above. +2. Create a virtual environment: + ```sh + python -m venv venv + ``` +3. Activate the virtual environment: + - On Windows: + ```sh + venv\Scripts\activate + ``` + - On macOS and Linux: + ```sh + source venv/bin/activate + ``` +4. Install the required dependencies: + ```sh + pip install -r requirements.txt + ``` +5. Make your changes to the documentation files. +6. Build the documentation to ensure your changes are correct: + ```sh + make html + ``` +7. Submit a pull request with your changes. diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst index cb6c524dd97a30..d0e7e65b8ac86b 100644 --- a/Doc/reference/executionmodel.rst +++ b/Doc/reference/executionmodel.rst @@ -1,4 +1,3 @@ - .. _execmodel: *************** @@ -402,3 +401,46 @@ and :keyword:`raise` statement in section :ref:`raise`. .. [#] This limitation occurs because the code that is executed by these operations is not available at the time the module is compiled. + +.. _cloning-repo: + +Cloning the Repository +====================== + +To clone the CPython repository, you can use the following command: + +```sh +gh repo clone python/cpython +``` + +.. _setup-dev-env: + +Setting Up the Development Environment +====================================== + +To set up your development environment for working on the execution model, follow these steps: + +1. Clone the repository using the command mentioned above. +2. Create a virtual environment: + ```sh + python -m venv venv + ``` +3. Activate the virtual environment: + - On Windows: + ```sh + venv\Scripts\activate + ``` + - On macOS and Linux: + ```sh + source venv/bin/activate + ``` +4. Install the required dependencies: + ```sh + pip install -r requirements.txt + ``` +5. Make your changes to the execution model documentation. +6. Build the documentation to ensure your changes are correct: + ```sh + make html + ``` +7. Submit a pull request with your changes. diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst index 1a6322d72341ff..9c0496932b22cb 100644 --- a/Doc/using/windows.rst +++ b/Doc/using/windows.rst @@ -1355,3 +1355,42 @@ Check :pep:`11` for details on all unsupported platforms. See `Python for Windows `_ for detailed information about platforms with pre-compiled installers. + +.. _cloning-repo: + +Cloning the Repository +====================== + +To clone the CPython repository, you can use the following command: + +```sh +gh repo clone python/cpython +``` + +.. _setup-dev-env-windows: + +Setting Up the Development Environment on Windows +================================================= + +To set up your development environment on Windows, follow these steps: + +1. Clone the repository using the command mentioned above. +2. Create a virtual environment: + ```sh + python -m venv venv + ``` +3. Activate the virtual environment: + - On Windows: + ```sh + venv\Scripts\activate + ``` +4. Install the required dependencies: + ```sh + pip install -r requirements.txt + ``` +5. Make your changes to the code. +6. Build the code to ensure your changes are correct: + ```sh + make build + ``` +7. Submit a pull request with your changes. diff --git a/README.md b/README.md new file mode 100644 index 00000000000000..5c5dcd97c74129 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# CPython + +CPython is the reference implementation of the Python programming language. It is written in C and provides the standard library for Python. This repository contains the source code for CPython, including the interpreter, standard library, and documentation. + +## Cloning the Repository + +To clone the CPython repository, you can use the following command: + +```sh +gh repo clone python/cpython +``` + +## Documentation + +For detailed information on how to build and contribute to the documentation, please refer to the [Doc/README.rst](Doc/README.rst) file. + +## Contributing + +If you are interested in contributing to CPython, please read the [CONTRIBUTING.rst](.github/CONTRIBUTING.rst) file for guidelines on how to get started. + +## Bug Reports + +To report bugs or issues, please use the [GitHub Issues](https://github.com/python/cpython/issues) page. + +## Resources + +- [Python Developer's Guide](https://devguide.python.org/) +- [Python Documentation](https://docs.python.org/3/) +- [Python Mailing Lists](https://mail.python.org/mailman/listinfo)