Skip to content

Commit

Permalink
Merge pull request #516 from soham4abc/main
Browse files Browse the repository at this point in the history
command line instructions moved up
  • Loading branch information
kosayoda committed Jun 1, 2021
2 parents c5fda5d + d70d90c commit 03c787b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@ icon: fab fa-github

> **Note:** The process varies depending on your choice of code editor / IDE, so refer to one of the following guides:
- [Cloning with PyCharm](#cloning-with-pycharm)
- [Cloning with the command line](#cloning-with-the-command-line)
- [Cloning with PyCharm](#cloning-with-pycharm)

The following will use the [Sir-Lancebot](https://github.com/python-discord/sir-lancebot/) repository as an example, but the steps are the same for all other repositories. You should have already retrieved your fork's Git URL as described in [**Creating a Fork**](../forking-repository).

---

## Cloning with PyCharm
1. Load up PyCharm and click `Get from VCS`.<br>
![Create Project in PyCharm](/static/images/content/contributing/pycharm_create_project.png)
2. Enter the URL of your forked repository.
3. Change the directory if you desire and click `Clone`.<br>
![Clone Git Project in Pycharm](/static/images/content/contributing/pycharm_checkout.png)

---

## Cloning with the command line

1. Clone your forked repository using `git clone` followed by your fork's Git URL. Then, change your working directory to the repository.

```shell
$ git clone https://github.com/<your username>/sir-lancebot
...
$ cd sir-lancebot
```

---

## Cloning with PyCharm

1. Load up PyCharm and click `Get from VCS`.<br>
![Create Project in PyCharm](/static/images/content/contributing/pycharm_create_project.png)
2. Enter the URL of your forked repository.
3. Change the directory if you desire and click `Clone`.<br>
![Clone Git Project in Pycharm](/static/images/content/contributing/pycharm_checkout.png)
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,36 @@ icon: fab fa-python

> **Note:** The process varies depending on your choice of code editor / IDE, so refer to one of the following guides:
- [Installing dependencies with PyCharm](#installing-dependencies-with-pycharm)
- [Installing dependencies with the command line](#installing-dependencies-with-the-command-line)
- [Installing dependencies with PyCharm](#installing-dependencies-with-pycharm)

The following will use the [Sir-Lancebot](https://github.com/python-discord/sir-lancebot/) repository as an example, but the steps are the same for all other repositories.
You should have already cloned your fork as described in [**Cloning a Repository**](../cloning-repository).

---

## Installing dependencies with PyCharm
1. Load up your project in PyCharm.
2. Go to the Project Settings by clicking `File`, then `Settings...`. Alternatively, use the shortcut key: `Ctrl+Alt+S` (`command+comma` on Mac OS).
3. Install the [poetry plugin](https://plugins.jetbrains.com/plugin/14307-poetry).
4. Navigate to `Project Interpreter`, then click the gear icon and click `Add`.<br/>
![PyCharm Interpreter Settings](/static/images/content/contributing/pycharm_interpreter.png)<br/>
5. Click `Poetry Environment`, then click `OK`.<br/>
![PyCharm Poetry Environment](/static/images/content/contributing/pycharm_poetry.png)<br/>
6. PyCharm will automatically install the packages required into a virtual environment.<br/>
![PyCharm Project Interpreter](/static/images/content/contributing/pycharm_poetry_success.png)

---

## Installing dependencies with the command line

1. Make sure you are in the root project directory. This directory will always have a file titled `README.md`.
2. Install project and development dependencies. Remember to also set up pre-commit hooks to ensure your pushed commits will never fail linting.
---

---

```shell
$ poetry install
$ poetry run task precommit
```

---

## Installing dependencies with PyCharm

1. Load up your project in PyCharm.
2. Go to the Project Settings by clicking `File`, then `Settings...`. Alternatively, use the shortcut key: `Ctrl+Alt+S` (`command+comma` on Mac OS).
3. Install the [poetry plugin](https://plugins.jetbrains.com/plugin/14307-poetry).
4. Navigate to `Project Interpreter`, then click the gear icon and click `Add`.<br/>
![PyCharm Interpreter Settings](/static/images/content/contributing/pycharm_interpreter.png)<br/>
5. Click `Poetry Environment`, then click `OK`.<br/>
![PyCharm Poetry Environment](/static/images/content/contributing/pycharm_poetry.png)<br/>
6. PyCharm will automatically install the packages required into a virtual environment.<br/>
![PyCharm Project Interpreter](/static/images/content/contributing/pycharm_poetry_success.png)

0 comments on commit 03c787b

Please sign in to comment.