Skip to content

Commit 4596429

Browse files
committed
complete INSTALL.txt
mention installation instructions in README, setup.py comment header, release notes, web page, and notes/test.txt. Reorganize start of test.txt
1 parent 64fc276 commit 4596429

File tree

6 files changed

+87
-36
lines changed

6 files changed

+87
-36
lines changed

INSTALL.txt

+32-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
To use PyModel, you do not need to install anything into any system
3-
directories. Just obtain the PyModel directory and place it at any
4-
convenient location. To get the current development version,
3+
directories. Just obtain the PyModel directory and place it under
4+
your home directory. To get the current development version,
55

66
git clone git@github.com:jon-jacky/PyModel.git
77

@@ -14,15 +14,33 @@ or
1414

1515
http://staff.washington.edu/jon/pymodel/www/
1616

17-
Then unpack ...
18-
19-
... execute pymodel_paths ... rename PyModel-1.0 to just PyModel (or
20-
edit the commands) ...
21-
22-
The setup.py script now supports the install argument, to optionally
23-
install the PyModel python modules and commands in system directories.
24-
25-
... source tpath ...
26-
27-
... install does not do anything with samples or docs ...
28-
17+
Then unpack using a tar or zip utility. Then you can run PyModel
18+
using the commands and modules in the unpacked distribution directory.
19+
Just put PyModel/bin on your execution PATH and PyModel/pymodel on
20+
your PYTHONPATH. You can achieve this by executing the script
21+
PyModel/bin/pymodel_paths (or pymodel_paths.bat on Windows). That
22+
script assumes the distribution directory is in your HOME directory
23+
and is named PyModel (not PyModel-1.0, so you many need to rename it).
24+
25+
Confirm that PyModel works for you by running some of the test scripts
26+
in the samples directories. For example, in
27+
PyModel/samples/PowerSwitch, type the command: trun test (not python
28+
test.py). You should then see output from several runs of the pmt
29+
program as it executes the PowerSwitch model.
30+
31+
The setup.py script included in the distribution now supports the
32+
install argument, so you can optionally install the PyModel python
33+
modules and commands in system directories (for example in
34+
/Library/Python/2.7/site-packages and /usr/local/bin, respectively).
35+
In the PyModel directory, type the command: sudo python setup.py
36+
install. Then you should not need to execute pymodel_path, but
37+
You still need to type the command: source tpath (in Windows, just tpath)
38+
in every session (terminal window).
39+
40+
Most of the distribution is in the examples under PyModel/samples, and
41+
in the documentation under PyModel/notes, www, and talks, and in the
42+
README files in most directories. Installation does not install these
43+
into any system directories; find them under the unpacked PyModel
44+
distribution directory.
45+
46+
Revised May 2013

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ For more information, read the [notes](notes), browse the
5858
or try the [samples](samples). There are README files in most of the
5959
directories.
6060

