Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
PYTHON_VERSION: ['3.9', '3.10', '3.11']
PYTHON_VERSION: ['3.11', '3.12', '3.13', '3.14']
steps:
- name: Checkout Pull Requests
uses: actions/checkout@v6
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,20 @@ pip install -e . # install the pylab-ml instrument lib, the spyder plugin f
# and the STDF-data widget for spyder
```

When we started with this package we did not know **[pymeasure ](https://pymeasure.readthedocs.io/en/latest/introduction.html)** yet. Therefore there are some overlaps with this package.
The STDF browser plugin uses the latest libraries from STDF and Metis, which have not yet been released in Conda and Pip.
Therefore, these libraries must still be downloaded directly from GitHub:

```bash
cd ..
git clone https://github.com/Semi-ATE/Metis
cd Metis
pip install -e .

cd ..

git clone https://github.com/Semi-ATE/STDF.git
cd STDF
pip install -e .
```

If you need more instruments, check out **[pymeasure ](https://pymeasure.readthedocs.io/en/latest/introduction.html)**.
11 changes: 7 additions & 4 deletions pylab_ml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"""
__version__ = '0.0.0'

__all__ = [
__all__ = [ # files:
"attributes",
"base_instrument",
"base_instrument",
"collate_instrument",
"dummy",
"ident",
# directories:
"baseclass",
"common",
"dmm",
Expand All @@ -17,8 +18,10 @@
"matrix",
"misc",
"plugins",
"pollux",
"position_controller",
"scope",
"scripts",
"smu",
"thermostreamer"
"thermostreamer",
"widgets"
]
Empty file added pylab_ml/plugins/__init__.py
Empty file.
2 changes: 0 additions & 2 deletions pylab_ml/plugins/stdf_browser/MANIFEST.in

This file was deleted.

104 changes: 104 additions & 0 deletions pylab_ml/plugins/stdf_browser/plugin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# -*- coding: utf-8 -*-
#
# Copyright © Semi-ATE Contributors
# Licensed under the terms of the GNU GENERAL PUBLIC LICENSE V2
# (see pylab_ml/LICENSE for details)

"""
STDF browser Plugin.
"""
import os
import logging

# Spyder imports
from spyder.api.plugins import Plugins, SpyderDockablePlugin
from spyder.api.plugin_registration.decorators import on_plugin_available # on_plugin_teardown
from spyder.api.translations import get_translation

# Semi-ATE imports
from ate_spyder.plugin import ATE
from ate_spyder_lab_control.plugin_control import LabControlPlugin

# Local imports
from pylab_ml.plugins.stdf_browser.widgets.main_widget import StdfWidget

# Localization
_ = get_translation("spyder")

#Logging
logger = logging.getLogger(__name__)


class StdfBrowser(SpyderDockablePlugin):
"""Stdf-Browser plugin."""

NAME = "Stdf"
REQUIRES = [ATE.NAME, LabControlPlugin.NAME]
OPTIONAL = []
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
WIDGET_CLASS = StdfWidget
CONF_SECTION = NAME

# DISABLE_ACTIONS_WHEN_HIDDEN = False

# ---- SpyderDockablePlugin API
# ------------------------------------------------------------------------
@staticmethod
def get_name() -> str:
return _("Stdf")

@staticmethod
def get_description() -> str:
return _("Display and explore STDF-Data.")

@classmethod
def get_icon(cls):
return cls.create_icon("hist")

def on_initialize(self):
logger.debug("StdfBrowser:on_initialize")

# ---- Private API
# ------------------------------------------------------------------------

@on_plugin_available(plugin=ATE.NAME)
def on_ate_available(self):
""" Connect to ATE plugin when it becomes available and set up the STDF widget with the project information from ATE. """
ate: ATE = self.get_plugin(ATE.NAME)
ate.sig_ate_project_loaded.connect(self._setup_stdf_widget)
ate.sig_ate_progname.connect(self.runflow_changed)
ate.sig_stop_debugging.connect(self.runflow_stop)
self._testing = False

@on_plugin_available(plugin=LabControlPlugin.NAME)
def on_labcontrol_available(self):
labcontrol: LabControlPlugin = self.get_plugin(LabControlPlugin.NAME)
labcontrol._widget.change_status_display.connect(self.change_controlstatus)

def _setup_stdf_widget(self):
""" Set up the STDF widget with the project information from ATE when a new project is loaded. """
widget: StdfWidget = self.get_widget()
ate: ATE = self.get_plugin(ATE.NAME)
project_info = ate.get_project_navigation()
widget.widget.path = os.path.join(project_info.project_directory, "output")

def runflow_changed(self, progname: str):
""" Update the STDF widget with the new program name when the runflow changes in ATE. """
widget: StdfWidget = self.get_widget()
widget._filename = progname

def runflow_stop(self):
print(' StdfBrowser.runflow_stop()')

def change_controlstatus(self, msg, extendmsg=""):
if msg == "terminated" or (msg == "idle" and self._testing):
widget: StdfWidget = self.get_widget()
widget.set_filename(widget.widget.path, widget._filename)
widget.reload_data()
elif msg== "idle":
self._testing = True

if msg == "terminated":
self._testing = False


5 changes: 0 additions & 5 deletions pylab_ml/plugins/stdf_browser/requirements/run.txt

This file was deleted.

27 changes: 0 additions & 27 deletions pylab_ml/plugins/stdf_browser/setup.py

This file was deleted.

4 changes: 0 additions & 4 deletions pylab_ml/plugins/stdf_browser/stdf_browser/README.md

This file was deleted.

101 changes: 0 additions & 101 deletions pylab_ml/plugins/stdf_browser/stdf_browser/plugin.py

This file was deleted.

Loading
Loading