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

Turn TRaSH metadata rendering into a generic rendering step #92

Closed
Callum027 opened this issue Apr 10, 2023 · 0 comments · Fixed by #101
Closed

Turn TRaSH metadata rendering into a generic rendering step #92

Callum027 opened this issue Apr 10, 2023 · 0 comments · Fixed by #101
Assignees
Labels
enhancement New feature or request plugins Vendored plugin or plugin API-related issue or pull request
Milestone

Comments

@Callum027
Copy link
Member

Callum027 commented Apr 10, 2023

This would be a good way to clean up handling rendering of instance links and substituting resource IDs for names before update_remote is run.

  1. Move the TRaSH-Guides metadata folder into global state, rather than passing it as a parameter
  2. Add the following manager method, which will call into corresponding Config methods by default. The point of passing both the local and remote instance configs at the same time is to allow one set of requests to render both objects at once.
    class Manager(Generic[Config, Secrets]):
        def render_local_remote(self, secrets: Secrets, local_instance_config: Config, remote_instance_config: Config) -> Tuple[Config, Config]:
            return type(local_instance_config).render_local_remote(local_instance_config, remote_instance_config)
    • Or should this be a per-Config object render method? the corresponding requests would have to run twice, but it would be much simpler to implement.
@Callum027 Callum027 self-assigned this Apr 12, 2023
@Callum027 Callum027 added enhancement New feature or request plugins Vendored plugin or plugin API-related issue or pull request labels Apr 12, 2023
@Callum027 Callum027 added this to the v0.4.2 milestone Apr 12, 2023
@Callum027 Callum027 linked a pull request Apr 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugins Vendored plugin or plugin API-related issue or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant