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

Refactor physical constants variables with dataclasses #122

Open
papantel opened this issue Dec 7, 2023 · 0 comments
Open

Refactor physical constants variables with dataclasses #122

papantel opened this issue Dec 7, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@papantel
Copy link

papantel commented Dec 7, 2023

_commons.py file contains several constants.

To manage this kind of constants in a clearer way, it is possible to define one dataclass by element (lead, bismuth, lbe), and one attribute by constant.

Example:

@dataclass(frozen=True)
class LeadConstants:
    melting_temperature: float = 600.6  # K
    ...

TODO : check if it’s as optimized as direct variables declarations.

@panDanieleN panDanieleN added the enhancement New feature or request label Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants