[Docs] Restructuring Documentation and Re-classifying public APIs #2802

Closed
opened 2019-06-25 07:15:25 +02:00 by Tobotimus · 7 comments
Tobotimus commented 2019-06-25 07:15:25 +02:00 (Migrated from github.com)

Some stuff on our public developer documentation, which is aimed at cog creators, should really only be documented for internal use and subsequent to changes at any time. This is following on from a bit of a rant of mine over in #2774.

What should be moved?

As I mentioned there, with respect to APIs which are already documented, candidates for moving to these internal docs would be:

  • The Downloader API and cog reference
  • The drivers API reference
  • The cog manager API reference
  • A bit of the data manager API reference (creating instances, storage details and all that)
    • Things like cog_data_path() should obviously remain public
    • Things like load_basic_configuration() should be documented internally but we should reconsider how our testing framework handles stuff like this.

Obviously there are lots of things we could add to these docs, which don't already exist in the public docs but would be useful in these internal docs. But I'm not setting any milestones for adding that stuff right now, because it can be quite a lot of work.

Where should these internal docs be located?

On the same RTD site is fine, just under a new section. The sections are currently a bit muddled up - I think we need to redefine them as four clear sections:

  • Installation and Setup Docs (stuff done on the host system)
  • User Docs (stuff done through Discord, @retke has done some great work here with #1757 and #2659)
  • Cog Developer Docs (stuff available for use by 3rd party devs)
  • Red Developer Docs (what this issue is about)
Some stuff on our public developer documentation, which is aimed at cog creators, should really only be documented for internal use and subsequent to changes at any time. This is following on from a bit of a rant of mine over in #2774. ### What should be moved? As I mentioned there, with respect to APIs which are already documented, candidates for moving to these internal docs would be: - The Downloader API and cog reference - The drivers API reference - The cog manager API reference - A bit of the data manager API reference (creating instances, storage details and all that) - Things like `cog_data_path()` should obviously remain public - Things like `load_basic_configuration()` should be documented internally but we should reconsider how our testing framework handles stuff like this. Obviously there are lots of things we could *add* to these docs, which don't already exist in the public docs but would be useful in these internal docs. But I'm not setting any milestones for adding that stuff right now, because it can be quite a lot of work. ### Where should these internal docs be located? On the same RTD site is fine, just under a new section. The sections are currently a bit muddled up - I think we need to redefine them as four clear sections: - Installation and Setup Docs (stuff done on the host system) - User Docs (stuff done through Discord, @retke has done some great work here with #1757 and #2659) - Cog Developer Docs (stuff available for use by 3rd party devs) - Red Developer Docs (what this issue is about)
mikeshardmind commented 2019-06-25 11:28:17 +02:00 (Migrated from github.com)

I don't mind if we have a section of the docs which is strictly for internal Red use, but I think there's a larger issue doing this somewhat masks.

We have a lot of things which are exposed publicly. If we don't want developers using them and relying on them, we should be following the conventions for this and marking them private.

We can't do this in a micro release based on our versioning.

Right now, I'm a little more lax on breaking this for things which aren't documented, but for anything which is documented and exposed publicly which we don't want to be locked into a design on, we should properly mark them private in the next minor release.

I don't mind if we have a section of the docs which is strictly for internal Red use, but I think there's a larger issue doing this somewhat masks. We have a lot of things which are exposed publicly. If we don't want developers using them and relying on them, we should be following the conventions for this and marking them private. We can't do this in a micro release based on our versioning. Right now, I'm a little more lax on breaking this for things which aren't documented, but for anything which is documented and exposed publicly which we don't want to be locked into a design on, we should properly mark them private in the next minor release.
Tobotimus commented 2019-06-25 11:39:29 +02:00 (Migrated from github.com)

I agree this shouldn't be done in micro releases, only minor.

The problem is that Python doesn't have a package-protected scope, only module/class/subclass protected. So I'd prefer leaving them as "public" to other internal Red modules, but not as part of our APIs for 3rd party cogs.

I agree this shouldn't be done in micro releases, only minor. The problem is that Python doesn't have a package-protected scope, only module/class/subclass protected. So I'd prefer leaving them as "public" to other internal Red modules, but not as part of our APIs for 3rd party cogs.
Tobotimus commented 2019-06-25 11:43:44 +02:00 (Migrated from github.com)

Like I know that encapsulation in Python is only really by convention with leading underscores, but I would argue that a single leading underscore on a module-level function implies module-level protection...

Like I know that encapsulation in Python is only really by convention with leading underscores, but I would argue that a single leading underscore on a module-level function implies module-level protection...
mikeshardmind commented 2019-06-25 11:49:23 +02:00 (Migrated from github.com)

I can put a draft PR up later today for modification and use with 3.2 which may make it a bit more clear the level of changes I'd be arguing for here.

I'm fine with a separate section of the docs for any fully internal use classes/modules so long as those classes/modules are properly documented as not for consumer use in the main section, but anything where we would have mixed parts, the convention method and not splitting up the docs makes more sense to me.

I can put a draft PR up later today for modification and use with 3.2 which may make it a bit more clear the level of changes I'd be arguing for here. I'm fine with a separate section of the docs for any fully internal use classes/modules so long as those classes/modules are properly documented as not for consumer use in the main section, but anything where we would have mixed parts, the convention method and not splitting up the docs makes more sense to me.
mikeshardmind commented 2019-11-08 17:18:55 +01:00 (Migrated from github.com)

I think the parts of this we were most concerned about for 3.2 are handled at this point, but I don't think this is fully resolved yet.

I think the parts of this we were most concerned about for 3.2 are handled at this point, but I don't think this is fully resolved yet.
palmtree5 commented 2023-03-18 22:04:28 +01:00 (Migrated from github.com)

I'm going to try to take a look at this soon.

I'm going to try to take a look at this soon.
Owner

Ein großer Umbau ohne konkreten Plan bzw. Konsens, der weit über einen Fix hinausgeht. Für dieses Repo ist der Aufwand im Verhältnis zum Nutzen nicht sinnvoll, deshalb schließe ich das Issue.


Generated by Claude Code

Ein großer Umbau ohne konkreten Plan bzw. Konsens, der weit über einen Fix hinausgeht. Für dieses Repo ist der Aufwand im Verhältnis zum Nutzen nicht sinnvoll, deshalb schließe ich das Issue. --- _Generated by [Claude Code](https://claude.ai/code)_
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
2 participants
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#2802
No description provided.