[V3] Add requirements file for setting up dev environment #1638

Closed
Tobotimus wants to merge 4 commits from V3/dev_install into V3/develop
Tobotimus commented 2018-05-13 13:57:29 +02:00 (Migrated from github.com)

Update: Superseded by #1642

Type

  • Meta enhancement

Description of the changes

This adds the dev_install.txt requirements file I've discussed in #1636. It makes setting up a development environment for Red as simple as pip install -r dev_install.txt.

I've also modified the Travis config to use this new requirements file for the installation phase.

Update: Superseded by #1642 ### Type - Meta enhancement ### Description of the changes This adds the `dev_install.txt` requirements file I've discussed in #1636. It makes setting up a development environment for Red as simple as `pip install -r dev_install.txt`. I've also modified the Travis config to use this new requirements file for the installation phase.
palmtree5 (Migrated from github.com) reviewed 2018-05-13 13:57:29 +02:00
tekulvw (Migrated from github.com) reviewed 2018-05-13 13:57:29 +02:00
Twentysix26 (Migrated from github.com) reviewed 2018-05-13 13:57:29 +02:00
Kowlin (Migrated from github.com) reviewed 2018-05-13 13:57:29 +02:00
tekulvw commented 2018-05-14 04:08:43 +02:00 (Migrated from github.com)

There is a relatively new tool out there called "Pipenv". This tool is the officially recommended packaging tool according to the Python packaging authority (the guys who maintain PyPI) and has a few benefits over simply declaring the development libraries in a "dev_install.txt" file.

First, Pipenv allows us to declare dependencies for both production and development use, using the new modifiers introduced in PEP 508. Pipenv also allows us to "lock" those dependencies to a particular version and which means we can make lists of dependencies that are known to work. Once we have that list it's extremely easy to deterministically reproduce development or production environments that are guaranteed to work.

Pipenv also layers on top of Python virtual environments. So, when you install a list of dependencies using Pipenv, the tool also automatically creates a virtual environment from a recommended Python version. Activating the virtual environment is as simple as running pipenv shell in the project directory.

It is important to note the difference between a strict "packaging" tool and a "package manager". Pipenv is a packaging tool where pip is package manager. Pipenv does not have the ability to install the bot project from PyPI. Pipenv is instead used to recreate a development environment for users working on developing core bot code. For example, to use pipenv, you would first clone the bot project from GitHub, cd into the project directory, and run pipenv install --dev. Pipenv would then set up a clean virtual environment for you that has all of the dependencies necessary to perform bot development.

There is a relatively new tool out there called "Pipenv". This tool is the officially recommended packaging tool according to the Python packaging authority (the guys who maintain PyPI) and has a few benefits over simply declaring the development libraries in a "dev_install.txt" file. First, Pipenv allows us to declare dependencies for both production and development use, using the new modifiers introduced in PEP 508. Pipenv also allows us to "lock" those dependencies to a particular version and which means we can make lists of dependencies that are known to work. Once we have that list it's extremely easy to deterministically reproduce development or production environments that are guaranteed to work. Pipenv also layers on top of Python virtual environments. So, when you install a list of dependencies using Pipenv, the tool also automatically creates a virtual environment from a recommended Python version. Activating the virtual environment is as simple as running `pipenv shell` in the project directory. It is important to note the difference between a strict "packaging" tool and a "package manager". Pipenv is a packaging tool where pip is package manager. Pipenv does not have the ability to install the bot project from PyPI. Pipenv is instead used to recreate a development environment for users working on developing core bot code. For example, to use pipenv, you would first clone the bot project from GitHub, `cd` into the project directory, and run `pipenv install --dev`. Pipenv would then set up a clean virtual environment for you that has all of the dependencies necessary to perform bot development.
Tobotimus commented 2018-05-14 05:51:15 +02:00 (Migrated from github.com)

Superseded by #1642

Superseded by #1642

Pull request closed

Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!1638
No description provided.