diff options
author | 2021-05-16 19:57:40 +0300 | |
---|---|---|
committer | 2021-05-16 19:57:40 +0300 | |
commit | fd6491fe8c4f1f22f32faf8d98abb04d608bd463 (patch) | |
tree | ed85ae1dc1827edd68fb99407404fe0430720556 | |
parent | Merge pull request #499 from python-discord/swfarnsworth/dave (diff) | |
parent | Migrates Sir Lancebot And Python To Poetry (diff) |
Merge pull request #502 from python-discord/poetry
Poetry In Dev Guides
-rw-r--r-- | pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md | 8 | ||||
-rw-r--r-- | pydis_site/apps/content/resources/guides/pydis-guides/contributing/installing-project-dependencies.md | 29 | ||||
-rw-r--r-- | pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot.md | 8 | ||||
-rw-r--r-- | pydis_site/static/images/content/contributing/pycharm_interpreter.png | bin | 52028 -> 21696 bytes | |||
-rw-r--r-- | pydis_site/static/images/content/contributing/pycharm_pipenv.png | bin | 35997 -> 18513 bytes | |||
-rw-r--r-- | pydis_site/static/images/content/contributing/pycharm_pipenv_success.png | bin | 119232 -> 27705 bytes |
6 files changed, 26 insertions, 19 deletions
diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index 9e0f323a..741bf28e 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -6,9 +6,9 @@ toc: 1 --- # Requirements -* [Python 3.8](https://www.python.org/downloads/) -* [Pipenv](https://github.com/pypa/pipenv#installation) - * `pip install pipenv` +* [Python 3.9](https://www.python.org/downloads/) +* [Poetry](https://github.com/python-poetry/poetry#installation) + * `pip install poetry` * [Git](https://git-scm.com/downloads) * [Windows](https://git-scm.com/download/win) * [MacOS](https://git-scm.com/download/mac) or `brew install git` @@ -181,7 +181,7 @@ Running on the host is particularly useful if you wish to debug the bot. The site has to have been started somehow beforehand. ```shell -pipenv run start +poetry run task start ``` --- diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/installing-project-dependencies.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/installing-project-dependencies.md index 4432236e..ba5b3d1b 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/installing-project-dependencies.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/installing-project-dependencies.md @@ -16,23 +16,30 @@ You should have already cloned your fork as described in [**Cloning a 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`. -3. Navigate to `Project Interpreter`, then click the gear icon and click `Add`. - -4. In the popup window, click `Pipenv Environment`, make sure `Install packages from Pipfile` is checked, then click `OK`. - -5. PyCharm will automatically install the packages required into a virtual environment. - +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). (**Note:** This is not required for the site) +4. Navigate to `Project Interpreter`, then click the gear icon and click `Add`. + +5. If installing dependencies for the site, click `Pipenv Environment`, otherwise, click `Poetry Environment`, then click `OK`. + +6. PyCharm will automatically install the packages required into a virtual environment. + --- ## Installing dependencies with the command line -1. Make sure you are in the project directory. -2. Install project and development dependencies: +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. +--- + +- Site: ```shell $ pipenv sync --dev +$ pipenv run precommit ``` -* Remember to also set up pre-commit hooks to ensure your pushed commits will never fail linting: + +- Other projects: ```shell -$ pipenv run precommit +$ poetry install +$ poetry run task precommit ``` diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot.md index 4ff98095..601cfa4a 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/sir-lancebot.md @@ -9,8 +9,8 @@ toc: 1 --- # Requirements -- [Python 3.8](https://www.python.org/downloads/) -- [Pipenv](https://github.com/pypa/pipenv/blob/master/docs/install.rst#-installing-pipenv) +- [Python 3.9](https://www.python.org/downloads/) +- [Poetry](https://github.com/python-poetry/poetry#installation) - [Git](https://git-scm.com/downloads) - [Windows Installer](https://git-scm.com/download/win) - [MacOS Installer](https://git-scm.com/download/mac) or `brew install git` @@ -101,10 +101,10 @@ If you get any Docker related errors, reference the [Possible Issues](./docker/p {: .notification .is-warning } ## Run on the host -After installing project dependencies use the pipenv command `pipenv run start` in the project root. +After installing project dependencies use the poetry command `poetry run task start` in the project root. ```shell -$ pipenv run start +$ poetry run task start ``` --- diff --git a/pydis_site/static/images/content/contributing/pycharm_interpreter.png b/pydis_site/static/images/content/contributing/pycharm_interpreter.png Binary files differindex cb757f84..66a0dc7f 100644 --- a/pydis_site/static/images/content/contributing/pycharm_interpreter.png +++ b/pydis_site/static/images/content/contributing/pycharm_interpreter.png diff --git a/pydis_site/static/images/content/contributing/pycharm_pipenv.png b/pydis_site/static/images/content/contributing/pycharm_pipenv.png Binary files differindex feb9b1d7..5d6620ee 100644 --- a/pydis_site/static/images/content/contributing/pycharm_pipenv.png +++ b/pydis_site/static/images/content/contributing/pycharm_pipenv.png diff --git a/pydis_site/static/images/content/contributing/pycharm_pipenv_success.png b/pydis_site/static/images/content/contributing/pycharm_pipenv_success.png Binary files differindex 03fa3244..65ac2040 100644 --- a/pydis_site/static/images/content/contributing/pycharm_pipenv_success.png +++ b/pydis_site/static/images/content/contributing/pycharm_pipenv_success.png |