-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first draft * Added first version of GUI testing - browse tabs * Added first version of GUI testing - browse tabs * Fixing setup.py * arrayqueues dep fix * disabled GUI testing * Testing only python 3.8 * fixed tests * Not testing on windows because of vispy/OpenGL problems with pytest-qt * Update main.yml * Update main.yml * Full exp test running now * comments added * removed unnecessary print, minor refactoring in streaming_save.py while debugging
- Loading branch information
Showing
12 changed files
with
119 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
arrayqueues==1.2.0b0 | ||
flammkuchen==0.9 | ||
arrayqueues==1.3.1 | ||
split_dataset | ||
lightparam>=0.4, <0.5 | ||
pyqt5>=5.15 | ||
pyzmq | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
pytest-cov | ||
pytest-qt | ||
pytest | ||
gitpython | ||
coverage | ||
pre-commit | ||
black | ||
flake8 | ||
isort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,32 @@ | |
with open("requirements.txt") as f: | ||
requirements = f.read().splitlines() | ||
|
||
with open("requirements_dev.txt") as f: | ||
requirements_dev = f.read().splitlines() | ||
|
||
with open("README.md") as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
name="sashimi", | ||
version="0.2.0", | ||
author="Vilim Stih @portugueslab", | ||
author_email="[email protected]", | ||
packages=find_packages(), | ||
install_requires=requirements, | ||
python_requires=">=3.7", | ||
extras_require=dict(dev=requirements_dev), | ||
python_requires=">=3.8", | ||
classifiers=[ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
], | ||
keywords="imaging microscopy lightsheet", | ||
description="A user-friendly software for efficient control of digital scanned light sheet microscopes (DSLMs).", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/portugueslab/sashimi", | ||
entry_points={ | ||
"console_scripts": [ | ||
"sashimi=sashimi.main:main", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import pytest | ||
from pathlib import Path | ||
import tempfile | ||
import shutil | ||
|
||
|
||
@pytest.fixture() | ||
def temp_path(): | ||
"""Temporary path cleaned after the tests run.""" | ||
path = Path(tempfile.mkdtemp()) | ||
yield path | ||
shutil.rmtree(path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from sashimi.gui.main_gui import MainWindow | ||
from sashimi.state import State, TriggerSettings | ||
import qdarkstyle | ||
from PyQt5.QtCore import Qt | ||
from split_dataset import SplitDataset | ||
|
||
|
||
class MockEvt: | ||
def accept(self): | ||
pass | ||
|
||
|
||
def test_main(qtbot, temp_path): | ||
st = State() | ||
style = qdarkstyle.load_stylesheet_pyqt5() | ||
main_window = MainWindow(st, style) | ||
main_window.show() | ||
qtbot.wait(300) | ||
|
||
# go to calibration and volumetric mode: | ||
main_window.wid_status.setCurrentIndex(1) | ||
qtbot.wait(300) | ||
main_window.wid_status.setCurrentIndex(3) | ||
|
||
# Manually update new directory (to avoid nasty pop up window for filesystem): | ||
st.save_settings.save_dir = str(temp_path) | ||
main_window.wid_save_options.set_locationbutton() | ||
st.send_scansave_settings() | ||
|
||
# Wait to send and receive parameters: | ||
qtbot.wait(10000) | ||
|
||
qtbot.mouseClick(main_window.toolbar.experiment_toggle_btn, Qt.LeftButton, delay=1) | ||
|
||
# wait end of the experiment: | ||
qtbot.wait(TriggerSettings().experiment_duration + 5000) | ||
|
||
# try opening the result: | ||
SplitDataset(temp_path / "original") | ||
|
||
main_window.closeEvent(MockEvt()) | ||
qtbot.wait(1000) |