Skip to content

Commit b04e6db

Browse files
committed
Refactor tests, update documentation
1 parent 54ceea9 commit b04e6db

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed
File renamed without changes.

tests/test_ioc.py renamed to devioc/tests/test_ioc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
22
import numpy
33

4-
from devioc import models, log
4+
from .. import models, log
55

66
MAX_INTEGER = 12345
77
MIN_INTEGER = -54321

docs/source/index.rst

+15-7
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies are available.
4545

4646
::
4747

48-
$ python -m unittest -v test.test_ioc
48+
(devioc) $ python -m unittest -v devioc.tests.test_ioc
4949

5050

5151
Write your first IOC
@@ -64,14 +64,15 @@ Your IOC application can be structured at will although we recommend the followi
6464
└── ioc.py # IOC module containing your IOC application
6565

6666

67-
A program is included to create a default IOC project.
67+
A program is included to create a default IOC project. This can be run within the `devioc` virtual environment as follows
6868

6969
::
7070

71-
$ devioc-startproject myioc
71+
(devioc) $ devioc-startproject myioc
7272

73-
That will create a directory structure similar to the one listed above, except the `opi.client` file which you
74-
will have to create yourself based on your preferred EPICS display manager.
73+
This will create a directory structure similar to the one listed above, except the `opi.client` file which you
74+
will have to create yourself based on your preferred EPICS display manager. The project created as such is
75+
a fully functional example application that you can modify as needed.
7576

7677

7778
Creating the IOC Model
@@ -196,13 +197,13 @@ The script **bin/app.server** is responsible for running the IOC Application. An
196197
197198
# Setup command line arguments
198199
parser = argparse.ArgumentParser(description='Run IOC Application')
199-
parser.add_argument('-v', action='store_true', help='Verbose Logging')
200+
parser.add_argument('--verbose', action='store_true', help='Verbose Logging')
200201
parser.add_argument('--device', type=str, help='Device Name', required=True)
201202
202203
203204
if __name__== '__main__':
204205
args = parser.parse_args()
205-
if args.v:
206+
if args.verbose:
206207
log.log_to_console(logging.DEBUG)
207208
else:
208209
log.log_to_console(logging.INFO)
@@ -219,6 +220,13 @@ The script **bin/app.server** is responsible for running the IOC Application. An
219220
220221
This example uses the `Twisted <https://pypi.org/project/Twisted/>`_ framework. It is highly recommended to use it too.
221222

223+
The above script is executed to start the application within the `devioc` virtual environment as follows:
224+
225+
::
226+
227+
(devioc) $ myioc/bin/app.sever --device MYIOC-001
228+
229+
222230
Record Types
223231
============
224232

0 commit comments

Comments
 (0)