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

Remove Configuration.on_change() #1609

Closed
wants to merge 2 commits into from

Conversation

bartfeenstra
Copy link
Owner

@bartfeenstra bartfeenstra commented Jun 22, 2024

To do

  • Consider fixing Core component decoupling #1145 here as well
  • Add a message to the App configuration GUI window that changes will not take effect until the app is reloaded?
  • Add a method to ProjectWindow to trigger a project change.
  • Ensure configuration widgets receive this event. How to propagate this simply and easily? Given grandparent, parent, and child widgets where only the grandparent and (grand)child are ProjectAwareMixin, how to set the new project?
  • Add Configuration.update_transaction() (name tbd) that is a context manager

@bartfeenstra bartfeenstra added enhancement New feature or request BC break Breaks backwards compatibility with existing integrations python Pull requests that update Python code labels Jun 22, 2024
Copy link

Uploaded Betty for commit d0b612c. You can download it, test it, and post your feedback in a comment to this pull request 💕

These downloads will stop working when the pull request is closed.

@bartfeenstra
Copy link
Owner Author

    def clone(self) -> Self:
        """
        Clone the configuration into a new instance.

        This is a deep clone/copy for any data structures that are copied by
        reference and are owned by this instance, including but not limited to:
        - other :py:class:`betty.config.Configuration` instances
        - standard Python data structures such as lists and dictionaries
        Data structures that are copied by reference by are **not** owned by this
        instance **MUST NOT** be cloned/copied.

        Clones **MUST** be identical. This means that any dependencies, including
        environment variables, **MUST** be injected.
        """
        raise NotImplementedError(repr(self))

@bartfeenstra bartfeenstra force-pushed the remove-configuration-on-change branch from d0b612c to 03fbb78 Compare June 27, 2024 02:13
Copy link

Uploaded Betty for commit a53543b. You can download it, test it, and post your feedback in a comment to this pull request 💕

These downloads will stop working when the pull request is closed.

Copy link

Uploaded Betty for commit b65e43a. You can download it, test it, and post your feedback in a comment to this pull request 💕

These downloads will stop working when the pull request is closed.

Copy link

Uploaded Betty for commit f4cdff4. You can download it, test it, and post your feedback in a comment to this pull request 💕

These downloads will stop working when the pull request is closed.

Copy link

Uploaded Betty for commit 9007387. You can download it, test it, and post your feedback in a comment to this pull request 💕

These downloads will stop working when the pull request is closed.

@bartfeenstra bartfeenstra force-pushed the remove-configuration-on-change branch 2 times, most recently from 39d029f to 72bfc37 Compare June 28, 2024 23:04
@bartfeenstra bartfeenstra force-pushed the remove-configuration-on-change branch from 72bfc37 to eb547de Compare June 28, 2024 23:18
@bartfeenstra bartfeenstra deleted the remove-configuration-on-change branch July 6, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC break Breaks backwards compatibility with existing integrations enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant