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

smart charging: updated validation to be explicit when conforming profile #815

Conversation

couryrr-afs
Copy link
Contributor

@couryrr-afs couryrr-afs commented Sep 26, 2024

Describe your changes

As part of the validation there are times, per the standard, that a profile needs to be modified to conform to the spec. During the initial pass we had this logic in validate methods and did not explicitly state that the modification was occurring.

  • renamed validate_profile to conform_and_validate_profile in order to convey the potential for change.
  • renamed validate_and_add_profile to conform_validate_and_add_profile in order to convey the potential for change.
  • added method conform_validity_periods to better show where the change is occurring.
  • added comment as to why the conform is being performed.
  • added logging to show the values that are being set.
  • added a new conform_schedule_number_phases function moving existing modification of the number of phases.
  • updated some methods to use const on profiles where attributes are not being modified.

Issue ticket number and link

Checklist before requesting a review

@couryrr-afs
Copy link
Contributor Author

@shankari - this is ready for your review

@barsnick barsnick changed the title smart charging: updated validation to be explictit when conforming profile smart charging: updated validation to be explicit when conforming profile Sep 27, 2024
Copy link

@shankari shankari left a comment

Choose a reason for hiding this comment

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

There is one more change not listed in the summary

  • pull out the modification for the number of phases into a new conform_schedule_number_phases function.

This comment can serve to highlight that.
LGTM!

@Pietfried
Copy link
Contributor

Reopened PR to allow push of potential changes: #838

@Pietfried Pietfried closed this Oct 16, 2024
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.

3 participants