Giter VIP home page Giter VIP logo

qudi-core's Introduction

qudi-core

License: LGPL v3 PyPI release Documentation Status Ruff Testing


The qudi-core repository represents the base installation for the qudi Python package.

It provides a versatile framework for modular multi-instrument and multi-computer measurement applications. It enables scientists and engineers to easily develop specialized multithreaded graphical or non-graphical applications.

Most of the more technical details about a complex measurement suite are handled automatically by qudi so the developer can focus on what matters most... the measurement control logic and the optional graphical user interface.

An incomplete list of functionality qudi provides:

  • logging
  • thread management
  • automatic app status dumping/loading
  • runtime resource management
  • base modules for hardware interfaces, measurement logics and graphical user interfaces
  • inter-module communication
  • support for installable qudi namespace package addons
  • interactive local IPython kernel interface
  • high-level automation framework via tasks/scripts
  • measurement setup configuration via YAML config file
  • various tooling as a Python library
  • basic data storage facility
  • ...

Attribution

If you are publishing any work based on using qudi as a framework/tool it is good practice to mention the qudi project, e.g. in the methods description.

Even better, you could simply cite our initial publication about qudi:
Qudi: A modular python suite for experiment control and data processing

The qudi contributors will appreciate this and it helps our open-source community to gain attention. This will hopefully attract more people willing to help in improving the qudi project which in turn benefits everyone using this software.

Thank you!

Installation

For installation instructions please refer to our qudi installation guide.

Documentation

The official qudi documentation homepage can be found here.

Forum

For questions concerning qudi on any level, there is a forum to discuss with the qudi community. Feel free to ask! If you found a bug and located it already, please note GitHub's issue tracking feature.

Contributing

You want to contribute to the qudi project? Great! Please start by reading through our contributing guideline.

To file a bug report or feature request please open an issue on GitHub.

To contribute source code to the qudi-core repository please open a pull request on GitHub.

Issues and pull requests should be discussed openly in their respective comment sections on GitHub.
For any other development-related questions or discussions please subscribe to and use our qudi-dev mailing list. Please also consider using gists to showcase and discuss topics publicly within the qudi community.

News and Updates

We will occasionally inform the qudi community about releases and breaking changes (no discussions).

If you are using qudi and want to stay in the loop, please subscribe to our qudi-announce mailing list.

License

Qudi is licensed under the GNU Lesser General Public License Version 3 (LGPL v3).

A copy of the full license text can be found in the repository root directory in LICENSE and LICENSE.LESSER

For more information please check the license section in the qudi documentation.

Copyright

Check AUTHORS.md for a list of authors and the git history for their individual contributions.

qudi-core's People

Contributors

neverhorst avatar drogenlied avatar latchr avatar jochen-scheuer avatar kay-jahnke avatar simonschmitt2 avatar tobiasgehring avatar yawghmoth avatar christoph-mueller avatar alrik-durand avatar geegee avatar prithviulm avatar meiwud334 avatar astropiuu avatar nicolasstaudenmaier avatar tunden avatar timoml avatar liuyanulm avatar mvbnano avatar mcarolvillavedra avatar george-elhamy avatar bens0n avatar quantifiedcode-bot avatar lukepiewalker avatar andreafilipovski avatar pjvetter avatar a-stark avatar lbotsch avatar nick-grimm avatar alastair-marshall avatar

Forkers

george-elhamy

qudi-core's Issues

Sphinx segfault when building docs [Bug]

Version

Development

What is affected by the bug?

It appears that autosummary does not work well with some decorators. It's odd that this results in a hard-crash i.e. a segfault. Logs are useless and so is dmesg.

When does the bug occur?

Building the docs with the custom template with full recursion to fully document all modules, classes, functions etc. See commit message in 25ee704 which describes this.

How do we replicate the issue?

Build the docs as of 25ee704 but include a blank __init__.py in src/qudi/util/widgets to allow sphinx to recurse into it.

Expected behavior

Do not segfault when building the docs lol.

Relevant log output

No response

Additional Comments

I have isolated the problem to the @QtCore.Property(int) decorator in the code block below:

@QtCore.Property(int)
def indicator_position(self):
return self._indicator_position
@indicator_position.setter
def indicator_position(self, value):
self._indicator_position = value
self.update()

This is rather insane. If I replace the decorator with @property then it works fine. After numerous hours of debugging, it seems that the problem is that Sphinx gets confused sometimes with finding the right docstring when there's a decorator on a function. It appears that adding some random docstring to the function immediately solves the problem.

I guess this solution is fine for now (everything should have a docstring anyway?).

Contact Details

No response

Does the license need to be there at the head of almost every file? [Suggestion]

Suggestion

Right now we have the boilerplate license text at the top of many files. I don't know if this is necessary due to license terms and such, but it is affecting the docs building because it's getting parsed. One could write some rule to exclude the text in the docs building probably.

Reasons

Code is slightly cleaner.

Additional Context

Also, the copyright year can/ should be updated every year (does it need to be?) Right now most of them say copyright 2021. I'm not sure how the year in the source code can be automatically updated every year but the docs build can certainly have the year updated automatically, though it's probably problematic if the rtd docs and source code have differing copyright years.

Add unit tests [New Feature]

Feature Description

We need to add unit tests to test qudi's functionality (as part of CI/ CD at least) to help ensure that commits don't break existing functionality.

Related Problem

No response

Considered Alternatives

We do some kind of internal testing right now by asking people to test the code on their setups but this isn't ideal for obvious reasons.

Additional Context

No response

Contact Details

No response

Add example code to docs [New Feature]

Feature Description

There should be fully-functional example scripts that run using at least the dummy modules. These will be separate from unit tests. These example scripts will be executed and the code and their output will be rendered in the docs.

Related Problem

The examples now are not actually being run so they may use deprecated features/ break in the future/ without any indication to devs. The examples should be run as part of the build process with their output being captured and rendered to rtd. This also ensures they are agnostic of any user's environment. Devs should only commit stripped notebooks/ code with no output files or data etc and the build process will handle the rest. Note that this should not be confused with unit tests.

Considered Alternatives

I think this is quite a standard process but other suggestions are welcomed. I think the simplest would be to have everything in jupyter notebooks because we can easily have markdown, code and outputs in one file. A pre-commit hook can be used to strip the notebooks prior to pushing.

Additional Context

No response

Contact Details

No response

The existing documentation is incompatible with Sphinx [Bug]

Version

Development

What is affected by the bug?

The docstrings will not render properly on RTD using Sphinx.

When does the bug occur?

When building the docs.

How do we replicate the issue?

Build the docs locally or on RTD.

Expected behavior

Should not be getting yelled at endlessly for syntax errors relating to dostring formatting/ pointing nowhere/ unknown syntax/ whatever else.

Relevant log output

No response

Additional Comments

It is going to be an incredible journey trying to standardise the existing docstrings because they are all written differently. It might be possible to automate this task either using copilot or otherwise.

No response

Contact Details

No response

Convert all md to rst [Suggestion]

Suggestion

Convert all documentation .md files to .rst.

Reasons

Sphinx does not natively support .md files so the MyST-Parser needs to be used. This is driving me insane. It probably could be done but literally everyone uses .rst so the documentation and examples are mostly for .rst. There are tools to automatically do the conversion. Note that the use of .ipynb should not be affected by this i.e. the jupyter notebooks (in the future) can still use markdown without issue.

Additional Context

No response

The docs take hilariously long to build [Bug]

Version

Development

What is affected by the bug?

Potentilally timing-out on RTD. The limit is 15min and 25ee704 already takes 7mins and it's not even with all the documentation and fancy formatting and examples and whatever else. The problem is likely with recursing into submodules as well as the cross-linking of modules/ classes/ functions across the entire documentation.

When does the bug occur?

When building the docs.

How do we replicate the issue?

Build the docs on rtd.

Expected behavior

Do not time out.

Relevant log output

No response

Additional Comments

The Makefile currently allows Sphinx to run the build in parallel utilising all cores so build times are acceptable when run locally but I don't think RTD supports using multiple cores. I'm not even sure how to specify multiple cores because RTD does not use the Makefile but their own custom command to build the docs with Sphinx. See their build overview for more info.

Contact Details

No response

Should we move to Poetry? [New Feature]

Feature Description

Poetry would be an awesome inclusion for Qudi. We should consider switching over to it though that might encounter a lot of friction.

Related Problem

The learning curve isn't much more than conda, especially if you're just a user. For developers, it offers a neat way to fix dependencies across devs which is helpful for the it-does-not-work-for-me-but-it-works-for-everyone-else cases. Also it oversees the entire build, test, deploy process and works well with the tools that are used for those processes.

Considered Alternatives

PDM is another option but it is even newer than Poetry.

Hatch is another option that seems to be about as popular as Poetry.

Also cue XKCD 927...

Additional Context

No response

