Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split public and private data manager APIs into separate modules #6023

Open
wants to merge 2 commits into
base: V3/develop
Choose a base branch
from

Conversation

Jackenmen
Copy link
Member

@Jackenmen Jackenmen commented Apr 15, 2023

Description of the changes

  • Replace the instance_name variable that wasn't part of 3.5's public API (nor were they clearly defined to be part of the public API in 3.4) of the data_manager module and supersede it with a public instance_name() function returning the same value
  • Split out some of the data_manager APIs that don't really have a sensible use outside our own code into a _-prefixed module (basic_config, basic_config_default, appdir, config_dir load_existing_config(), config_file, create_temp_config(), load_basic_configuration() have been moved to redbot.core._data_manager)
  • Moved logic from _base_data_path() directly to data_path() and use that everywhere in the module instead

I was also forced to move cli_level_to_log_level() from internal utils to redbot.core.cli due to a circular import. This is a better location for it anyway, especially since redbot.core._cli is now private as well.

Have the changes in this PR been tested?

Yes

@Jackenmen Jackenmen added Type: Enhancement Something meant to enhance existing Red features. Breaking Change Will potentially break some cogs. labels Apr 15, 2023
@github-actions github-actions bot added Category: Cogs - Audio This is related to the Audio cog. Category: Core - API - Config This is related to the `redbot.core.config` module and `redbot.core.drivers` package. Category: Core - API - Other This is related to core APIs that don't have a dedicated label. Category: Core - Bot Commands This is related to core commands (Core and CogManagerUI cog classes). Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). Category: Core - Other Internals This is related to core internals that don't have a dedicated label. Category: Meta This is related to the repository maintenance. labels Apr 15, 2023
@Jackenmen Jackenmen added this to the 3.5.1 milestone Apr 15, 2023
@Jackenmen Jackenmen force-pushed the data_manager_api_changes_for_rarely_used branch from def7152 to 1f8deb2 Compare May 8, 2023 09:58
@Jackenmen Jackenmen removed the Breaking Change Will potentially break some cogs. label May 8, 2023
@github-actions github-actions bot removed the Category: Core - API - Config This is related to the `redbot.core.config` module and `redbot.core.drivers` package. label May 8, 2023
@Jackenmen Jackenmen changed the title Document and clarify publicity of rarely used data_manager APIs Split public and private data manager APIs May 8, 2023
@Jackenmen Jackenmen force-pushed the data_manager_api_changes_for_rarely_used branch 2 times, most recently from d99efdf to e6a9a8d Compare May 10, 2023 15:01
@Jackenmen Jackenmen force-pushed the data_manager_api_changes_for_rarely_used branch from e6a9a8d to 6266503 Compare May 10, 2023 15:06
@Jackenmen Jackenmen changed the title Split public and private data manager APIs Split public and private data manager APIs into separate modules May 11, 2023
@Jackenmen Jackenmen modified the milestones: 3.5.3, 3.5.2 May 11, 2023
@Jackenmen Jackenmen modified the milestones: 3.5.2, 3.6.0, 3.5.3 May 12, 2023
@Jackenmen Jackenmen removed this from the 3.5.6 milestone Mar 18, 2024
@Jackenmen Jackenmen added this to the 3.5.7 milestone Mar 18, 2024
@Jackenmen Jackenmen modified the milestones: 3.5.9, 3.5.10 Apr 20, 2024
@Jackenmen Jackenmen modified the milestones: 3.5.14, 3.5.x Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Cogs - Audio This is related to the Audio cog. Category: Core - API - Other This is related to core APIs that don't have a dedicated label. Category: Core - Bot Commands This is related to core commands (Core and CogManagerUI cog classes). Category: Core - Command-line Interfaces This is related to Red's CLIs (redbot, redbot-launcher, redbot-setup). Category: Core - Other Internals This is related to core internals that don't have a dedicated label. Category: Meta This is related to the repository maintenance. Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant