[Downloader/Core] Enforce naming conventions for packages, cogs and commands #4634
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#4634
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Feature request
To guarantee a smooth user experience and get a consistent behaviour when using Red, all naming conventions from the Cog Creator Guidelines should be enforced.
That means that
There was previous discussion to this issue here. It was brought up after a conversation with a red user here and here.
The current proposal is to enforce compliance with these guidelines within Red itself.
The option to enforce these guidelines only on approved CCs via QA was discussed but dropped in favor of a unified experience in the long run.
This will break the automatic updating of cogs when running
[p]cog update. Users using affected cogs would need to remove and re-add them once they follow the naming conventions.Select the type of feature you are requesting:
Update: I forgot to add links to the conversations
+1 from me on enforcing it at a framework level which will ensure a unified experience.
That said this issue is lacking some additional info.
The discussion summarized on @Twentysix26 and I, agreeing that Enforcing the following on a framework level will be the best experience long term.
Package names can only be loaded if they are lowercase.
Cogs can only be loaded if they are CamelCase.
Commands can only be added if they are lowercase.
Adding these 3 restriction to the framewor will ensure a uniform user experience where all commands, cogs and packages behave in the same manner.
The downsides is reducing the potential namescape for commands, cogs and packages, but given that any variation here will make it for a very confusing user experience, the downside doesn't outweight the positives on this enforcement.
EDIT:
I have no stake in this but I am strictly opposed at the Anglocentricism in requiring identifiers and names to be in English. Python and the library both allow other language identifiers for users of languages other than English, including those in the CJK space.
I am going to sound off here that I am not in favor of enforcing these within Red itself. It restricts cog creator freedom too much. If a cog creator chooses to go against convention on their own users may request from the author themselves to change to make things an easier experience for them. However, it's entirely on the author of the cogs to support user experience and not something Red should deal with. Red deals with Red, cog creators deal with their own cogs and the user experience on them.
I would just like to chime in here,
Guidelines For Cog Creatorswas never a strictly enforced document, it was just meant as a starting point for CCs to write good code for their review.What will be enforced is the new Cog Creator Policy (and the docs entry I am going to PR probably later this weekend), however that does not have any mention of the casing of cogs or commands.
I am not for enforcing this via QA, as QA's job for CC apps is being focused around ensuring that code is safe and functional, not that it follows convention or has good UX.
As for enforcing this in downloader/core, I don't think it is worth the breaking change and explaining to users/CCs why this is happening just for some better UX the CC could decided to do in the first place.
Thanks for making the issue but based on the previous maintainer comments here, this is something that we are not interested in pursuing.