Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

WIP: Make Sardana storage Tango independent #1495

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

reszelaz
Copy link
Collaborator

@reszelaz reszelaz commented Feb 4, 2021

Sardana storage part should in principle be Tango independent. When few years ago our sys admins asked us to provide a minimum code (without the need to install Tango) that would execute a Sardana scan then we learned that it is not.

At that time I made some effort to make the:

  • sardana.macroserver.recorders.storage
  • sardana.macroserver.scan

importable without installing Tango.

Here I post this work, after just updating it with the develop branch (it was developed when Sardana was still python 2).

There are still two pending points:

  • Make the sardana.taurus.core.tango.sardana.pool.Ready does not rely on Tango state enumeration
  • Check if it is possible to use taurus.core.tango.tangovalidator.TangoDeviceNameValidator without Tango being installed.

The project that simulates a minimum scan from the point of view of data storage is placed here: https://github.com/reszelaz/storage-kpi and I just checked it again and it works without installing Tango.

Check requirements is a task of the packaging tool and a question of
properly specified dependencies. Disable it.
These imports prevents storage module to be used without PyTango.
PyTango is unnecessarily imported. Remove it together with
other unnecessary imports.
This AbortException class is used just in one place - when
creation of the Tango server is aborted (added recently).
This class will be substituted by the AbortedException class
from the msexception module which is a real SardanaException.
Interrupt exceptions are generic enough to be considered as
base sardana exceptions. Move them from the taurus
extensions module.
Delay PyTango imports so the storage modules could be
used without PyTango.
The purpose of these classes is unknown. Since they are
not used and clearly marked as a temporary
implementation move them to the test directory (just
in case we need them in the future).
Delay PyTango import in FIO recorder so the rest of the
recorders could be used even if PyTango is not
installed.
Delay Type import, which at the end results in PyTango
import, in FIO recorder so the rest of the
recorders could be used even if PyTango is not
installed.
Delay Taurus-Tango import in gscan module in order to
allow storage classes imports.
# Conflicts:
#	src/sardana/__init__.py
#	src/sardana/macroserver/msexception.py
#	src/sardana/macroserver/recorders/storage.py
#	src/sardana/macroserver/scan/gscan.py
#	src/sardana/taurus/core/tango/sardana/pool.py
#	src/sardana/taurus/core/tango/sardana/sardana.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant