diff --git a/.readthedocs.yml b/.readthedocs.yml index 1ba5d0f4b..e1054f7e6 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -7,9 +7,13 @@ build: jobs: create_environment: - asdf plugin add pixi - - asdf install pixi latest - - asdf global pixi latest + - asdf install pixi 0.83.0 + - asdf global pixi 0.83.0 + install: + - pixi install --locked -e docs post_build: - - pixi run -e docs build-docs + - pixi run --locked -e docs build-docs + # The exporter can log a failed Markdown subprocess without failing Sphinx. + - test -s docs/build/html/llms.txt - mkdir --parents $READTHEDOCS_OUTPUT/html/ - cp -a docs/build/html/. "$READTHEDOCS_OUTPUT/html" && rm -r docs/build diff --git a/docs/source/conf.py b/docs/source/conf.py index e61820ac0..65a04737a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -51,9 +51,16 @@ "sphinx_design", "sphinxcontrib.mermaid", "sphinx_llm.txt", - "sphinx_llms_txt", ] +# Reuse the HTML doctrees so Markdown generation does not execute notebooks again. +llms_txt_build_parallel = False +llms_txt_full_build = False +llms_txt_description = ( + "Documentation for optimagic, a Python package for numerical optimization." +) +markdown_http_base = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + myst_enable_extensions = [ "colon_fence", "dollarmath", @@ -174,6 +181,12 @@ # -- Options for myst-nb ---------------------------------------- nb_execution_mode = "force" # "off", "force", "cache", "auto" nb_execution_allow_errors = False +nb_execution_raise_on_error = True +# Preserve notebook text outputs in sphinx-llm's Markdown builder. +nb_mime_priority_overrides = [ + ("llms-markdown", "text/markdown", 10), + ("llms-markdown", "text/plain", 20), +] nb_merge_streams = True nb_scroll_outputs = True diff --git a/docs/source/how_to/how_to_add_optimizers.ipynb b/docs/source/how_to/how_to_add_optimizers.ipynb index 86f926743..82e466dd0 100644 --- a/docs/source/how_to/how_to_add_optimizers.ipynb +++ b/docs/source/how_to/how_to_add_optimizers.ipynb @@ -421,10 +421,13 @@ " needs_jac=False,\n", " # does the optimizer need the hessian? -> no, gaco is derivative free\n", " needs_hess=False,\n", + " # does the optimizer require finite bounds? -> yes\n", + " needs_bounds=True,\n", " # does the optimizer support parallelism? -> yes\n", " supports_parallelism=True,\n", " # does the optimizer support bounds? -> yes\n", " supports_bounds=True,\n", + " supports_infinite_bounds=False,\n", " # does the optimizer support linear constraints? -> no\n", " supports_linear_constraints=False,\n", " # does the optimizer support nonlinear constraints? -> no\n", diff --git a/docs/source/index.md b/docs/source/index.md index 20b5a20d5..d6fd69749 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -1,4 +1,4 @@ -# +# optimagic
diff --git a/pixi.lock b/pixi.lock index b7711dda6..b01f56ed4 100644 --- a/pixi.lock +++ b/pixi.lock @@ -1242,9 +1242,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-copybutton-0.5.2-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.7.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-0.3.0-pyhcf101f3_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llms-txt-0.7.1-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.9-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-1.1.0-pyh5ded981_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.11-pyh5ded981_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-bibtex-2.6.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-devhelp-2.0.0-pyhd8ed1ab_1.conda @@ -1444,9 +1443,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-copybutton-0.5.2-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.7.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-0.3.0-pyhcf101f3_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llms-txt-0.7.1-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.9-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-1.1.0-pyh5ded981_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.11-pyh5ded981_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-bibtex-2.6.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-devhelp-2.0.0-pyhd8ed1ab_1.conda @@ -1758,9 +1756,8 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-basic-ng-1.0.0b2-pyhd8ed1ab_3.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-copybutton-0.5.2-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-design-0.7.0-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-0.3.0-pyhcf101f3_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llms-txt-0.7.1-pyhd8ed1ab_0.conda - - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.9-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-1.1.0-pyh5ded981_1.conda + - conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.11-pyh5ded981_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-bibtex-2.6.5-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-devhelp-2.0.0-pyhd8ed1ab_1.conda @@ -18424,46 +18421,38 @@ packages: - pkg:pypi/sphinx-design?source=hash-mapping size: 931118 timestamp: 1769032711360 -- conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-0.3.0-pyhcf101f3_0.conda - sha256: 62a204b7010c815335901148d3ec3ea2d52e4a2a2de73c588bb4443fb1174d39 - md5: cf5ce83d6d7fab2e8b25c8054c8c5c7e +- conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llm-1.1.0-pyh5ded981_1.conda + sha256: 05f8332fb49c9ce322e8f111d1bd8370d5916cc7d7d2f0c11723d270e751d30c + md5: 84d1d11411403014ec4c15eafd43c92e depends: - - python >=3.10 + - python >=3.11 - sphinx-markdown-builder >=0.6.8 - sphinx >=5 + - markdown-it-py >=3 - python license: BSD-3-Clause license_family: BSD purls: - - pkg:pypi/sphinx-llm?source=hash-mapping - size: 29619 - timestamp: 1770380955944 -- conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-llms-txt-0.7.1-pyhd8ed1ab_0.conda - sha256: d57d93accf0fd40769eff17b84b30b5980b877240a393e3e83495f33eb282784 - md5: 6b170f1a7d5c1729073c354b2d0ac32d - depends: - - python >=3.10 - - sphinx - license: MIT - license_family: MIT - purls: - - pkg:pypi/sphinx-llms-txt?source=hash-mapping - size: 25685 - timestamp: 1765935234507 -- conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.9-pyhd8ed1ab_0.conda - sha256: 7dc51fc9ed3ad36a60ba5130e3cd3701cec0584f2661ef0c4b4c3331754f3749 - md5: 00e2c326b6fd0c0a48d2580ae08ca748 + - pkg:pypi/sphinx-llm?source=compressed-mapping + run_exports: {} + size: 79985 + timestamp: 1789999393156 +- conda: https://conda.anaconda.org/conda-forge/noarch/sphinx-markdown-builder-0.6.11-pyh5ded981_1.conda + sha256: ec6d80fbcf8d7c6d69198278386afa8b2a98c35971cdf1a2eab18167b8393e91 + md5: bde76da7789d94a15b7d570b41535f93 depends: - - docutils - - python >=3.10 + - python >=3.11 - sphinx >=5.1.0 - tabulate + - docutils + - python license: MIT license_family: MIT purls: - pkg:pypi/sphinx-markdown-builder?source=hash-mapping - size: 21881 - timestamp: 1765123409331 + run_exports: {} + size: 23751 + timestamp: 1788375977153 - conda: https://conda.anaconda.org/conda-forge/noarch/sphinxcontrib-applehelp-2.0.0-pyhd8ed1ab_1.conda sha256: d7433a344a9ad32a680b881c81b0034bc61618d12c39dd6e3309abeffa9577ba md5: 16e3f039c0aa6446513e94ab18a8784b diff --git a/pyproject.toml b/pyproject.toml index 5a55118e0..773f3d888 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -471,8 +471,7 @@ sphinx = ">=8.2.3" sphinxcontrib-bibtex = "*" sphinx-copybutton = "*" sphinx-design = "*" -sphinx-llm = "*" -sphinx-llms-txt = "*" +sphinx-llm = ">=1.1.0" ipython = "*" ipython_genutils = "*" myst-nb = "*" @@ -485,7 +484,7 @@ sphinxcontrib-mermaid = "*" intersphinx-registry = "*" [tool.pixi.feature.docs.tasks] -build-docs = { cmd = "make html", cwd = "docs", description = "Build the HTML documentation" } +build-docs = { cmd = "make html SPHINXOPTS=-T", cwd = "docs", description = "Build the HTML documentation" } # --- Compat features (version overrides for backward-compat CI) --------------------- [tool.pixi.feature.old-plotly.dependencies]