Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
e114be7
prep for refactors
teauxfu May 11, 2021
db9e39e
prep for refactors
teauxfu May 13, 2021
3335d6d
fix typo
teauxfu May 13, 2021
43ca4ae
live plot still acting weird
teauxfu May 13, 2021
d916f6f
ok
teauxfu May 14, 2021
5999538
most of handlerview refactor done
teauxfu May 14, 2021
1cf8c70
cleaning, updating to Pathlib operations
teauxfu May 17, 2021
5b51bb7
hanging from surface
teauxfu May 18, 2021
bd1bf1e
plot cleaning
teauxfu May 18, 2021
595815d
fix logfile creation
teauxfu May 18, 2021
2c48c90
close but not quite
teauxfu May 18, 2021
e359746
mostly done with eval refactor
teauxfu May 19, 2021
214adc8
move scoring out of eval window
teauxfu May 24, 2021
06f28ff
cleaning
teauxfu May 24, 2021
5a44ab4
clean
teauxfu May 25, 2021
324c74c
cleaning / add export dialog
teauxfu May 25, 2021
f214284
cleaning
teauxfu May 25, 2021
98ebd3e
yaaaas bihh!!!
teauxfu May 26, 2021
570d14f
rename components
teauxfu May 26, 2021
01951a3
new plot widget
teauxfu May 26, 2021
22e1bee
oops
teauxfu May 26, 2021
cad3b99
ok
teauxfu May 26, 2021
f96613e
- update docs/changelog
teauxfu May 26, 2021
f7527dd
cleaning up path operations and annotations
teauxfu May 27, 2021
25d3672
oops
teauxfu May 27, 2021
3395f90
ok
teauxfu May 27, 2021
a2eaa7b
Merge branch 'dev' of https://github.com/teauxfu/pct-scalewiz into dev
teauxfu May 27, 2021
e4ae764
ok
teauxfu May 27, 2021
09e1881
prep for using root mainloop
teauxfu May 27, 2021
1baf6bf
cleaning
teauxfu May 28, 2021
4e481fc
.
teauxfu May 28, 2021
d08d5bf
almost!
teauxfu May 28, 2021
43f4d56
update to single-threaded rinse and readings
teauxfu May 29, 2021
bf16f08
cleaning
teauxfu Jun 1, 2021
4b9f44d
cleaning / update screenshots
teauxfu Jun 1, 2021
58066bc
back to multithreading
teauxfu Jun 1, 2021
e77e8f7
cleaning / update screenshots
teauxfu Jun 1, 2021
e3c1ddc
typo
teauxfu Jun 1, 2021
8002300
somewhat more elegant multithreading / update docs
teauxfu Jun 2, 2021
0d76e0a
docs
teauxfu Jun 2, 2021
6e569d6
docs
teauxfu Jun 2, 2021
98141a0
Update README.rst
teauxfu Jun 2, 2021
1dc4cea
cleaning / add sample
teauxfu Jun 2, 2021
6c4309f
get pressures asynchronously
teauxfu Jun 2, 2021
c299dda
Merge branch 'dev' of https://github.com/teauxfu/scalewiz into dev
teauxfu Jun 2, 2021
aa3cb53
try after again
teauxfu Jun 2, 2021
74a8340
cleaning
teauxfu Jun 2, 2021
15bbbaa
.
teauxfu Jun 2, 2021
ce4df98
tighter log polling
teauxfu Jun 2, 2021
4f5ff96
cleaning
teauxfu Jun 2, 2021
10c80bd
changelog
teauxfu Jun 2, 2021
f098751
.
teauxfu Jun 2, 2021
5f010d0
.
teauxfu Jun 3, 2021
1ad3600
.
teauxfu Jun 3, 2021
0ef84a1
.
teauxfu Jun 3, 2021
83d0c29
Merge branch 'dev' of https://github.com/teauxfu/scalewiz into dev
teauxfu Jun 3, 2021
fbbecbd
.
teauxfu Jun 3, 2021
1c7abbc
mkay
teauxfu Jun 3, 2021
1f7472d
.
teauxfu Jun 4, 2021
988403e
Merge branch 'dev' of https://github.com/teauxfu/scalewiz into dev
teauxfu Jun 4, 2021
2d94c05
.
teauxfu Jun 4, 2021
4a96077
remove debug from menubar
teauxfu Jun 4, 2021
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
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,33 @@ repos:
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/ambv/black
rev: 21.4b2
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.1
hooks:
- id: flake8
args: ["--ignore=ANN001,ANN101,ANN002,W503", --max-line-length=88]
additional_dependencies:
- flake8-annotations

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements

- repo: local
hooks:
- id: export-requirements
name: export-requirements
entry: poetry export
language: system
always_run: true
pass_filenames: false
args: ["-f", "requirements.txt", "--output", "requirements.txt"]
58 changes: 53 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,57 @@
=========
Changelog
=========