Contact Details

No response

[Bug] RTD build fails due to incomplete dependency specifications

Version

Development

What is affected by the bug?

RTD reports the error Could not import extension IPython.sphinxext.ipython_directive (exception: No module named 'IPython') when building the docs. Locally building the docs using Make works in 2664717 (ignoring the numerous warnings and poor formatting but build is successful and the markdown files are parsed into html correctly). Need to fix the RTD build process to include installing the required and optional dependencies.

When does the bug occur?

On RTD when building the docs.

How do we replicate the issue?

Build the docs on RTD.

Expected behavior

Well the docs should build without problems!

Relevant log output

Read the Docs build information
Build id: 23433166
Project: qudi-core-testing
Version: latest
Commit: 26647177ab7597fd1f45bb22aeb8388a57256f91
Date: 2024-02-13T18:11:31.793254Z
State: finished
Success: False


[rtd-command-info] start-time: 2024-02-13T18:11:48.858372Z, end-time: 2024-02-13T18:11:49.414399Z, duration: 0, exit-code: 0
git clone --depth 1 https://github.com/prithviulm/qudi-core.git .
Cloning into '.'...

[rtd-command-info] start-time: 2024-02-13T18:11:49.438116Z, end-time: 2024-02-13T18:11:49.842148Z, duration: 0, exit-code: 0
git fetch origin --force --prune --prune-tags --depth 50 refs/heads/main:refs/remotes/origin/main


[rtd-command-info] start-time: 2024-02-13T18:11:50.379656Z, end-time: 2024-02-13T18:11:50.506741Z, duration: 0, exit-code: 0
git checkout --force origin/main
Note: switching to 'origin/main'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 2664717 Added rtd config and edited files for myst syntax warnings. RTD site should work now, need to improve formatting and layout.

[rtd-command-info] start-time: 2024-02-13T18:11:50.552957Z, end-time: 2024-02-13T18:11:50.615385Z, duration: 0, exit-code: 0
git clean -d -f -f


[rtd-command-info] start-time: 2024-02-13T18:11:50.645422Z, end-time: 2024-02-13T18:11:50.710210Z, duration: 0, exit-code: 0
cat .readthedocs.yaml
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
  os: ubuntu-22.04
  tools:
    python: "3.11"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
  configuration: docs/conf.py
  # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
  # builder: "dirhtml"
  # Fail on all warnings to avoid broken references
  # fail_on_warning: true

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
#   install:
#     - requirements: docs/requirements.txt

[rtd-command-info] start-time: 2024-02-13T18:11:56.685061Z, end-time: 2024-02-13T18:11:56.766435Z, duration: 0, exit-code: 0
asdf global python 3.11.6


[rtd-command-info] start-time: 2024-02-13T18:11:57.147011Z, end-time: 2024-02-13T18:11:58.280359Z, duration: 1, exit-code: 0
python -mvirtualenv $READTHEDOCS_VIRTUALENV_PATH
created virtual environment CPython3.11.6.final.0-64 in 786ms
  creator CPython3Posix(dest=/home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/docs/.local/share/virtualenv)
    added seed packages: pip==23.1, setuptools==67.6.1, wheel==0.40.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

[rtd-command-info] start-time: 2024-02-13T18:11:58.330438Z, end-time: 2024-02-13T18:12:11.253433Z, duration: 12, exit-code: 0
python -m pip install --upgrade --no-cache-dir pip setuptools
Requirement already satisfied: pip in /home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages (23.1)
Collecting pip
  Downloading pip-24.0-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 11.4 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages (67.6.1)
Collecting setuptools
  Downloading setuptools-69.1.0-py3-none-any.whl (819 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.3/819.3 kB 20.7 MB/s eta 0:00:00
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 67.6.1
    Uninstalling setuptools-67.6.1:
      Successfully uninstalled setuptools-67.6.1
  Attempting uninstall: pip
    Found existing installation: pip 23.1
    Uninstalling pip-23.1:
      Successfully uninstalled pip-23.1
Successfully installed pip-24.0 setuptools-69.1.0

[rtd-command-info] start-time: 2024-02-13T18:12:11.296001Z, end-time: 2024-02-13T18:12:18.174514Z, duration: 6, exit-code: 0
python -m pip install --upgrade --no-cache-dir sphinx readthedocs-sphinx-ext
Collecting sphinx
  Downloading sphinx-7.2.6-py3-none-any.whl.metadata (5.9 kB)
Collecting readthedocs-sphinx-ext
  Downloading readthedocs_sphinx_ext-2.2.5-py2.py3-none-any.whl.metadata (1.5 kB)
Collecting sphinxcontrib-applehelp (from sphinx)
  Downloading sphinxcontrib_applehelp-1.0.8-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-devhelp (from sphinx)
  Downloading sphinxcontrib_devhelp-1.0.6-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-jsmath (from sphinx)
  Downloading sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)
Collecting sphinxcontrib-htmlhelp>=2.0.0 (from sphinx)
  Downloading sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl.metadata (2.3 kB)
Collecting sphinxcontrib-serializinghtml>=1.1.9 (from sphinx)
  Downloading sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl.metadata (2.4 kB)
Collecting sphinxcontrib-qthelp (from sphinx)
  Downloading sphinxcontrib_qthelp-1.0.7-py3-none-any.whl.metadata (2.2 kB)
Collecting Jinja2>=3.0 (from sphinx)
  Downloading Jinja2-3.1.3-py3-none-any.whl.metadata (3.3 kB)
Collecting Pygments>=2.14 (from sphinx)
  Downloading pygments-2.17.2-py3-none-any.whl.metadata (2.6 kB)
Collecting docutils<0.21,>=0.18.1 (from sphinx)
  Downloading docutils-0.20.1-py3-none-any.whl.metadata (2.8 kB)
Collecting snowballstemmer>=2.0 (from sphinx)
  Downloading snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.0/93.0 kB 4.8 MB/s eta 0:00:00
Collecting babel>=2.9 (from sphinx)
  Downloading Babel-2.14.0-py3-none-any.whl.metadata (1.6 kB)
Collecting alabaster<0.8,>=0.7 (from sphinx)
  Downloading alabaster-0.7.16-py3-none-any.whl.metadata (2.9 kB)
Collecting imagesize>=1.3 (from sphinx)
  Downloading imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)
Collecting requests>=2.25.0 (from sphinx)
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting packaging>=21.0 (from sphinx)
  Downloading packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting MarkupSafe>=2.0 (from Jinja2>=3.0->sphinx)
  Downloading MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.0 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.25.0->sphinx)
  Downloading charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests>=2.25.0->sphinx)
  Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests>=2.25.0->sphinx)
  Downloading urllib3-2.2.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests>=2.25.0->sphinx)
  Downloading certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
