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

Update settings.py #654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update settings.py #654

wants to merge 1 commit into from

Conversation

digvijay-y
Copy link

Thread-Safe Singleton:
Uses a lock to ensure only one instance of Settings is created, even when accessed in a multithreaded environment.

Extendability:
Additional configuration parameters can easily be added as fields in the Settings dataclass.

Immutability:
The frozen=True parameter ensures the settings remain immutable after initialization.

Explain what problem this PR is resolving

Related Clickup or Jira tickets : ALEPH-XXX

Self proofreading checklist

  • Is my code clear enough and well documented
  • Are my files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • Database migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Changes

Explain the changes that were made. The idea is not to list exhaustively all the changes made (GitHub already provides a full diff), but to help the reviewers better understand:

  • which specific file changes go together, e.g: when creating a table in the front-end, there usually is a config file that goes with it
  • the reasoning behind some changes, e.g: deleted files because they are now redundant
  • the behaviour to expect, e.g: tooltip has purple background color because the client likes it so, changed a key in the API response to be consistent with other endpoints

How to test

Explain how to test your PR.
If a specific config is required explain it here (account, data entry, ...)

Print screen / video

Upload here print screens or videos showing the changes if relevant.

Notes

Things that the reviewers should know: known bugs that are out of the scope of the PR, other trade-offs that were made.
If the PR depends on a PR in another repo, or merges into another PR (i.o. main), it should also be mentioned here

Thread-Safe Singleton:
    Uses a lock to ensure only one instance of Settings is created, even when accessed in a multithreaded environment.

Extendability:
    Additional configuration parameters can easily be added as fields in the Settings dataclass.

Immutability:
    The frozen=True parameter ensures the settings remain immutable after initialization.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant