[V3] Add requirements file for setting up dev environment #1638
No reviewers
Labels
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!1638
Loading…
Reference in a new issue
No description provided.
Delete branch "V3/dev_install"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Update: Superseded by #1642
Type
Description of the changes
This adds the
dev_install.txtrequirements file I've discussed in #1636. It makes setting up a development environment for Red as simple aspip install -r dev_install.txt.I've also modified the Travis config to use this new requirements file for the installation phase.
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 shellin 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,
cdinto the project directory, and runpipenv install --dev. Pipenv would then set up a clean virtual environment for you that has all of the dependencies necessary to perform bot development.Superseded by #1642
Pull request closed