Skip to content

Commit 9f20693

Browse files
author
Jack Doughty
committed
Merge branch 'ruff_pyright_day' of https://github.com/ISISComputingGroup/lewis into ruff_pyright_day
2 parents f146939 + 8531285 commit 9f20693

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1195
-1928
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,28 @@
1-
Contributing to Lewis
2-
=====================
3-
1+
# Contributing to Lewis
42
Contributions to Lewis are always welcome and there are different ways of
53
contributing to the framework. We aim to respond to all communications within
64
one working day.
75

86

9-
Reporting Issues
10-
----------------
11-
7+
## Reporting Issues
128
If you run into any issues or bugs while using Lewis or find the documentation
139
of a feature unclear, you can help us improve Lewis by
14-
`opening an Issue <https://github.com/ess-dmsc/lewis/issues/new>`__
15-
here on GitHub. Please be sure to include enough information to reproduce the
10+
opening an issue here on GitHub. Please be sure to include enough information to reproduce the
1611
issue.
1712

18-
If you've already created a fix, you can also directly
19-
`submit a Pull Request <#submitting-pull-requests>`__.
20-
21-
22-
Requesting Features
23-
-------------------
13+
If you've already created a fix, you can also directly submit a pull request.
2414

15+
## Requesting Features
2516
If a feature you want is missing from Lewis, feel free to
26-
`open an Issue <https://github.com/ess-dmsc/lewis/issues/new>`__
27-
here on GitHub to request it. Please describe the context and the expected
17+
open an issue here on GitHub to request it. Please describe the context and the expected
2818
behaviour in detail.
2919

3020
If you've already implemented a new feature and would like to submit it, you
31-
can also directly `submit a Pull Request <#submitting-pull-requests>`__.
21+
can also directly submit a pull request.
3222

33-
34-
Submitting Pull Requests
35-
------------------------
36-
37-
We are happy to accept contributed Pull Requests from forks. Please read through the
38-
`developer guide <http://lewis.readthedocs.io/en/latest/developer_guide/index.html>`__
39-
to get started.
23+
## Submitting Pull Requests
24+
We are happy to accept contributed pull requests from forks. Please read through the
25+
developer guide to get started.
4026

4127
If your Pull Request addresses any open Issues, please reference them with a
4228
line that reads:
@@ -49,14 +35,10 @@ The Pull Request description should detail the purpose of the Pull Request, and
4935
where appropriate should include some instructions on how to test the changes.
5036

5137
Please ensure your Pull Request passes all integration tests and is able to be
52-
merged with master automatically.
38+
merged with the main branch automatically.
5339

5440

55-
Submitting Devices
56-
------------------
57-
41+
## Submitting Devices
5842
If you have a device you would like to contribute to the main repository, we
5943
are happy to accept these as a Pull Request as well. Please see the
60-
documentation for details on
61-
`how to write a device simulator <http://lewis.readthedocs.io/en/latest/developer_guide/writing_devices.html>`__.
62-
44+
documentation for details on how to write a device simulator.

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ builders = pipeline_builder.createBuilders { container ->
5252
pipeline_builder.stage("${container.key}: Test") {
5353
def test_output = "TestResults.xml"
5454
container.sh """
55-
pyenv local 3.7 3.8 3.9
55+
pyenv local 3.7 3.8 3.9 3.10 3.11
5656
cd ${project}
5757
python -m tox -- --junitxml=${test_output}
5858
"""

README.rst renamed to README.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
|Lewis|
2-
=======
3-
1+
# Lewis
42
Lewis - Let's write intricate simulators.
53

64
Lewis is a Python framework for simulating hardware devices. It is
7-
compatible with Python 3.6 or higher.
5+
compatible with Python 3.7 to 3.11.
6+
7+
It is currently not compatible with 3.12 as the asyncchat module has been removed from Python.
8+
We are going to fix this at some point.
89

910
Lewis can be installed via pip or ran from source. See relevant usage sections of the docs for more details.
1011

1112
Resources:
12-
`GitHub <https://github.com/ess-dmsc/lewis>`__ --
13-
`PyPI <https://pypi.python.org/pypi/lewis>`__
13+
[GitHub](https://github.com/ess-dmsc/lewis)
14+
[PyPI](https://pypi.python.org/pypi/lewis)
1415

1516
Lewis was previously named "Plankton" but, due to a
1617
package with the same name on PyPI, we decided to rename the project.
1718

1819
Lewis is licensed under GPL v3 or later.
1920

20-
Purpose and Use Cases
21-
---------------------
22-
21+
## Purpose and Use Cases
2322
Lewis is being developed in the context of instrument control at the
24-
`ESS <http://europeanspallationsource.se>`__, but it is general enough
23+
[ESS](http://europeanspallationsource.se), but it is general enough
2524
to be used in many other contexts that require detailed, stateful
2625
software simulations of hardware devices.
2726

@@ -38,7 +37,6 @@ replication and allows the developer of a simulated device to focus on
3837
capturing device behaviour.
3938

4039
Potential use cases for detailed device simulators include:
41-
4240
- Replacing the physical device when developing and testing software
4341
that interfaces with the device
4442
- Testing failure conditions without risking damage to the physical
@@ -52,12 +50,8 @@ Using a simulation for the above has the added benefit that, unlike most
5250
real devices, a simulation may be sped up / fast-forwarded past any
5351
lengthy delays or processes that occur in the device.
5452

55-
Features
56-
--------
57-
58-
Brief Terminology
59-
~~~~~~~~~~~~~~~~~
60-
53+
## Features
54+
### Brief Terminology
6155
``Device``\ s and ``Interface``\ s are two independent concepts in
6256
Lewis. The ``Device`` is model for the device behaviour and internal
6357
memory. A ``Device`` can be represented using a ``StateMachine``, but it
@@ -69,11 +63,7 @@ by Lewis. The ``Device`` and ``Interface`` are instantiated as part of a
6963
``Simulation`` that provides a cycle "heart beat" and manages other
7064
environmental aspects and services.
7165

72-
.. image:: https://github.com/ess-dmsc/lewis/raw/master/docs/resources/diagrams/SimulationCycles.png
73-
74-
What Can You Do With Lewis?
75-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
76-
66+
### What Can You Do With Lewis?
7767
- Create new ``Device``\ s to closely imitate the internal behaviour
7868
and memory of something
7969
- Optionally make a ``Device`` work as a ``StateMachine`` via
@@ -86,4 +76,4 @@ What Can You Do With Lewis?
8676
- Control server can be accessed via command-line utility, Python bindings, or
8777
JSON RPC.
8878

89-
.. |Lewis| image:: https://github.com/ess-dmsc/lewis/raw/master/docs/resources/logo/lewis-logo.png
79+
[Getting started](docs/quickstart.md)

docs/api/adapters.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/api/adapters/epics.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/api/adapters/modbus.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/api/adapters/stream.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/api/core.rst

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/api/core/adapters.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)