Downloading sphinx-7.2.6-py3-none-any.whl (3.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 66.3 MB/s eta 0:00:00
Downloading readthedocs_sphinx_ext-2.2.5-py2.py3-none-any.whl (11 kB)
Downloading alabaster-0.7.16-py3-none-any.whl (13 kB)
Downloading Babel-2.14.0-py3-none-any.whl (11.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.0/11.0 MB 128.4 MB/s eta 0:00:00
Downloading docutils-0.20.1-py3-none-any.whl (572 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 572.7/572.7 kB 293.4 MB/s eta 0:00:00
Downloading Jinja2-3.1.3-py3-none-any.whl (133 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.2/133.2 kB 256.6 MB/s eta 0:00:00
Downloading packaging-23.2-py3-none-any.whl (53 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 224.0 MB/s eta 0:00:00
Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 271.6 MB/s eta 0:00:00
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 233.7 MB/s eta 0:00:00
Downloading sphinxcontrib_htmlhelp-2.0.5-py3-none-any.whl (99 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 99.2/99.2 kB 262.1 MB/s eta 0:00:00
Downloading sphinxcontrib_serializinghtml-1.1.10-py3-none-any.whl (92 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.7/92.7 kB 244.8 MB/s eta 0:00:00
Downloading sphinxcontrib_applehelp-1.0.8-py3-none-any.whl (120 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.0/120.0 kB 268.5 MB/s eta 0:00:00
Downloading sphinxcontrib_devhelp-1.0.6-py3-none-any.whl (83 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.5/83.5 kB 245.8 MB/s eta 0:00:00
Downloading sphinxcontrib_qthelp-1.0.7-py3-none-any.whl (89 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.4/89.4 kB 256.9 MB/s eta 0:00:00
Downloading certifi-2024.2.2-py3-none-any.whl (163 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.8/163.8 kB 246.4 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (140 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.3/140.3 kB 269.6 MB/s eta 0:00:00
Downloading idna-3.6-py3-none-any.whl (61 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 234.9 MB/s eta 0:00:00
Downloading MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB)
Downloading urllib3-2.2.0-py3-none-any.whl (120 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.9/120.9 kB 262.6 MB/s eta 0:00:00
Installing collected packages: snowballstemmer, urllib3, sphinxcontrib-serializinghtml, sphinxcontrib-qthelp, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, sphinxcontrib-devhelp, sphinxcontrib-applehelp, Pygments, packaging, MarkupSafe, imagesize, idna, docutils, charset-normalizer, certifi, babel, alabaster, requests, Jinja2, sphinx, readthedocs-sphinx-ext
Successfully installed Jinja2-3.1.3 MarkupSafe-2.1.5 Pygments-2.17.2 alabaster-0.7.16 babel-2.14.0 certifi-2024.2.2 charset-normalizer-3.3.2 docutils-0.20.1 idna-3.6 imagesize-1.4.1 packaging-23.2 readthedocs-sphinx-ext-2.2.5 requests-2.31.0 snowballstemmer-2.2.0 sphinx-7.2.6 sphinxcontrib-applehelp-1.0.8 sphinxcontrib-devhelp-1.0.6 sphinxcontrib-htmlhelp-2.0.5 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.7 sphinxcontrib-serializinghtml-1.1.10 urllib3-2.2.0

[rtd-command-info] start-time: 2024-02-13T18:12:18.424377Z, end-time: 2024-02-13T18:12:18.489966Z, duration: 0, exit-code: 0
cat docs/conf.py
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'qudi-core'
copyright = '2024, Ulm IQO'
author = 'Ulm IQO'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

    # 'IPython.sphinxext.ipython_console_highlighting',
    # 'nbsphinx',
extensions = [
    'IPython.sphinxext.ipython_directive',
    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary',
    'sphinx.ext.viewcode',
    'numpydoc',
    'myst_parser',
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']

autosummary_generate = True

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'pydata_sphinx_theme'
# html_theme = 'sphinx_book_theme'
html_static_path = ['_static']

numpydoc_show_class_members = False
numpydoc_show_inherited_class_members = False
numpydoc_class_members_toctree = False

myst_heading_anchors = 4





###########################################################################
#          auto-created readthedocs.org specific configuration            #
###########################################################################


#
# The following code was added during an automated build on readthedocs.org
# It is auto created and injected for every build. The result is based on the
# conf.py.tmpl file found in the readthedocs.org codebase:
# https://github.com/rtfd/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
#
# Note: this file shouldn't rely on extra dependencies.

import importlib
import sys
import os.path

# Borrowed from six.
PY3 = sys.version_info[0] == 3
string_types = str if PY3 else basestring

from sphinx import version_info

# Get suffix for proper linking to GitHub
# This is deprecated in Sphinx 1.3+,
# as each page can have its own suffix
if globals().get('source_suffix', False):
    if isinstance(source_suffix, string_types):
        SUFFIX = source_suffix
    elif isinstance(source_suffix, (list, tuple)):
        # Sphinx >= 1.3 supports list/tuple to define multiple suffixes
        SUFFIX = source_suffix[0]
    elif isinstance(source_suffix, dict):
        # Sphinx >= 1.8 supports a mapping dictionary for multiple suffixes
        SUFFIX = list(source_suffix.keys())[0]  # make a ``list()`` for py2/py3 compatibility
    else:
        # default to .rst
        SUFFIX = '.rst'
else:
    SUFFIX = '.rst'

# Add RTD Static Path. Add to the end because it overwrites previous files.
if not 'html_static_path' in globals():
    html_static_path = []
if os.path.exists('_static'):
    html_static_path.append('_static')

# Define this variable in case it's not defined by the user.
# It defaults to `alabaster` which is the default from Sphinx.
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_theme
html_theme = globals().get('html_theme', 'alabaster')

#Add project information to the template context.
context = {
    'html_theme': html_theme,
    'current_version': "latest",
    'version_slug': "latest",
    'MEDIA_URL': "https://media.readthedocs.org/",
    'STATIC_URL': "https://assets.readthedocs.org/static/",
    'PRODUCTION_DOMAIN': "readthedocs.org",
    'proxied_static_path': "/_/static/",
    'versions': [
    ("latest", "/en/latest/"),
    ],
    'downloads': [ 
    ],
    'subprojects': [ 
    ],
    'slug': 'qudi-core-testing',
    'name': u'qudi-core-testing',
    'rtd_language': u'en',
    'programming_language': u'words',
    'canonical_url': '',
    'analytics_code': 'None',
    'single_version': False,
    'conf_py_path': '/docs/',
    'api_host': 'https://readthedocs.org',
    'github_user': 'prithviulm',
    'proxied_api_host': '/_',
    'github_repo': 'qudi-core',
    'github_version': 'main',
    'display_github': True,
    'bitbucket_user': 'None',
    'bitbucket_repo': 'None',
    'bitbucket_version': 'main',
    'display_bitbucket': False,
    'gitlab_user': 'None',
    'gitlab_repo': 'None',
    'gitlab_version': 'main',
    'display_gitlab': False,
    'READTHEDOCS': True,
    'using_theme': (html_theme == "default"),
    'new_theme': (html_theme == "sphinx_rtd_theme"),
    'source_suffix': SUFFIX,
    'ad_free': False,
    'docsearch_disabled': False,
    'user_analytics_code': '',
    'global_analytics_code': 'UA-17997319-1',
    'commit': '26647177',
}

# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
if version_info >= (1, 8):
    if not globals().get('html_baseurl'):
        html_baseurl = context['canonical_url']
    context['canonical_url'] = None





if 'html_context' in globals():
    for key in context:
        if key not in html_context:
            html_context[key] = context[key]
else:
    html_context = context

# Add custom RTD extension
if 'extensions' in globals():
    # Insert at the beginning because it can interfere
    # with other extensions.
    # See https://github.com/rtfd/readthedocs.org/pull/4054
    extensions.insert(0, "readthedocs_ext.readthedocs")
else:
    extensions = ["readthedocs_ext.readthedocs"]

# Add External version warning banner to the external version documentation
if 'branch' == 'external':
    extensions.insert(1, "readthedocs_ext.external_version_warning")
    readthedocs_vcs_url = 'None'
    readthedocs_build_url = 'https://readthedocs.org/projects/qudi-core-testing/builds/23433166/'

project_language = 'en'

# User's Sphinx configurations
language_user = globals().get('language', None)
latex_engine_user = globals().get('latex_engine', None)
latex_elements_user = globals().get('latex_elements', None)

# Remove this once xindy gets installed in Docker image and XINDYOPS
# env variable is supported
# https://github.com/rtfd/readthedocs-docker-images/pull/98
latex_use_xindy = False

chinese = any([
    language_user in ('zh_CN', 'zh_TW'),
    project_language in ('zh_CN', 'zh_TW'),
])

japanese = any([
    language_user == 'ja',
    project_language == 'ja',
])

if chinese:
    latex_engine = latex_engine_user or 'xelatex'

    latex_elements_rtd = {
        'preamble': '\\usepackage[UTF8]{ctex}\n',
    }
    latex_elements = latex_elements_user or latex_elements_rtd
elif japanese:
    latex_engine = latex_engine_user or 'platex'

# Make sure our build directory is always excluded
exclude_patterns = globals().get('exclude_patterns', [])
exclude_patterns.extend(['_build'])

[rtd-command-info] start-time: 2024-02-13T18:12:18.515092Z, end-time: 2024-02-13T18:12:19.082177Z, duration: 0, exit-code: 2
python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html
Running Sphinx v7.2.6

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages/sphinx/registry.py", line 447, in load_extension
    mod = import_module(extname)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/.asdf/installs/python/3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'IPython'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages/sphinx/cmd/build.py", line 293, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages/sphinx/application.py", line 233, in __init__
    self.setup_extension(extension)
  File "/home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages/sphinx/application.py", line 406, in setup_extension
    self.registry.load_extension(self, extname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/qudi-core-testing/envs/latest/lib/python3.11/site-packages/sphinx/registry.py", line 450, in load_extension
    raise ExtensionError(__('Could not import extension %s') % extname,
sphinx.errors.ExtensionError: Could not import extension IPython.sphinxext.ipython_directive (exception: No module named 'IPython')

Extension error:
Could not import extension IPython.sphinxext.ipython_directive (exception: No module named 'IPython')

Additional Comments

Raw logs from RTD are pasted for reference.

Contact Details

No response

Use a formatter and linter [New Feature]

Feature Description

Add a formatter and linter to the testing process.

Related Problem

No response

Considered Alternatives

Well we could do every-dev-for-themselves but that anarchy would not be good for readability of the code.

Additional Context

No response

Contact Details

No response

Github actions caching doesn't seem to work [Bug]

Version

Development

What is affected by the bug?

No caching

When does the bug occur?

When running the ruff linting checks

How do we replicate the issue?

Expected behavior

Relevant log output

No response

Additional Comments

No response

Contact Details

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.