Skip to content

Conversation

@alyst
Copy link
Contributor

@alyst alyst commented Jan 27, 2026

Extracted from #245 -- moving all engine-specific code (types) into extensions for modularity and leaner API, updating docstrings to make all optimizer help available for the user.

Requires #245 to be merged first.

@alyst alyst mentioned this pull request Jan 27, 2026
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 40.00000% with 45 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.68%. Comparing base (8b0f880) to head (da33a89).
⚠️ Report is 58 commits behind head on devel.

Files with missing lines Patch % Lines
src/optimizer/abstract.jl 11.76% 15 Missing ⚠️
ext/SEMProximalOptExt/ProximalAlgorithms.jl 25.00% 12 Missing ⚠️
src/frontend/fit/SemFit.jl 0.00% 6 Missing ⚠️
ext/SEMNLOptExt/NLopt.jl 83.33% 4 Missing ⚠️
src/optimizer/optim.jl 50.00% 4 Missing ⚠️
src/frontend/fit/summary.jl 0.00% 2 Missing ⚠️
src/optimizer/Empty.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #299      +/-   ##
==========================================
- Coverage   72.94%   71.68%   -1.27%     
==========================================
  Files          50       51       +1     
  Lines        2218     2225       +7     
==========================================
- Hits         1618     1595      -23     
- Misses        600      630      +30     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

alyst and others added 13 commits January 27, 2026 12:45
It is a simple and intuitive syntax and avoids declaring new types.
Also allow specifying default constraint tolerance as `constraint_tol`.
use SemOptimizer(engine = :NLopt) instead of SemOptimizerNLopt()
as this is a more universal scheme
It works around docstring errors during SemOptimizer{:E} parsing.
Instead of engine-specific subtype as it might be not available
in the user session.
@alyst alyst force-pushed the refactor_semopt_api branch from fe23e46 to 8dacd43 Compare January 27, 2026 20:52
@alyst alyst marked this pull request as ready for review January 27, 2026 20:55
@alyst
Copy link
Contributor Author

alyst commented Jan 27, 2026

Rebased to the current devel

@Maximilian-Stefan-Ernst
Copy link
Collaborator

I opened alyst#4 to try to streamline the access of the docs a bit further - let me know what you think.

@alyst
Copy link
Contributor Author

alyst commented Feb 3, 2026

@Maximilian-Stefan-Ernst I've merged your PR into my branch, thank you!
I think I've fixed the remaining parts:

  • added SemOptimizer_impltype(engine) which just returns the type for the engine, so the optimizer_engine_doc() can be defined just once.
  • added the SemOptimizerResult abstract basic optimization wrapper type for all engines. The engines have to implement it. It expects the optimizer to be always present.
    It does not add much overhead for Optim.jl engine and allows nice cleanups for NLoptl, Proximal
  • fixed the generation of the docs for the extensions
  • renamed SemOptimizerName to SemOptimizerMyopt in the tutorial

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