Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move examples out of the package and update readme #206

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 19 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ While Fixate is fairly simple, it is already being used to test real electronics

## Getting Started

Fixate runs on Python 3.7 or greater.
Fixate runs on Python 3.8 or greater.

### Installing

Expand All @@ -19,48 +19,40 @@ Alternatively, install from Pypi with 'pip install fixate'

### Run the example scripts

There are a number of examples under src/fixate/examples. For a minimal example try running tiny.py.
There are a number of examples under the examples folder.
You will need a clone fo the git repository to get the examples.
For a minimal example try running tiny.py.
For a more complicated example using multi-level tests, try running multi_level_design.py.
The test runner is executed by calling the package as a script with the test script to execute passed in using the
'-p' command line argument, as well as the -c command line argument to specify the config file
The test runner is executed by calling the `fixate` package and passing in the test script to execute using the '-p' command line argument.

#### Running on Windows:
The following commands are for Windows:

If running from a pip installed version of fixate the path to the examples will be "path_to_python_installation"/Lib/site-packages/fixate/examples/ From this folder the following can be executed:

python -m fixate -p tiny.py

Alternatively the full path to tiny.py can be provided.

python -m fixate -p "path_to_python_installation"/Lib/site-packages/fixate/examples/tiny.py

#### Running on MacOS:

Running on Mac is the same as running on Windows with the exception of the path to the examples. The path will be: "path_to_python_installation"/lib/pythonX.Y/site-packages/fixate/examples/
Where X.Y is the version of python that is installed.
```sh
git clone https://github.com/PyFixate/Fixate.git
cd Fixate
py -m venv .venv
.venv\Scripts\activate
py -m pip install .
py -m fixate -p examples\tiny.py
```

#### Running during development

For easier development, test scripts can be setup to call the fixate main as their own
with some default parameters, as in:

python -m fixate.examples.tiny
python examples/tiny.py

Using that `__main__` example in your own test script then means you can run it as:

python -m my_test_script

## Running the tests
In general, it is recommended to run the "core" set of tests.
The "drivers" test have a number of dependencies that are not required by default. Tests run using unittest.
Navigate to the test/core directory and execute "python -m unittest".

## Modifying the Qt GUI

The Qt GUI base file is created using Qt Designer under Mingw32.
If you'd like to make changes, use pyuic5 to build the layout file, with the command:

pyuic5 fixateGUI.ui -o layout.py
The "drivers" test have a number of dependencies that are not required by default.
Tests are run using pytest.
The easiest way to run the test is using tox.
To run the tests manually using pytest, excluding tests that required instruments, you can run `pytest -m "not drivertest"`.


## Check out the docs
Expand Down
74 changes: 0 additions & 74 deletions docs/fixate/fixate.examples.rst

This file was deleted.

File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading