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 parametric schedules #1718

Merged
merged 25 commits into from
Apr 5, 2024
Merged

Refactor parametric schedules #1718

merged 25 commits into from
Apr 5, 2024

Conversation

eringold
Copy link
Collaborator

@eringold eringold commented Apr 2, 2024

Pull request overview

Refactors methods to better align model schedules with generated building hours of operation schedule and user inputs to OpenstudioStandards::Schedules.schedule_ruleset_set_hours_of_operation

Pull Request Author

  • Method changes or additions
  • Data changes or additions
  • Added tests for added methods
  • If methods have been deprecated, update rest of code to use the new methods
  • Documented new methods using yard syntax
  • Resolved yard documentation errors for new code (ran bundle exec rake doc)
  • Resolved rubocop syntax errors for new code (ran bundle exec rake rubocop)
  • All new and existing tests passes
  • If the code adds new require statements, ensure these are in core ruby or add to the gemspec

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a code review on GitHub
  • All related changes have been implemented: method additions, changes, tests
  • Check rubocop errors
  • Check yard doc errors
  • If fixing a defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If a new feature, test the new feature and try creative ways to break it
  • CI status: all green or justified

Copy link
Collaborator

@mdahlhausen mdahlhausen left a comment

Choose a reason for hiding this comment

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

  • Add unit tests to test_schedules_information.rb for these methods:
    • schedule_ruleset_get_annual_days_used
    • schedule_ruleset_get_schedule_day_rule_indices
  • Add unit tests to test_schedules_modify.rb for these methods:
    • schedule_day_populate_from_array_of_values
    • schedule_ruleset_create_rules_from_day_list
  • These methods in schedules/parametric.rb need parameter descriptions for the yard documentation:
    • gather_inputs_parametric_space_space_type_schedules
    • gather_inputs_parametric_schedules

@eringold eringold requested a review from mdahlhausen April 5, 2024 17:54
@eringold
Copy link
Collaborator Author

eringold commented Apr 5, 2024

@mdahlhausen all requested changes have been made.

- rename load_inst varaibles to space_load_instance
- rename gather_inputs_parametric_load_inst_schedules to space_load_instance_get_parametric_schedule_inputs
- rename gather_inputs_parametric_space_space_type_schedules to spaces_space_types_get_parametric_schedule_inputs
- rename gather_inputs_parametric_schedules to schedule_ruleset_get_parametric_inputs
@mdahlhausen mdahlhausen merged commit 2ec6da2 into master Apr 5, 2024
@mdahlhausen mdahlhausen deleted the parametric_refactor2 branch April 5, 2024 18:51
@ckirney ckirney mentioned this pull request Apr 5, 2024
16 tasks
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.

Parametric schedules can result in odd profiles
2 participants