Kill Pipfile, update dependencies, and add dep bumping tools #2806

Merged
Tobotimus merged 5 commits from V3/update_deps into V3/develop 2019-06-27 16:16:14 +02:00
Tobotimus commented 2019-06-26 08:40:18 +02:00 (Migrated from github.com)

So this is our dependency update PR, but it comes with a few presents.

Replacement for pipenv's environment setup

First of all, there's a new Make recipe for all devs and contributors on both Windows and Posix, make setupenv, which is kind of a replacement for pipenv install --dev. It creates a virtual environment in .venv using the inbuilt venv module, clearing out any existing virtual environment if needed first. Then it installs all dev dependencies using our new dev-requirements.txt file. CONTRIBUTING.md has been updated to reflect all of this.

Dependency version bumping tool

Secondly, I've added a python script, tools/bumpdeps.py to help with bumping dependency versions. It has its own Make recipe too, make bumpdeps. This script won't work on Windows (yet). It reads the tools/primary_deps.ini file, which contains the primary requirements of Red and its extras with loose version specifiers, and outputs all pinned dependencies, in setup.cfg format. It's not a foolproof dependency resolver, it's quite simple, but it's bound to help out a lot. It'll try to give warnings if there might be a version conflict, but updating setup.cfg with its output and then doing pip install -r dev-requirements.txt will allow pip to issue warnings if something is conflicting.

So to add a new dependency, add it to tools/primary_deps.ini in the appropriate place, and either use make bumpdeps to completely update all dependencies, or simply add it to setup.cfg manually with its sub-dependencies, and all versions pinned.

Sphinx 2.1.2 (docs changes)

The sphinx update brought along the ability to disable type annotations being rendered in function and method signatures, and I have gladly gone and done that. Type annotations should already be specified under the "Parameters" section, and the way sphinx renders them in function signatures makes them much harder to read.

Also, documented classes will now display what classes they inherit from.

So this is our dependency update PR, but it comes with a few presents. ### Replacement for pipenv's environment setup First of all, there's a new Make recipe for all devs and contributors on both Windows and Posix, `make setupenv`, which is kind of a replacement for `pipenv install --dev`. It creates a virtual environment in `.venv` using the inbuilt `venv` module, clearing out any existing virtual environment if needed first. Then it installs all dev dependencies using our new `dev-requirements.txt` file. `CONTRIBUTING.md` has been updated to reflect all of this. ### Dependency version bumping tool Secondly, I've added a python script, `tools/bumpdeps.py` to help with bumping dependency versions. It has its own Make recipe too, `make bumpdeps`. This script won't work on Windows (yet). It reads the `tools/primary_deps.ini` file, which contains the primary requirements of Red and its extras with loose version specifiers, and outputs all pinned dependencies, in `setup.cfg` format. It's not a foolproof dependency resolver, it's quite simple, but it's bound to help out a lot. It'll try to give warnings if there might be a version conflict, but updating `setup.cfg` with its output and then doing `pip install -r dev-requirements.txt` will allow pip to issue warnings if something is conflicting. So to add a new dependency, add it to `tools/primary_deps.ini` in the appropriate place, and either use `make bumpdeps` to completely update all dependencies, or simply add it to `setup.cfg` manually with its sub-dependencies, and all versions pinned. ### Sphinx 2.1.2 (docs changes) The sphinx update brought along the ability to disable type annotations being rendered in function and method signatures, and I have gladly gone and done that. Type annotations should already be specified under the "Parameters" section, and the way sphinx renders them in function signatures makes them much harder to read. Also, documented classes will now display what classes they inherit from.
palmtree5 (Migrated from github.com) reviewed 2019-06-26 08:40:18 +02:00
tekulvw (Migrated from github.com) reviewed 2019-06-26 08:40:18 +02:00
Twentysix26 (Migrated from github.com) reviewed 2019-06-26 08:40:18 +02:00
Jackenmen commented 2019-06-26 22:04:40 +02:00 (Migrated from github.com)

Could you add Pipfile and Pipfile.lock to .gitignore if we're not going to use it anymore? It will make life easier for people who will stick to using pipenv.

Could you add `Pipfile` and `Pipfile.lock` to `.gitignore` if we're not going to use it anymore? It will make life easier for people who will stick to using pipenv.
Tobotimus commented 2019-06-27 02:42:54 +02:00 (Migrated from github.com)

@jack1142 Done :)

@jack1142 Done :)
mikeshardmind (Migrated from github.com) approved these changes 2019-06-27 15:06:12 +02:00
mikeshardmind (Migrated from github.com) left a comment

I'm pretty sure this is good to go here from my testing. I'm not sure I like the makefile including a venv rebuild, but I can accept it and just not use it myself.

I'm pretty sure this is good to go here from my testing. I'm not sure I like the makefile including a venv rebuild, but I can accept it and just not use it myself.
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!2806
No description provided.