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

Add Intersphinx #132

Merged
merged 6 commits into from
Sep 5, 2024
Merged

Add Intersphinx #132

merged 6 commits into from
Sep 5, 2024

Conversation

dangunter
Copy link
Member

@dangunter dangunter commented Aug 13, 2024

Add intersphinx to example notebooks

Fixes #131 (see also IDAES/idaes-pse#1468)

Intersphinx is a Sphinx extension automatically (or explicitly) links to external Sphinx project documentation. Since our example documentation is generated by JupyterBook and JB uses Sphinx underneath, it is possible to use Intersphinx, with the Myst markdown syntax, with some rather simple configuration changes.

For example, the following adds a link into the IDAES documentation from a notebook markdown cell:

This tutorial will take you through using the {py:class}`DiagnosticsToolbox <idaes.core.util.model_diagnostics.DiagnosticsToolbox>` to debug a number of issues

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

📚 Documentation preview 📚: https://idaes-examples--132.org.readthedocs.build/en/132/

@dangunter
Copy link
Member Author

The script under scripts/update_intersphinx_mapping.py will pull the shared PSE+ Intersphinx mapping (so docs links are synced) and modify the _config.yml under the notebooks directory. It can also run the command to propagate those updates to the conf.py file.

e.g. from the root directory:

python scripts/update_intersphinx_mapping.py -d idaes_examples/notebooks -c

@dangunter dangunter self-assigned this Aug 13, 2024
@dangunter dangunter added the documentation Improvements or additions to documentation label Aug 13, 2024
@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Aug 15, 2024
@dangunter
Copy link
Member Author

@lbianchi-lbl I removed the script and added a Pyomo URL. Did this via the web interface (!) so need to wait for CI to check my work.

@lbianchi-lbl
Copy link
Contributor

The (only, for the time being) reference using Intersphinx seems to work correctly:

image

@lbianchi-lbl lbianchi-lbl merged commit 50338e0 into IDAES:main Sep 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Intersphinx
3 participants