61+
You can [INSTALL](INSTALL.txt) PyModel.
62+
6163
PyModel is also available at
62-
[PyPI](http://pypi.python.org/pypi/PyModel).
64+
[PyPI](http://pypi.python.org/pypi/PyModel) and at the
65+
author's [web page](http://staff.washington.edu/jon/pymodel/www/).
6366

6467
PyModel requires Python 2.6 or higher (because it uses *itertools.product*)
6568

@@ -73,6 +76,3 @@ Code and documents are copyright (C) 2009-2013, Jonathan Jacky.
7376

7477

7578
Revised May 2013
76-
77-
78-

notes/release-1.0.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ PyModel v 1.0 release notes
44
PyModel is a model-based testing framework for Python. Earlier public
55
releases were versions 0.80 in Jan 2010, 0.85 in Mar 2010, and 0.90 in
66
July 2011. Since July 2011 ongoing work has been available at GitHub:
7-
https://github.com/jon-jacky/PyModel/
7+
https://github.com/jon-jacky/PyModel/ PyModel can also be downloaded
8+
from PyPI http://pypi.python.org/pypi/PyModel or the author's web page
9+
http://staff.washington.edu/jon/pymodel/www/
810

911
This release is called version 1.0 because it includes all of the
1012
features considered in the original project plan. (Development and
@@ -108,3 +110,4 @@ Version 1.0 makes some bug fixes:
108110

109111
- The pmt -o offline test generator option works.
110112

113+
Revised May 2013

notes/test.txt

+27-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
Notes on tests
22

3+
Introduction
4+
Prerequisites
5+
Running tests
6+
Command summary
7+
Commands and modules
8+
Test scripts
9+
Checking test script output
10+
Output files
11+
Using other unit testing frameworks
12+
13+
14+
Introduction
15+
316
These notes explain how to script and run tests on the PyModel
417
software itself. These notes are not about using PyModel to test
518
other programs -- that is described elsewhere.
@@ -24,15 +37,6 @@ conventional unit test framework like unittest or nose) because:
2437
The last section (below) explains how to script tests similar to ours
2538
using the unittest module from the Python standard library.
2639

27-
Prerequisites
28-
Running tests
29-
Command summary
30-
Commands and modules
31-
Test scripts
32-
Checking test script output
33-
Output files
34-
Using other unit testing frameworks
35-
3640

3741
Prerequisites
3842

@@ -46,14 +50,24 @@ contents of its PyModel/bin directory are on your execution path, and
4650
your current directory is on your Python path. You can achieve this
4751
by executing PyModel/bin/pymodel_paths, or the commands therein.
4852
Alternatively, you can install the contents of PyModel/pymodel and
49-
PyModel/bin into system directories (see INSTALL.txt) but then you may
50-
need to execute the command "source tpath" in each session (terminal
51-
window) before you execute any PyModel commands.
53+
PyModel/bin into system directories but then you may need to execute
54+
the command "source tpath" in each session (terminal window) before
55+
you execute any PyModel commands (or just "tpath" on Windows).
56+
For more details see PyModel/INSTALL.txt.
5257

5358

5459
Running tests
5560

56-
In each subdirectory of samples, type:
61+
Confirm that PyModel works for you by running some of the test scripts
62+
in the samples directories. For example, in
63+
PyModel/samples/PowerSwitch, type the command:
64+
65+
trun test
66+
67+
(not python test.py). You should then see output from several runs of
68+
the pmt program as it executes the PowerSwitch model.
69+
70+
To run regression tests that confirm tests generate the expected output, type:
5771

5872
tdiff trun test
5973

setup.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@
1010
python setup.py sdist -v -f --formats=gztar,zip upload --show-response
1111
1212
It is not necessary to install, you can just run out of the unpacked
13-
distribution. In that case, it is convenient to run PyModel/bin/pymodel_paths
14-
to set up your PATH and PYTHONPATH (run pymodel_paths.bat on Windows).
13+
distribution. In that case, it is convenient to run
14+
PyModel/bin/pymodel_paths to set up your PATH and PYTHONPATH (run
15+
pymodel_paths.bat on Windows). That script assumes the distribution
16+
directory is in your HOME directory and is named PyModel (not
17+
PyModel-1.0, so you many need to rename it).
1518
16-
The distribution contents are all specified in MANIFEST.in,
17-
not in setup.py. Therefore python setup.py install has no effect.
19+
To optionally install the PyModel python modules and commands in
20+
system directories (for example in /Library/Python/2.7/site-packages
21+
and /usr/local/bin, respectively):
22+
23+
sudo python setup.py install.
24+
25+
The distribution contents are all specified in MANIFEST.in, not in
26+
setup.py. Most of the distribution is in the examples under
27+
PyModel/samples, and in the documentation under PyModel/notes, www,
28+
and talks, and in the README files in most directories. Installation
29+
does not install these into any system directories
1830
"""
1931

2032
from distutils.core import setup

www/index.html

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ <h2>PyModel: Model-based testing in Python</h2>
9393
You may download <a href="PyModel-1.0.tar.gz">PyModel-1.0.tar.gz</a> or
9494
<a href="PyModel-1.0.zip">PyModel-1.0.zip</a>.
9595

96+
<p>
97+
Then you can <a href="../INSTALL.txt">INSTALL</a> PyModel.
98+
</p>
99+
96100
<p>
97101
PyModel is also available at
98102
<a href="http://pypi.python.org/pypi/PyModel">PyPI</a>

0 commit comments

Comments
 (0)