labscript-suite / labscript

The 𝗹𝗮𝗯𝘀𝗰𝗿𝗶𝗽𝘁 library provides a translation from expressive Python code to low-level hardware instructions.
http://labscriptsuite.org
BSD 2-Clause "Simplified" License
9 stars 48 forks source link

Updated docs to follow our standard conf #65

Closed philipstarkey closed 4 years ago

philipstarkey commented 4 years ago

Also added links to other labscript suite docs and standard links.

philipstarkey commented 4 years ago

The links to other labscript-suite project docs are dynamically generated so that stable docs have links to other stable docs, and latest links to latest. I don't know of any other way to do this easily (intersphinx does not work inside toctrees).

Note that this is currently not building on RTD: https://readthedocs.org/projects/philipstarkey-labscript/builds/11263059/ RTD is failing to install the labscript_utils dependency - not sure if that is expected or not given the current tagged release state...

rpanderson commented 4 years ago

RTD is failing to install the labscript_utils dependency - not sure if that is expected or not given the current tagged release state...

It might be because there are currently only pre-releases of labscript-utils and other components. I can reproduce the failure locally in a fresh venv and clone of labscript.

(.venv) > python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[docs]
ERROR: Could not find a version that satisfies the requirement labscript-utils>=2.14.0 (from labscript==3.0.0rc2.dev2+g28dc675) (from versions: 2.15.1.dev54, 3.0.0b2, 3.0.0rc1)
ERROR: No matching distribution found for labscript-utils>=2.14.0 (from labscript==3.0.0rc2.dev2+g28dc675)

Adding --pre resolves the issue, but this cannot be specified on RTD (see readthedocs/readthedocs.org#5018).

Curiously, this error does not arise when following either our regular or developer installation guide for pip, i.e. the pre-releases are installed without the --pre flag.

rpanderson commented 4 years ago

One workaround (until we tag fully qualified releases) is to include a pre-release or development version in the offending install_requires entry in setup.cfg, e.g.

[options]
...
install_requires =
  ...
  labscript_utils>=2.14.0dev0

Working build with this modification here (commit | build log).

Alternatively, so that pre-releases are only allowed for documentation builds, we could include docs/requirements.txt containing the above requirement specification, and add the following to readthedocs.yaml:

python:
  install:
    - requirements: docs/requirements.txt
    ...

Update: The above method also works (commit | build log).

philipstarkey commented 4 years ago

Cool! I've updated the requirement to >=3.0.0rc1. We needed to bump it to 3.0.0 anyway, so I don't think there is any downside to doing this (even if we forget to remove it - which hopefully we won't!)

Changes viewable here: https://philipstarkey-labscript.readthedocs.io/en/latest/components/