Skip to main content

Python implementation of the SiLA 2 standard for lab automation

Project description

coverage report License: MIT

SiLA 2 Python Implementation

Getting started

Installation

Use pip install sila2 to install the library.

Guides

Guides on SiLA server generation, feature implementation, and usage of SiLA clients can be found in the docs directory.

Example

The directory example_server contains an example SiLA server application. example_client_scripts contains multiple SiLA client programs that interact with the example server.

Implementation status

Missing parts from SiLA 2 specification

  • Excryption
    • currently, communication is not encrypted
  • Lifetime handling for binary transfer
    • currently, large binaries are only deleted on request
  • Lifetime handling for observable commands
    • currently, no lifetime is reported and execution UUIDs stay valid indefinitely
  • Server-initiated connection (SiLA 2 v1.1)
    • currently, only client-initiated connections are supported

Deviations from SiLA 2 specification

Code generator

  • Generates submodules from feature definitions (.sila.xml files)
    • feature implementation abstract base class
    • client typing stub (.pyi file)
  • Does not yet support the Structure and Custom data types (fallback to typing.Any)
  • Does not yet generate full docstrings (e.g. constraints are missing)

Contributing

Contributions in the form of issues, feature requests and merge requests are welcome. To reduce duplicate work, please create an issue and state that you are working on it before you spend significant time on writing code for a merge request.

Development setup

Clone the repository, initialize the submodule and install it as editable, including the development requirements:

git clone https://gitlab.com/sila2/sila_python
cd sila2
git submodule update --init --recursive
pip install -e .[dev]

Development environment

This project uses black as code formatter and isort for sorting imports.

flake8 is used to check for various code problems. pytest is used for testing, pytest-cov for measuring code coverage.

To apply formatting, the script run-formatting is provided with this repository. For testing, use run-checks afterwards.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sila2-0.1.0.tar.gz (60.4 kB view hashes)

Uploaded Source

Built Distribution

sila2-0.1.0-py3-none-any.whl (121.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page