Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update scaling argument handling #508

Merged
merged 20 commits into from
Aug 2, 2024
Merged

Update scaling argument handling #508

merged 20 commits into from
Aug 2, 2024

Conversation

timmens
Copy link
Member

@timmens timmens commented Jul 30, 2024

In this PR, I update the scaling argument handling.

  • Throw deprecation warnings if scaling_options argument is used
  • Allow to pass ScalingOptions to scaling argument
  • Pre-process scaling input and throw errors if it fails
  • Update documentation
  • Inline code from check_arguments.py
  • Update scale converter

Note

I chose to stick with the ScalingOptionsDict, as it gives you autocomplete in the editor. See below.

image

@timmens timmens requested a review from janosg August 1, 2024 17:47
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.

Very nice but gave me some additional ideas we need to discuss.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 82.08955% with 24 lines in your changes missing coverage. Please review.

Please upload report for BASE (0.5.0@75fa2f2). Learn more about missing BASE report.

Files Patch % Lines
...imagic/optimization/create_optimization_problem.py 62.00% 19 Missing ⚠️
src/optimagic/parameters/scale_conversion.py 88.57% 4 Missing ⚠️
src/optimagic/parameters/scaling.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             0.5.0     #508   +/-   ##
========================================
  Coverage         ?   90.37%           
========================================
  Files            ?      102           
  Lines            ?     9493           
  Branches         ?        0           
========================================
  Hits             ?     8579           
  Misses           ?      914           
  Partials         ?        0           

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

@timmens timmens merged commit cbbdd61 into 0.5.0 Aug 2, 2024
16 checks passed
@timmens timmens deleted the update-scaling branch August 2, 2024 13:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants