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

feat: add update method to update configs from other models #16

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

jedel1043
Copy link
Contributor

This makes it really easy to change a set of configs without having to set the properties one by one.

@NucciTheBoss NucciTheBoss self-requested a review August 28, 2024 14:03
Copy link
Member

@NucciTheBoss NucciTheBoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this. Having proper update functionality for the data models will be super helpful for writing good, clean code.

I just a few comments around the implementation. In it's current form, we'll encounter some semantic issues, especially with the Node, FrontendNode, Partitions, etc data models. Let me know if you have any questions; our discussion here will help make slurmutils more robust!

slurmutils/models/model.py Show resolved Hide resolved
slurmutils/models/model.py Outdated Show resolved Hide resolved
slurmutils/models/slurm.py Outdated Show resolved Hide resolved
slurmutils/models/slurm.py Outdated Show resolved Hide resolved
slurmutils/models/model.py Outdated Show resolved Hide resolved
@jedel1043 jedel1043 changed the title feat: add override method to combine configs feat: add update method to update configs from other models Aug 28, 2024
@jedel1043 jedel1043 requested a review from NucciTheBoss August 28, 2024 23:07
Copy link
Member

@NucciTheBoss NucciTheBoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This great! Nice changes 🤩

Just two comments and then I am good to merge this PR. Note that we'll also need to bump the version of slurmutils in pyproject.toml.

slurmutils/models/model.py Outdated Show resolved Hide resolved
slurmutils/models/model.py Outdated Show resolved Hide resolved
Rename override to update so that the `update` method is properly overrided in inheriting data models.
Use current `slurmutils` terminology in docstring
@NucciTheBoss NucciTheBoss added the Type: Enhancement Proposes a new feature to be added to the project. label Aug 29, 2024
@NucciTheBoss NucciTheBoss self-requested a review August 29, 2024 14:13
Copy link
Member

@NucciTheBoss NucciTheBoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this @jedel1043 🚀

Great to see slurmutils maturing like it is!

@NucciTheBoss NucciTheBoss merged commit c874537 into charmed-hpc:main Aug 29, 2024
3 checks passed
@jedel1043 jedel1043 deleted the override_config branch August 29, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Proposes a new feature to be added to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants