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/logging #519

Merged
merged 59 commits into from
Aug 19, 2024
Merged

Refactor/logging #519

merged 59 commits into from
Aug 19, 2024

Conversation

schroedk
Copy link
Collaborator

@schroedk schroedk commented Aug 9, 2024

The proposed logging is described here.

This refactoring introduces the following abstractions:

  • LogOptions (implementation SQLiteLogOptions), configuration
  • LogStore(implementation _SQLiteLogStore, not exposed), write access
  • LogReader (implementation SQLiteLogReader), read access

The old class OptimizationLogReader redirects to SQLiteLogReader in a backward-compatible way.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@schroedk schroedk changed the base branch from main to 0.5.0 August 9, 2024 14:09
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 94.16283% with 38 lines in your changes missing coverage. Please review.

Project coverage is 90.90%. Comparing base (354155d) to head (3d815fc).
Report is 1 commits behind head on 0.5.0.

Files Patch % Lines
src/optimagic/logging/base.py 85.71% 11 Missing ⚠️
src/optimagic/logging/logger.py 95.34% 10 Missing ⚠️
src/optimagic/logging/sqlalchemy.py 95.56% 7 Missing ⚠️
src/optimagic/typing.py 84.09% 7 Missing ⚠️
src/optimagic/optimization/multistart.py 71.42% 2 Missing ⚠️
...imagic/optimization/create_optimization_problem.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            0.5.0     #519      +/-   ##
==========================================
+ Coverage   90.71%   90.90%   +0.18%     
==========================================
  Files         106      107       +1     
  Lines       10364    10644     +280     
==========================================
+ Hits         9402     9676     +274     
- Misses        962      968       +6     

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

Copy link
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

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

I am through now. Thanks a lot for this PR!

One thing that is left to do is adding a logger field to the OptimizeResult.

src/optimagic/logging/__init__.py Outdated Show resolved Hide resolved
src/optimagic/logging/types.py Show resolved Hide resolved
src/optimagic/logging/types.py Outdated Show resolved Hide resolved
src/optimagic/logging/logger.py Show resolved Hide resolved
src/optimagic/logging/logger.py Outdated Show resolved Hide resolved
@schroedk
Copy link
Collaborator Author

I am through now. Thanks a lot for this PR!

One thing that is left to do is adding a logger field to the OptimizeResult.

Done

tests/optimagic/test_deprecations.py Show resolved Hide resolved
src/optimagic/typing.py Show resolved Hide resolved
src/optimagic/logging/types.py Outdated Show resolved Hide resolved
Copy link
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

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

Thanks a lot! From my side this is ready to merge!

@schroedk schroedk merged commit 24e44a7 into 0.5.0 Aug 19, 2024
16 checks passed
@schroedk schroedk deleted the refactor/logging branch August 19, 2024 14:07
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.

2 participants