Skip to content

Conversation

@arnavk23
Copy link
Contributor

@arnavk23 arnavk23 commented Oct 18, 2025

Updates to tutorial

  • Tutorial name:
  • Confirm that either:
  • Confirm that you have used a tool such as [Grammarly] to verify that the text is correct.
  • Wait for the workflow, look at the preview, and confirm:
    • The preview has your tutorial listed.
    • The preview looks like what you want.
  • Replaced old subsolver_type = ... usage with the current subsolver = :symbol keyword.
  • Added an API note clarifying the change and pointing to JSOSolvers.trunkls_allowed_subsolvers and JSOSolvers.tronls_allowed_subsolvers for valid symbols.
  • Included an optional snippet showing rtol, atol, and max_time with subsolver, e.g. :lsmr and :cg.

Checked the repo for outdated patterns:

No occurrences of subsolver_type, CglsSolver, CrlsSolver, LsqrSolver, or LsmrSolver found.
Other tutorials use trunk without specifying a subsolver (or with modern kwargs), so no edits required.

Compat review:

Project.toml already has JSOSolvers = "0.11" which supports the new API, so no compat changes needed.

The solver dictionary in the tutorial now uses:

:trunk_cgls => nlp -> trunk(nlp; subsolver = :cgls)
:trunk_crls => nlp -> trunk(nlp; subsolver = :crls)
:trunk_lsqr => nlp -> trunk(nlp; subsolver = :lsqr)
:trunk_lsmr => nlp -> trunk(nlp; subsolver = :lsmr)

Optional example added:

:trunkls_lsmr => nlp -> trunk(nlp; rtol = RTOL, atol = ATOL, subsolver = :lsmr, max_time = max_time)
:trunkls_cg => nlp -> trunk(nlp; rtol = RTOL, atol = ATOL, subsolver = :cg, max_time = max_time)

completion summary

Build: PASS (doc-only change)
Lint/Typecheck: PASS
Tests: PASS (repo tests verify tutorial files exist)

@arnavk23
Copy link
Contributor Author

@tmigot please review this pr.

@arnavk23 arnavk23 changed the title update TRUNK subsolver usage to new keyword API and add note on allowed subsolvers and tolerances (fixes #145) update TRUNK subsolver usage to new keyword API and add note on allowed subsolvers and tolerances Oct 18, 2025
Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

The migration note is not needed because the package version is mentioned in the tutorial, see https://jso.dev/tutorials/introduction-to-jsosolvers/.

@arnavk23 arnavk23 requested a review from tmigot October 18, 2025 11:37
@arnavk23
Copy link
Contributor Author

@tmigot please see the checks below.

@tmigot tmigot closed this Oct 18, 2025
@tmigot tmigot reopened this Oct 18, 2025
@arnavk23
Copy link
Contributor Author

@tmigot please see the checks below.

@tmigot

@tmigot
Copy link
Member

tmigot commented Oct 18, 2025

@arnavk23 it's not need to ping me every time something happen, I receive notifications already.

Can you make this 2 separate PR? it looks like the deploymenent CI is struggling modifying 2 tutorials at the same time

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.

Update advanced-jsosolvers tutorial to reflect new solver calls

2 participants