Skip to content

Updated caching to use functools #211

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 3 commits into from
Apr 30, 2025
Merged

Updated caching to use functools #211

merged 3 commits into from
Apr 30, 2025

Conversation

teubert
Copy link
Contributor

@teubert teubert commented Apr 22, 2025

Small Change. Updating the caching feature in SimResult to use caching from internal functools

Generally using python features is preferred over implementing our own because it's often more efficient and reliable. Additionally, it's less logic to maintain.

Benchmarked change and it's about the same runtime (maybe slightly faster)

Copy link

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 marked this pull request as draft April 22, 2025 18:04
@teubert teubert marked this pull request as ready for review April 22, 2025 18:10
Copy link

@lymichelle21 lymichelle21 left a comment

Choose a reason for hiding this comment

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

LGTM - logically makes sense and passes test_sim_result

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.

Nice optimization. Tests run successfully

@teubert teubert merged commit d58d398 into dev Apr 30, 2025
33 checks passed
@teubert teubert deleted the feature/func_tools branch April 30, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants