Minimal application demonstrating core features for deployable applications
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Minimal application demonstrating core features for deployable applications

Travis Build Status Appveyor Build Status Coverage Status

PySideApp is designed to be the baseline project structure for the next level of Wasatch Photonics customer facing software. The main design goals are:

PySide Gui application development
    Develop on Windows and Linux with PySide 

MVC Architecture:
    Well defined interfaces for easier testability 

100% Test Coverage:
    Use pytest-qt and qtbot to click buttons and simulate an operator

Continuous Integration ready:
    Example travis configuration
    Example appveyor configuration

    Provide framework for long-polling reads from hardware

    Capture log output in test, verify logging configuration
    Log from multiple processes on multiple platforms

Executable building:
    Use pyinstaller to build a distributable binary on Windows

Installer creation:
    Example InnoSetup configuration file for installer distribution.

Running tests:

First, install the python package in development mode:
    python develop

All Tests, with coverage report showing missing lines:
    py.test tests/ --cov=pysideapp --cov-report term-missing

    py.test tests/ 

Single test case:
    py.test tests/ -k test_form_has_text_and_button

Showing log prints during the process:
    py.test tests/ --capture=no

Converting to a new project: Copy over this full directory tree, and replace every instance of PySideApp with the new project name. Pay attention to the case sensitivity where appropriate. For example, if the new project name is FastPM100, you would do:

cd projects
git clone FastPM100

cd FastPM100
rm -rf .git
mv pysideapp fastpm100
mv scripts/ scripts/

In the following files, change the module name from pysideapp to

Update, replace PySideApp with FastPM100

Update .travis.yml, replace pysideapp module name with fastpm100.

Update appveyor.yml, in pyinstall section, change pysideapp in
assets directory to fastpm100.  Change scripts/ to
scripts/  Change file entries to

Update scripts/Application_InnoSetup.iss, change MyAppName from
PySideApp to FastPM100 and module_name pysideapp to fastpm100.
Generate a new UID for this application with the InnoSetup

Update scripts/, change pysideapp in icon assets
directory to fastpm100. Change scripts/ to

Update scripts/ change the module name references from
pysideapp to fastpm100. Change the Class name from PySideApplication
to FastPM100Application.

git init
git add ./
git commit -a -m "Initial pysideapp conversion"

Create project on github
git remote add origin
git push -u origin master

Use travis, appveyor, coveralls web interfaces to enable CI builds.
Update travis, appveyor and coveralls badges after CI setup.

To build the installer on windows, run:
Install InnoSetup 5.5.1
Install git-bash 2.7.2
Install python(xy) 2.7.10

cd AutoFallOff
pip install pyinstaller
python develop

The appveyor configuration builds this as well, using conda and
nuget for package installations.