All notable changes to this project will be documented in this file.

The format is based on `Keep a
Changelog <https://keepachangelog.com/en/1.0.0/>`__, and this project
Changelog <https://keepachangelog.com/en/1.0.0/>`_, and this project
adheres to `Semantic
Versioning <https://semver.org/spec/v2.0.0.html>`__.
Versioning <https://semver.org/spec/v2.0.0.html>`_.


[v0.5.7]
--------

Changed
~~~~~~~

User experience
===============

- overhaul the :code:`TestHandlerView` to be better oragnized
- overhaul the :code:`EvaluationWindow` to be better oragnized
- setting labels for each :code:`Test` is now handled in the :code:`EvaluationWindow`s' "Plot" tab
- updated docs
- ensured exported plot dimensions are always uniform

Performance
===========

- updated the :code:`TestHandler` to poll for readings asynchronously
- updated the :code:`TestHandler` to be more robust when generating log files
- minor performance buff to log processing
- minor performance buff to the :code:`LivePlot` component
- minor performance buff to :code:`Project` serialization
- minor performance buff to reading user configuration file

Data handling
=============

- the :code:`Project` data model now records calcium concentration
- updated the :code:`Test` object model to handle the :code:`Reading` class
- updated the :code:`Project` object model to be more backwards compatible
- refactored data analysis out of the :code:`EvaluationWindow` and into its own :code:`score` function
- updated :code:`score` function to handle the :code:`Reading` class

Misc
====

- update all :code:`os.path` operations to fancy :code:`pathlib.Path` operations
- update all :code:`matplotlib` code to use the object oriented API
- fixed some lag that would accumulate when displaying log messages in the main menu
- lots of misc. code cleanup / reorganizing


[v0.5.6]
--------
Expand Down Expand Up @@ -129,7 +174,7 @@ Added
- report export as CSV (default)
- report export as flattened JSON (not human readable)
- more descriptive window titles, all windows get the app icon ###

Changed
~~~~~~~

Expand All @@ -143,7 +188,7 @@ Changed
- general linting and cleanup ### Fixed
- bug in observed baseline pressure reporting
- the Live Plot stops updating (clearing itself) at the end of a test

Removed
~~~~~~~

Expand All @@ -159,6 +204,9 @@ Added

- rinse dialog, accessible from the menu bar
- help text, accessible from the menu bar
- get\_resource function for getting resource files. can be used for resources with bundled executables later ### Changed
- get_resource function for getting resource files. can be used for resources with bundled executables later

Changed
~~~~~~~
- reset versioning to v0.1.0
- moved project loading functionality to menu bar
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ performance testing.
If you are working with Teledyne SSI Next Generation pumps generally, please check out `py-hplc`_!

This project is stable and usable in a production environment, but listed as in beta due to the lack of a test suite (yet!).
If you notice something weird, fragile, or otherwise encounter a bug, please open an `issue`_.
If you notice something weird, fragile, or otherwise encounter a bug, please open an `issue`_.

.. image:: https://raw.githubusercontent.com/teauxfu/scalewiz/main/img/main_menu(details).PNG
.. image:: https://raw.githubusercontent.com/teauxfu/scalewiz/main/img/main_menu.PNG

.. image:: https://raw.githubusercontent.com/teauxfu/scalewiz/main/img/evaluation(plot).PNG

Expand All @@ -22,13 +22,22 @@ Installation

python -m pip install --user scalewiz

Or, if you use :code:`pipx` (`try it!`_ 😉) ::

pipx install scalewiz

Usage
=====

::

python -m scalewiz

If Python is on your PATH (or you used :code:`pipx` 😎), simply ::

scalewiz


Further instructions can be viewed in the `docs`_ section of this repo or with the Help button in the main
menu.

Expand Down Expand Up @@ -70,3 +79,4 @@ Acknowledgements
.. _`py-hplc`: https://github.com/teauxfu/py-hplc
.. _`docs`: https://github.com/teauxfu/scalewiz/blob/main/doc/index.rst#scalewiz-user-guide
.. _`issue`: https://github.com/teauxfu/scalewiz/issues
.. _`try it!`: https://pypa.github.io/pipx/
68 changes: 39 additions & 29 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you need to clear a date field, just click its label.
Experiment parameters
~~~~~~~~~~~~~~~~~~~~~

This is the most important one. The first two fields only affect the
This is the most important one. The first few fields only affect the
final report. The last five fields affect how the tests are conducted
and scored.

Expand Down Expand Up @@ -73,7 +73,7 @@ If you don't already have a project loaded, click 'Project' > 'Load
existing' from the menu bar. If a project is currently loaded, it's name
will be displayed as shown below.

.. image:: ../img/main_menu(loaded).PNG
.. image:: ../img/main_menu.PNG
:alt: main menu with loaded project

Use the 'Devices' dropdown boxes to select the serial ports the pumps
Expand All @@ -87,7 +87,10 @@ Blanks
~~~~~~

If you are running a blank, enter a name for it. The notes field may be
used to store any other relevant information. |trial entry|
used to store any other relevant information.

.. image:: ../img/main_menu(blank).PNG
:alt: blank entry

Trials
~~~~~~
Expand All @@ -113,13 +116,6 @@ You can interrupt the uptake cycle (or the test itself) at any time by
clicking the 'Stop' button. This will stop the pumps, then attempt to
save the data to file.

While a test is running, you may click 'Toggle Details' to show/hide a
more detailed view of the experiment state, including a live plot of the
data as it is collected.

.. image:: ../img/main_menu(details).PNG
:alt: live plot

A test will automatically stop itself and the pumps when either the time
limit or pressure limit has been reached. The 'Start' button will become
a 'New' button, which you can use to initialize a new test.
Expand All @@ -130,9 +126,11 @@ Rinses
Between each test, it is necessary to rinse the system. Clicking 'Rinse'
from the menu bar will create a small dialog that can do this for you.

|rinse dialog|
.. image:: ../img/rinse_dialog.PNG
:alt: rinse dialog

|rinse dialog in progress|
.. image:: ../img/rinse_dialog(rinsing).PNG
:alt: rinse dialog in progress

The button will temporarily disable while acting as a status label to
show the progression of the rinse. Closing the dialog will terminate the
Expand All @@ -149,23 +147,25 @@ Click 'Evaluation' from the menu bar to open the Evalutaion Window.
The data for each test in the project will be displayed horizontally as
a row.

- Report As: what to call the test on the plot
- Minutes: the duration of the test, (# of measurements)
- Minutes: the duration of the test
- Pump: which series of pressure measurements to use for scoring
- Baseline: the observed baseline pressure for the selected Pump
- Max: the highest pressure observed for the selected Pump
- Baseline PSI: the observed baseline pressure for the selected Pump
- Max PSI: the highest pressure observed for the selected Pump
- Clarity: the observed water clarity
- Notes: any misc. info associated with the test. may be edited at any
time
- Result: the test's score, considering the selected Pump
- Report: a checkbox for indicating whether or not a test should be
included on the report
- Notes: any misc. info associated with the test.
- Result: the test's score, considering the selected Pump and blanks on report
- Report: a checkbox for indicating whether or not a test should be included on the report

.. note::

Blanks will only be factored into the scoring process if marked as 'On Report'


Plot
~~~~

The 'Plot' tab displays the most recent plot of all tests with a ticked
'Include on Report' box.
The 'Plot' tab displays the most recent plot of all tests with a ticked 'Include on Report' box.
You can change the Label associated with each test using the entries on the right.

.. image:: ../img/evaluation(plot).PNG
:alt: plot frame with some data
Expand All @@ -178,10 +178,25 @@ The 'Calculations' tab displays a text log of the evaluation of all
tests with a ticked 'Include on Report' box. This log is automatically
exported next to the report file when you click the 'Export' button.

.. image:: ../img/evaluation(calcs).PNG
:alt: calculations frame with some data

Generating a report
~~~~~~~~~~~~~~~~~~~

You can export a report at any time by clicking the 'Export' button.
This will output, next to the Project's .json file,

- a .txt file copy of the most recent calculations log
- a .jpeg file of the Project's plot
- an either .csv or .json file with a summary of the results

.. note::

The results are typically exported to CSV for easier parsing in Excel or similar.
Support for JSON reports are more or less accidental at time of writing.
If you are able and or willing to parse the JSON, it may be more useful to just work with the Project's JSON file directly.


Running tests concurrently
--------------------------
Expand All @@ -193,9 +208,4 @@ tab will appear on the main menu, and can be used normally.
:alt: two systems

At the time of writing, a particular project may only be loaded to one
system at a time. Loading the same project to more than one system may
result in data loss.

.. |trial entry| image:: ../img/main_menu(blank).PNG
.. |rinse dialog| image:: ../img/rinse_dialog.PNG
.. |rinse dialog in progress| image:: ../img/rinse_dialog(rinsing).PNG
'System' at a time.
Binary file added img/evaluation(calcs).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/evaluation(data).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/evaluation(plot).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/main_menu(blank).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/main_menu(concurrent).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/main_menu(details).PNG
Binary file not shown.
Binary file removed img/main_menu(loaded).PNG
Binary file not shown.
Binary file modified img/main_menu(project).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/main_menu(running).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/main_menu(trial).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/main_menu(uptake).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/main_menu.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/project_editor(experiment).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/project_editor(report).PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/project_editor.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading