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

[Closes #129] Fixes issue with deepcopy in composite model #130

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

teubert
Copy link
Contributor

@teubert teubert commented Dec 5, 2023

prog_server requires copying a model. This functionality is broken for composite model.

Fixed issue by moving more logic into setstate, which is called at construction and deepcopy (unlike init). Also added tests to catch this in the future

@teubert teubert added bug Something isn't working components: models project: SWS System Wide Safety Project labels Dec 5, 2023
Copy link

github-actions bot commented Dec 5, 2023

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

  • Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
  • Ensure that each PR adding a new feature should include a test verifying that feature.
  • All errors from static analysis must be resolved.
  • Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
  • Review the software benchmarking results (if there is a change) - will be added as comment on PR
  • Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
  • All warnings from static analysis must be reviewed and resolved - if deemed appropriate.

@teubert teubert linked an issue Dec 5, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (28dd429) 83.36% compared to head (51ce763) 83.41%.

Files Patch % Lines
src/progpy/composite_model.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #130      +/-   ##
==========================================
+ Coverage   83.36%   83.41%   +0.05%     
==========================================
  Files         100      100              
  Lines       10428    10462      +34     
==========================================
+ Hits         8693     8727      +34     
  Misses       1735     1735              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kjjarvis kjjarvis left a comment

Choose a reason for hiding this comment

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

Looks good and runs successfully

@teubert teubert merged commit 0980f8c into dev Dec 6, 2023
30 of 31 checks passed
@teubert teubert deleted the bugs/129-cannot-deep-copy-composite-model branch December 7, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working components: models project: SWS System Wide Safety Project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot deep copy composite model
3 participants