diff --git a/.gitignore b/.gitignore index e1176b2..622478e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ +# This gitignore file consists of 2 parts: +# * The standard Python .gitignore rules from GitHub +# * custom ignore rules for the labscript suite. +# +# These should be kept separate so that the generic rules can be updated with a +# copy/paste without having to worry about whether we are removing custom rules + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] @@ -20,7 +27,6 @@ parts/ sdist/ var/ wheels/ -pip-wheel-metadata/ share/python-wheels/ *.egg-info/ .installed.cfg @@ -50,6 +56,7 @@ coverage.xml *.py,cover .hypothesis/ .pytest_cache/ +cover/ # Translations *.mo @@ -69,9 +76,10 @@ instance/ .scrapy # Sphinx documentation -docs/html/ +docs/_build/ # PyBuilder +.pybuilder/ target/ # Jupyter Notebook @@ -82,6 +90,8 @@ profile_default/ ipython_config.py # pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: .python-version # pipenv @@ -128,5 +138,20 @@ dmypy.json # Pyre type checker .pyre/ +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# +# Custom labscript suite .gitignore rules start below +# + # Editors -.vscode/ \ No newline at end of file +.vscode/ + +# Sphinx documentation +docs/html/ +docs/source/_build/ +docs/source/components.rst \ No newline at end of file diff --git a/README.md b/README.md index ed91123..79aa957 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,20 @@ # the _labscript suite_ - - -the labscript suite – labscript the labscript suite – runmanager the labscript suite – blacs the labscript suite – lyse the labscript suite – runviewer +the labscript suite – labscript the labscript suite – runmanager the labscript suite – blacs the labscript suite – lyse the labscript suite – runviewer ### Experiment control and automation system -___ +[![Actions Status](https://github.com/labscript-suite/labscript-suite/workflows/Build%20and%20Release/badge.svg?branch=maintenance%2F3.0.x)](https://github.com/labscript-suite/labscript-suite/actions) +[![Documentation Status](https://readthedocs.org/projects/labscriptsuite/badge/?version=latest)](https://docs.labscriptsuite.org) +[![License](https://img.shields.io/pypi/l/labscript-suite.svg)](https://github.com/labscript-suite/labscript-suite/raw/master/LICENSE.txt) +[![Python Version](https://img.shields.io/pypi/pyversions/labscript-suite.svg)](https://python.org) +[![PyPI](https://img.shields.io/pypi/v/labscript-suite.svg)](https://pypi.org/project/labscript-suite) +[![Conda Version](https://img.shields.io/conda/v/labscript-suite/labscript-suite)](https://anaconda.org/labscript-suite/labscript-suite) +[![Google Group](https://img.shields.io/badge/Google%20Group-labscriptsuite-blue.svg)](https://groups.google.com/forum/#!forum/labscriptsuite) +[![DOI](https://img.shields.io/badge/DOI-10.1063%2F1.4817213-0F79D0.svg)](https://doi.org/10.1063/1.4817213) + -The _labscript suite_ is a powerful and extensible framework for experiment [composition](https://github.com/labscript-suite/labscript), [control](https://github.com/labscript-suite/runmanager), [execution](https://github.com/labscript-suite/blacs), and [analysis](https://github.com/labscript-suite/lyse). Developed for quantum science and quantum engineering, from laboratory to in-field devices. Applicable to optics, microscopy, materials engineering, biophysics, and any application predicated on the repetition of parameterised, hardware-timed experiments. +The _labscript suite_ is a powerful and extensible framework for experiment [composition](https://github.com/labscript-suite/labscript), [control](https://github.com/labscript-suite/runmanager), [execution](https://github.com/labscript-suite/blacs), and [analysis](https://github.com/labscript-suite/lyse). Developed for quantum science and quantum engineering; deployable in laboratory and in-field devices. Also applicable to optics, microscopy, materials engineering, biophysics, and any application predicated on the repetition of parameterised, hardware-timed experiments. This is a metapackage for the _labscript suite_. Formerly the _labscript suite_ installer repository, prior to the packages being installable via [PyPI](https://pypi.org/user/labscript-suite) and [Anaconda Cloud](https://anaconda.org/labscript-suite). @@ -23,20 +29,18 @@ This is a metapackage for the _labscript suite_. Formerly the _labscript suite_ - Dynamic visualisation of experiment composition and results. - Remote operation: different modules can run on physically separate hosts / single modules can be run on multiple hosts (including hardware supervisor, [blacs](https://github.com/labscript-suite/blacs)). - Auto-generating user-interfaces. -- High-level scripting: all user-interface interaction can be programatically synthesised. +- High-level scripting: user-interface interaction can be programatically synthesised. ## Table of contents - [Installing the _labscript suite_](#installing-the-labscript-suite) - [Recent changes to the _labscript suite_](#recent-changes-to-the-labscript-suite) - [Profile directories](#profile-directories) - - [Application shortcuts](#application-shortcuts) - [Secure communication](#secure-communication) + - [Application shortcuts](#application-shortcuts) - [Source code structure (developer installation)](#source-code-structure-developer-installation) - [Versioning (developer installation)](#versioning-developer-installation) - [BitBucket archive](#bitbucket-archive) - - [What to do if you had custom code in a fork on BitBucket](#what-to-do-if-you-had-custom-code-in-a-fork-on-bitbucket) - - [Migrating other repositories to GitHub](#migrating-other-repositories-to-github) - [Contributing to the _labscript suite_](#contributing-to-the-labscript-suite) - [Issue tracking](#issue-tracking) - [Request for developers](#request-for-developers) @@ -44,7 +48,7 @@ This is a metapackage for the _labscript suite_. Formerly the _labscript suite_ ## Installing the _labscript suite_ -We're excited to announce that accompanying the recent migration to GitHub, _labscript suite_ components are now distributed as Python packages on [PyPI](https://pypi.org/user/labscript-suite) and [Anaconda Cloud](https://anaconda.org/anaconda/conda). +We're excited to announce that accompanying the recent migration to GitHub, _labscript suite_ components are now distributed as Python packages on [PyPI](https://pypi.org/user/labscript-suite) and [Anaconda Cloud](https://anaconda.org/labscript-suite). This makes it far easier to get started using the _labscript suite_, as you no longer require a Mercurial or Git installation (or any knowledge of version control software); components can be installed and upgraded using: @@ -79,23 +83,16 @@ A typical structure of the profile directory is: └── user_devices/ ``` -This structure is created by calling the command `labscript-profile-create`. - -in a terminal after installing `labscript-utils` (per the [installation instructions](http://docs.labscriptsuite.org/en/latest/installation#regular-installation-from-the-python-package-index)). - -_Note:_ As of [labscript-suite/labscript-utils#37](https://github.com/labscript-suite/labscript-utils/issues/37) this can be the same directory as an editable installation. - - -### Application shortcuts +This structure is created by calling the command `labscript-profile-create` in a terminal after installing `labscript-utils` (per the [installation instructions](http://docs.labscriptsuite.org/en/latest/installation#regular-installation-from-the-python-package-index)). -Operating-system menu shortcuts, correct taskbar behaviour, and environment activation for the Python GUI applications (blacs, lyse, runmanager, and runviewer) is now handled by a standalone Python package [desktop-app](https://github.com/chrisjbillington/desktop-app) (per installation instructions above). This currently supports Windows and Linux (Mac OS X support is forthcoming). +_Note:_ As of [labscript-suite/labscript-utils#37](https://github.com/labscript-suite/labscript-utils/issues/37) an editable installation can be located within the labscript-suite profile directory. ### Secure communication Interprocess communication between components of the *labscript suite* is based on the [ZeroMQ](https://zeromq.org) (ZMQ) messaging protocol. We have supported secure interprocess communication via encrypted ZMQ messaging since February 2019 (labscript-utils 2.11.0). -As of labscript-utils 2.16.0, **encryted interprocess communication will be the default**. If you haven't already, this means you'll need to create a new shared secret(or [pre-shared key](https://en.wikipedia.org/wiki/Pre-shared_key)) as follows: +As of labscript-utils 2.16.0, **encryted interprocess communication will be the default**. If you haven't already, this means you'll need to create a new shared secret (or [pre-shared key](https://en.wikipedia.org/wiki/Pre-shared_key)) as follows: 1. Run `python -m zprocess.makesecret` from the labconfig directory. @@ -108,7 +105,7 @@ As of labscript-utils 2.16.0, **encryted interprocess communication will be the 3. Copy the same pre-shared key to all computers running the *labscript suite* that need to communicate with each other, repeating step 2 for each of them. -Treat this file like a password: it allows anyone on the same network access to *labscript suite* programs. +Treat this file like a password; it allows anyone on the same network access to *labscript suite* programs. If you are on a trusted network and don't want to use secure communication, you may instead set: @@ -119,11 +116,16 @@ allow_insecure = True *Notes*: -* Steps 1 and 2 are executed automatically as part of the `labscript-profile-create` command. However, for multiple hosts, step 3 above must still be followed. +* Steps 1 and 2 are executed automatically as part of the `labscript-profile-create` command. However, for multiple hosts, step 3 above must still be followed to ensure the same public-key is used by all hosts running *labscript suite* programs. * There is an outstanding issue with the ZMQ Python bindings on Windows ([zeromq/pyzmq#1148](https://github.com/zeromq/pyzmq/issues/1148)), whereby encryption is significantly slower for Python distributions other than [Anaconda](https://www.anaconda.com). Until this issue is resolved, we recommend that Windows users on an untrusted network use the Anaconda Python distribution (and install `pyzmq` using `conda install pyzmq`). +### Application shortcuts + +Operating-system menu shortcuts, correct taskbar behaviour, and environment activation for the Python GUI applications (blacs, lyse, runmanager, and runviewer) is now handled by a standalone Python package [desktop-app](https://github.com/chrisjbillington/desktop-app) (per installation instructions above). This currently supports Windows and Linux (Mac OS X support is forthcoming). + + ### Source code structure (developer installation) Existing users who move to a developer (editable) installation, please note the following structural changes to the _labscript suite_ source code: @@ -150,10 +152,10 @@ Existing users who move to a developer (editable) installation, please note the * Package names (shared by repositories and top-level folders) are now hyphenated, e.g. labscript-devices and labscript-utils. -* Module names remain underscored, i.e. labscript_devices and labscript_utils. +* Module names remain underscored, e.g. labscript_devices and labscript_utils. * The mixing of hyphen and underscores is inelegant but conventional. * All references to blacs are now lowercase. -* As installation no longer requires a separate package, the repository formerly named ‘installer’ has been renamed to ‘[labscript-suite](https://github.com/labscript-suite/labscript-suite/issues)’, and will be used as a metapackage for the labscript suite. +* As installation no longer requires a separate package, the repository formerly named ‘installer’ has been renamed to ‘[labscript-suite](https://github.com/labscript-suite/labscript-suite/issues)’, and is a metapackage for the *labscript suite* (installing it via `pip`/`conda` installs the suite). ### Versioning (developer installation) @@ -163,7 +165,7 @@ Aside from the maintenance branches documented [here](http://docs.labscriptsuite ## BitBucket archive -Some repository metadata (such as pull request discussions) could not be migrated directly from BitBucket to GitHub. As such, we have created an archived copy of everything that was on BitBucket. This includes: +In April–May 2020 the _labscript suite_ code base was migrated from BitBucket to GitHub. All commit history and issues was preserved, however some repository metadata (such as pull request discussions) could not be migrated directly. As such, we have created an archived copy of everything that was on BitBucket. This includes: * Issues (as they appear on BitBucket); * Pull requests discussions; @@ -172,14 +174,8 @@ Some repository metadata (such as pull request discussions) could not be migrate This archive can be found at [bitbucket-archive.labscriptsuite.org](https://bitbucket-archive.labscriptsuite.org/) (this page can take some time to load for the first time). Copies of every public fork of our repositories are at [github.com/labscript-suite-bitbucket-archive](https://github.com/labscript-suite-bitbucket-archive). As this is an archive, we will not be transferring ownership of these repositories back to their original owners. However, should you wish to continue development on one of those repositories you can fork it into your own account through the GitHub web interface. Should you have uncommitted changes (or changes made after 1st February, 2020) that you wish to have archived, please contact us to discuss the best approach to including these. Please note that we are not recommending continuing development in such forks long term, due to the changes in package structure outlined above. +Further information about migrating your own customisations of the labscript suite can be found [here](https://docs.labscriptsuite.org/en/latest/archive/). -### What to do if you had custom code in a fork on BitBucket - -_Coming soon!_ - -### Migrating other repositories to GitHub - -Should you have other repositories on BitBucket such as labscriptlib, analysislib, userlib, or labconfig (or any project unrelated to the _labscript suite_) we strongly suggest using the tools we developed to migrate the _labscript suite_. These are [philipstarkey/bitbucket-hg-exporter](https://github.com/philipstarkey/bitbucket-hg-exporter) and [chrisjbillington/hg-export-tool](https://github.com/chrisjbillington/hg-export-tool) which can be used together. See the documentation of those projects for further details. ## Contributing to the _labscript suite_ diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index ad5c1a8..d766bfa 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -57,3 +57,7 @@ details { 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12); margin-bottom: 24px; } + +img.labscript-suite-icon { + min-width: 32px; +} \ No newline at end of file diff --git a/docs/source/_templates/components.rst b/docs/source/_templates/components.rst new file mode 100644 index 0000000..f966939 --- /dev/null +++ b/docs/source/_templates/components.rst @@ -0,0 +1,47 @@ +{% if current_project != 'the labscript suite' %} +.. toctree:: + :maxdepth: 2 + :hidden: + + the labscript suite <{{intersphinx_mapping['labscript-suite'][0]}}> + +{% endif %} +*labscript suite* components +============================ + +The *labscript suite* is modular by design, and is comprised of: + +.. list-table:: Python libraries + :widths: 10 90 + :header-rows: 0 + + {% for prog, item in programs.items() if item.type == 'lib' %} + * - .. image:: {{img_path}}/{{item.icon}} + :target: {{intersphinx_mapping['%s' | format(prog)][0]}} + :class: labscript-suite-icon + - |{{prog}}|_ --- {{item.desc}} + {% endfor %} + +.. list-table:: Graphical applications + :widths: 10 90 + :header-rows: 0 + + {% for prog, item in programs.items() if item.type == 'gui' %} + * - .. image:: {{img_path}}/{{item.icon}} + :target: {{intersphinx_mapping['%s' | format(prog)][0]}} + :class: labscript-suite-icon + - |{{prog}}|_ --- {{item.desc}} + {% endfor %} + +.. toctree:: + :maxdepth: 2 + :hidden: + + {% for prog in programs|sort if prog != current_project %} + {{prog}} <{{intersphinx_mapping['%s' | format(prog)][0]}}> + {% endfor %} + +{% for prog in programs %} +.. |{{prog}}| replace:: **{{prog}}** +.. _{{prog}}: {{intersphinx_mapping['%s' | format(prog)][0]}} +{% endfor %} \ No newline at end of file diff --git a/docs/source/changes.md b/docs/source/changes.md index d27b4b7..86987dc 100644 --- a/docs/source/changes.md +++ b/docs/source/changes.md @@ -26,7 +26,7 @@ A typical structure of the profile directory is: This structure is created by calling the command `labscript-profile-create` in a terminal after installing `labscript-utils` (per the [installation instructions](../installation)). -_Note:_ As of [labscript-suite/labscript-utils#37](https://github.com/labscript-suite/labscript-utils/issues/37) this can be the same directory as an editable installation. +_Note:_ As of [labscript-suite/labscript-utils#37](https://github.com/labscript-suite/labscript-utils/issues/37) an editable installation can be located within the labscript-suite profile directory. ### Secure communication diff --git a/docs/source/conf.py b/docs/source/conf.py index 665ab67..60425c8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,9 +11,11 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os +from pathlib import Path import sys from m2r import MdInclude from recommonmark.transform import AutoStructify +from jinja2 import FileSystemLoader, Environment # -- Project information (unique to each project) ------------------------------------- @@ -27,8 +29,9 @@ release = version # HTML icons -html_logo = "../../art/labscript-suite-rectangular-transparent_276x140.svg" -html_favicon = "../../art/labscript.ico" +img_path = "../../art" +html_logo = img_path + "/labscript-suite-rectangular-transparent_276x140.svg" +html_favicon = img_path + "/labscript.ico" # -- General configuration (should be identical across all projects) ------------------ @@ -91,26 +94,55 @@ } # list of all labscript suite components that have docs -labscript_suite_programs = [ - 'labscript', - 'runmanager', - 'runviewer', - 'blacs', - 'lyse', - 'labscript-utils', - 'labscript-devices', -] -# remove this current repo from the list -if project in labscript_suite_programs: - labscript_suite_programs.remove(project) +labscript_suite_programs = { + 'labscript': { + 'desc': 'Expressive composition of hardware-timed experiments', + 'icon': 'labscript_32nx32n.svg', + 'type': 'lib', + }, + 'labscript-devices': { + 'desc': 'Plugin architecture for controlling experiment hardware', + 'icon': 'labscript_32nx32n.svg', + 'type': 'lib', + }, + 'labscript-utils': { + 'desc': 'Shared modules used by the *labscript suite*', + 'icon': 'labscript_32nx32n.svg', + 'type': 'lib', + }, + 'runmanager': { + 'desc': 'Graphical and remote interface to parameterized experiments', + 'icon': 'runmanager_32nx32n.svg', + 'type': 'gui', + }, + 'blacs': { + 'desc': 'Graphical interface to scientific instruments and experiment supervision', + 'icon': 'blacs_32nx32n.svg', + 'type': 'gui', + }, + 'lyse': { + 'desc': 'Online analysis of live experiment data', + 'icon': 'lyse_32nx32n.svg', + 'type': 'gui', + }, + 'runviewer': { + 'desc': 'Visualize hardware-timed experiment instructions', + 'icon': 'runviewer_32nx32n.svg', + 'type': 'gui', + }, +} # whether to use stable or latest version -labscript_suite_doc_version = 'stable' # 'stable' or 'latest' +labscript_suite_doc_version = os.environ.get('READTHEDOCS_VERSION', 'latest') +if '.' in labscript_suite_doc_version: + labscript_suite_doc_version = 'stable' +elif labscript_suite_doc_version not in ['stable', 'latest']: + labscript_suite_doc_version = 'latest' # add intersphinx references for each component for ls_prog in labscript_suite_programs: intersphinx_mapping[ls_prog] = ( - 'https://docs.labscript_suite.org/projects/{}/en/{}/'.format( + 'https://docs.labscriptsuite.org/projects/{}/en/{}/'.format( ls_prog, labscript_suite_doc_version ), None, @@ -119,7 +151,7 @@ # add intersphinx reference for the metapackage if project != "the labscript suite": intersphinx_mapping['labscript-suite'] = ( - 'https://docs.labscript_suite.org/en/{}/'.format(labscript_suite_doc_version), + 'https://docs.labscriptsuite.org/en/{}/'.format(labscript_suite_doc_version), None, ) @@ -143,9 +175,12 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -# html_theme = 'alabaster' html_theme = "sphinx_rtd_theme" -html_title = "labscript suite | experiment control and automation" +html_title = "labscript suite | {project}".format( + project=project + if project != "labscript-suite" + else "experiment control and automation" +) html_short_title = "labscript suite" # Add any paths that contain custom static files (such as style sheets) here, @@ -156,7 +191,6 @@ # Customize the html_theme html_theme_options = {'navigation_depth': 3} - # Use m2r only for mdinclude and recommonmark for everything else # https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992 def setup(app): @@ -174,4 +208,19 @@ def setup(app): app.add_config_value('m2r_anonymous_references', False, 'env') app.add_config_value('m2r_disable_inline_math', False, 'env') app.add_directive('mdinclude', MdInclude) - app.add_stylesheet('custom.css') + app.add_css_file('custom.css') + + # generate the components.rst file dynamically so it points to stable/latest + # of subprojects correctly + loader = FileSystemLoader(Path(__file__).resolve().parent / templates_path[0]) + env = Environment(loader=loader) + template = env.get_template('components.rst') + with open(Path(__file__).resolve().parent / 'components.rst', 'w') as f: + f.write( + template.render( + intersphinx_mapping=intersphinx_mapping, + programs=labscript_suite_programs, + current_project=project, + img_path=img_path + ) + ) diff --git a/docs/source/index.rst b/docs/source/index.rst index 735378e..283e3da 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -67,12 +67,28 @@ .. toctree:: :maxdepth: 2 :hidden: + :caption: DOCUMENTATION installation/index changes contributing archive + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: FURTHER DOCUMENTATION + + components + +.. toctree:: + :maxdepth: 2 + :hidden: + :caption: LINKS + Home Page Source Code + PyPI + Anaconda Cloud .. todolist:: diff --git a/docs/source/main.md b/docs/source/main.md index 34db54e..eabd31c 100644 --- a/docs/source/main.md +++ b/docs/source/main.md @@ -4,7 +4,7 @@ ___ -The _labscript suite_ is a powerful and extensible framework for experiment [composition](https://github.com/labscript-suite/labscript), [control](https://github.com/labscript-suite/runmanager), [execution](https://github.com/labscript-suite/blacs), and [analysis](https://github.com/labscript-suite/lyse). Developed for quantum science and quantum engineering, from laboratory to in-field devices. Applicable to optics, microscopy, materials engineering, biophysics, and any application predicated on the repetition of parameterised, hardware-timed experiments. +The _labscript suite_ is a powerful and extensible framework for experiment [composition](https://github.com/labscript-suite/labscript), [control](https://github.com/labscript-suite/runmanager), [execution](https://github.com/labscript-suite/blacs), and [analysis](https://github.com/labscript-suite/lyse). Developed for quantum science and quantum engineering; deployable in laboratory and in-field devices. Also applicable to optics, microscopy, materials engineering, biophysics, and any application predicated on the repetition of parameterised, hardware-timed experiments. ## Features @@ -18,7 +18,7 @@ The _labscript suite_ is a powerful and extensible framework for experiment [com * Dynamic visualisation of experiment composition and results. * Remote operation: different modules can run on physically separate hosts / single modules can be run on multiple hosts (including hardware supervisor, [blacs](https://github.com/labscript-suite/blacs)). * Auto-generating user-interfaces. -* High-level scripting: all user-interface interaction can be programatically synthesised. +* High-level scripting: user-interface interaction can be programatically synthesised. ## Citing the _labscript suite_ diff --git a/setup.cfg b/setup.cfg index 7175385..f78be23 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,13 +27,13 @@ python_requires = >=3.6 install_requires = importlib_metadata setuptools_scm - blacs - labscript - labscript-devices - labscript-utils - lyse - runmanager - runviewer + blacs>=3.0.0 + labscript>=3.0.0 + labscript-devices>=3.0.0 + labscript-utils>=3.0.0 + lyse>=3.0.0 + runmanager>=3.0.0 + runviewer>=3.0.0 [options.extras_require] pyqt = PyQt5 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy