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 0.10 docs #700

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Add 0.10 docs #700

wants to merge 4 commits into from

Conversation

coretl
Copy link
Collaborator

@coretl coretl commented Dec 9, 2024

Initially just an outline of what I will write, in a couple of weeks this PR will have the actual docs in it

@coretl coretl changed the title Add 1.0 docs Add 0.10 docs Jan 20, 2025
@coretl coretl force-pushed the docs branch 2 times, most recently from 73cc77e to f68f00c Compare January 21, 2025 16:54
@coretl
Copy link
Collaborator Author

coretl commented Jan 22, 2025

@evalott100 please can you make a new branch off this one, then PR back to the docs branch fixing some of the warnings in https://github.com/bluesky/ophyd-async/actions/runs/12911955696/job/36005625932?

Some of them are just missing docstrings, but there are a bunch that say something like:

docstring of ophyd_async.core._signal.set_and_wait_for_value:1: WARNING: py:class reference target not found: ophyd_async.core._signal_backend.SignalDatatypeT

I think this is because importing ophyd_async.core._signal_backend.SignalDatatypeT into ophyd_async.core loses its doc-comment (doc-comment because it is a TypeVar not a class). I have no idea how to get sphinx to recognise that SignalDatatypeT exists and is of a particular type.

I have tried:

  • Adding the following to ophyd_async.core.__init__:
"""
.. data:: SignalDatatypeT

    The supported `Signal` datatypes
"""
  • Doing the same with .. class:: SignalDatatypeT
  • Doing the same but in ophyd_async.core._signal_backend
  • Peppering the codebase with from __future__ import annotations

My next steps were going to be:

  • Add from __future__ import annotations for everything (don't know if you can do this for the whole module)
  • Use autodoc_type_aliases to map ophyd_async.core._signal_backend.SignalDatatypeT to ophyd_async.core.SignalDatatypeT as defined by one of the methods above
  • Do some googling

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.

1 participant