8000 Fix: Improper reinitialization of maintenance event timing by RHammond2 · Pull Request #181 · WISDEM/WOMBAT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Improper reinitialization of maintenance event timing #181

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

Merged
merged 10 commits into from
Apr 4, 2025

Conversation

RHammond2
Copy link
Collaborator

Fix: Improper reinitialization of maintenance event timing

This PR fixes an uncaught bug in the development of the date-based maintenance feature released in 0.10. When a subassembly is replaced, the conversion of the user input to a timeout schedule was triggered again. This reinitialization caused runs to fail because of improper type interactions. This update ensures the setup logic is only run at subassembly initialization.

PR Checklist

  • RELEASE.md has been updated to describe the changes made in this PR
  • Documentation - N/A
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary - N/A
    • Documentation has been rebuilt successfully - N/A
    • Examples have been updated - N/A
  • Tests pass (If not, and this is expected, please elaborate in the tests section)
  • PR description thoroughly describes the new feature, bug fix, etc.

Related issues

N/A

Impacted areas of the software

  • Updates buffer for maintenance events
    • test/test_subassembly.py
    • test/test_data_classes.py
    • test/test_cable.py`
  • Ensures maintenance is initialized once
    • wombat/windfarm/system/cable.py
    • wombat/windfarm/system/subassembly.py
  • wombat/core/environment.py: fixes a future warning for pandas offsets
  • wombat/core/data_classes.py: change buffer from 1 hour to 1 day

Additional supporting information

Python version: 3.x
WOMBAT version (wombat.__version__): 0.x

Test results, if applicable

@RHammond2 RHammond2 added the bug Something isn't working label Apr 4, 2025
@RHammond2 RHammond2 merged commit 38811ce into main Apr 4, 2025
6 checks passed
@RHammond2 RHammond2 deleted the fix/relativedelta-int branch April 4, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0