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

Release 3.0.0 #298

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
dc619ca
First BLE client structure and new BT client parent class
SonjaSt May 22, 2023
48d40e4
Added connect, read, disconnect, send to BLE client
SonjaSt May 22, 2023
7524c3d
update flag only when last 10 sec is stable
salman2135 Aug 25, 2023
2ecc83c
update changelog
salman2135 Aug 28, 2023
c3bdcf8
Merge branch 'master' into develop
salman2135 Aug 28, 2023
3bdc48d
fix typo
salman2135 Aug 28, 2023
95a322d
Merge branch 'master' into develop
salman2135 Aug 28, 2023
02420b9
Bugfix rtd build (#286)
salman2135 Oct 12, 2023
63f8ff2
update marker labels in p300 analysis
salman2135 Oct 18, 2023
49bb736
read binary file with BLE board info
salman2135 Oct 18, 2023
ab5af4b
Remove bokeh from explorepy (#288)
salman2135 Dec 13, 2023
ff24396
Feature mac dev (#287)
salman2135 Dec 13, 2023
bd375f4
add ble to list to interfaes
salman2135 Dec 20, 2023
e8c4bbd
Merge branch 'APIS-813-BLE-client' into APIS-865-Update-BLE-packets
salman2135 Dec 20, 2023
083e9d8
add support for ble interface
salman2135 Dec 22, 2023
3d8a78d
update lib file for windows compatibility
salman2135 Jan 3, 2024
4ddc99a
add method to read sampling rate
salman2135 Jan 3, 2024
5954eae
Update docs for 2.0.0 (#291)
salman2135 Jan 5, 2024
a747555
add BLE write feature
salman2135 Jan 8, 2024
99cb787
update byte order and remove gain in exg
salman2135 Jan 10, 2024
5c00065
add missing async keyword
salman2135 Jan 15, 2024
09554e7
write commands via stream loop
salman2135 Jan 16, 2024
abb7581
update setup.py and min python version
salman2135 Jan 16, 2024
34511e1
Feature mac dev (#292)
salman2135 Jan 17, 2024
47689d8
exit BLE context manager on disconnect
salman2135 Jan 25, 2024
60fe6f9
catch runtime exception in asyncio
salman2135 Jan 25, 2024
d355eea
check data variable for disconnection
salman2135 Jan 26, 2024
9124a8f
method for custom name retrieval from settings
salman2135 Feb 1, 2024
c2e12fb
set unstable flag time to .5s
salman2135 Feb 5, 2024
49bf616
initialize channel labels in settings file
salman2135 Feb 6, 2024
c29453f
cast sampling rate as int
salman2135 Feb 12, 2024
ac2cb8e
bin2csv for 32 channel with new packets
salman2135 Feb 12, 2024
4aa3dd7
impedance measurement for BLE 8 ch
salman2135 Feb 21, 2024
5ab0263
Merge branch 'develop' into APIS-865-Update-BLE-packets
salman2135 Feb 27, 2024
1376458
fix flake8 errors
salman2135 Feb 27, 2024
2fb3ee7
improve disconnection, add gain calculation
salman2135 Feb 28, 2024
24ed257
continue parsing on fletcher error for BLE in bin2csv
salman2135 Apr 4, 2024
b31b629
skip packet when payload is wrong
salman2135 Apr 4, 2024
cca3bf1
device name based bt backend detection
salman2135 Apr 5, 2024
fb7fc43
continue parsing on assertion error
salman2135 Apr 8, 2024
1128630
visualizer with gaps filled with duplicate filtered packets
salman2135 Apr 8, 2024
6d8a6df
remove prints
salman2135 Apr 10, 2024
4ca2160
add support for string marker in explore desktop
salman2135 Apr 10, 2024
6e89a71
Apis 918 sample loss counter (#299)
salman2135 Apr 17, 2024
ea8aadd
orn recording and timescale backward compatibility
salman2135 Apr 22, 2024
1e92aac
check None condition
salman2135 Apr 23, 2024
2d8c174
bugfix data vis to imp navigation
salman2135 Apr 25, 2024
b6cf29c
update scaling for hw and sw marker
salman2135 Apr 25, 2024
a2b5ea9
add bt scan method
salman2135 Apr 25, 2024
e9c9b7a
add fixed timeout and delete timestamp reset
salman2135 Apr 25, 2024
64f8101
remove sorting on record end
salman2135 Apr 29, 2024
b132b30
set debug counter for dev info packet
salman2135 Apr 29, 2024
68683f7
wrap disconenction during data stream
salman2135 Apr 29, 2024
fb847b9
Feature improve reconnection (#301)
salman2135 Apr 30, 2024
e26daec
update board id for 8ch
salman2135 May 2, 2024
dabf0e6
add backward compatibility of old devices streaming
salman2135 May 6, 2024
f4ebd61
Merge branch 'feature-support-legacy-dev' into RC-3.0
salman2135 May 6, 2024
45fc9e7
separate async events from main
salman2135 May 7, 2024
5c2b6fe
handle setup for Mac
salman2135 May 7, 2024
1db60aa
auto interface selection for mac
salman2135 May 8, 2024
2c07e6e
inherit correct parent class for 32 channel device
salman2135 May 13, 2024
0979acb
Merge branch 'RC-3.0' into RC-3.0-mac-dev
salman2135 May 13, 2024
bf302d3
use async disconnection api
salman2135 May 14, 2024
aeaeb92
trigger in timetamp with backward compatibility
salman2135 May 14, 2024
670dadf
exploresdk default for windows
salman2135 May 14, 2024
ecfb93d
set soft marker string length to 7
salman2135 May 15, 2024
10a7411
update battery mapping
salman2135 May 23, 2024
4e2a513
rearrange channels to ADS sequence
salman2135 May 23, 2024
6b4a430
format tools.py
salman2135 May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.8.2
current_version = 2.0.0
commit = False
tag = False

Expand Down
18 changes: 6 additions & 12 deletions .readthedocs.yaml
Expand Up @@ -11,12 +11,9 @@ version: 2
# Set the OS, Python version and other tools you might need

build:

os: ubuntu-22.04

tools:

python: "3.11"
os: ubuntu-22.04
tools:
python: "3.11"

# You can also specify other tool versions:

Expand All @@ -30,8 +27,7 @@ build:
# Build documentation in the "docs/" directory with Sphinx

sphinx:

configuration: docs/conf.py
configuration: docs/conf.py

# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs

Expand All @@ -58,7 +54,5 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html

python:

install:

- requirements: docs/requirements.txt
install:
- requirements: docs/requirements.txt
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,13 @@
Changelog
=========

2.0.0 (5.1.2024)
------------------
* Add Mac OSX support
* Remove browser based visualization support
* Update build script for docs


1.8.2 (28.8.2023)
------------------
* Improve explore mock device
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Expand Up @@ -17,9 +17,9 @@
:target: https://pypi.org/project/explorepy


.. |commits-since| image:: https://img.shields.io/github/commits-since/Mentalab-hub/explorepy/v1.8.2.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/Mentalab-hub/explorepy/v2.0.0.svg
:alt: Commits since latest release
:target: https://github.com/Mentalab-hub/explorepy/compare/v1.8.2...master
:target: https://github.com/Mentalab-hub/explorepy/compare/v2.0.0...master


.. |wheel| image:: https://img.shields.io/pypi/wheel/explorepy.svg
Expand Down Expand Up @@ -54,13 +54,13 @@ Quick installation
==================
For Windows users, the best way to install ``explorepy`` is to download the latest ``explorepy`` version from the `release page <https://github.com/Mentalab-hub/explorepy/releases>`_. Please note that dependencies will install automatically from the release page.

For other operating systems, or to build the package manually on Windows, please refer to the information below. MAC OSX is currently not supported.
For other operating systems, or to build the package manually on Windows, please refer to the information below.


Requirements
------------

* Python 3.7 to Python 3.11.
* Python 3.7 to Python 3.12.
* Visual Studio 2015 community edition (Windows only. For package building).
* Bluetooth header files (Linux only. Use: ``sudo apt-get install libbluetooth-dev``).

Expand Down
8 changes: 4 additions & 4 deletions docs/conf.py
Expand Up @@ -29,7 +29,7 @@
year = '2018-2022'
author = 'Mentalab GmbH.'
copyright = '{0}, {1}'.format(year, author)
version = release = '1.8.2'
version = release = '2.0.0'

pygments_style = 'trac'
templates_path = ['.']
Expand All @@ -38,10 +38,10 @@
'pr': ('https://github.com/Mentalab-hub/explorepy/pull/%s', 'PR #'),
}
# on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
#on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only set the theme if we're building docs locally
html_theme = 'sphinx_rtd_theme'
#if not on_rtd: # only set the theme if we're building docs locally
html_theme = 'sphinx_rtd_theme'

html_use_smartypants = True
html_last_updated_fmt = '%b %d, %Y'
Expand Down
12 changes: 8 additions & 4 deletions docs/installation.rst
Expand Up @@ -4,14 +4,14 @@ Installation

Minimal Requirements
------------
* Python 3.7 to Python 3.11
* Python 3.7 to Python 3.12
* Microsoft Build Tools for Visual Studio 2019 (only Windows)
* 6GB RAM (minimum 1GB *free* RAM during the session)
* Intel i5 or higher (2x2.5GHz) CPU

Recommended Requirements
------------
* Python 3.7 to Python 3.11
* Python 3.7 to Python 3.12
* Microsoft Build Tools for Visual Studio 2019 (only Windows)
* 8GB RAM
* Intel i7 or higher CPU
Expand All @@ -36,6 +36,9 @@ For an overview of ``explorepy`` commands, click `here <https://explorepy.readth
On a Windows machine, ``explorepy`` can be installed using the .exe installable file uploaded to
``explorepy``'s `release page <https://github.com/Mentalab-hub/explorepy/releases/download/v1.5.0/MentaLab_ExplorePy_1.5.0.exe>`_. Please note that the dependencies will be installed automatically.

A standalone Mac installer is also available. Please contact Mentalab support to get Mac installer.


Option 2: Installing from Python Package Index (PyPI) and pip (advanced)
""""""""

Expand Down Expand Up @@ -68,17 +71,18 @@ Ubuntu

Mac
^^^
Please note that Mac OSX is not supported at the moment due to some bluetooth bug from Apple OS updates.
1. Install ``XCode`` from the Mac App store. For this, you may need to upgrade to the latest version of MacOS. For older versions of MacOS, find compatible versions of ``XCode`` `here <https://en.wikipedia.org/wiki/Xcode>`_. All old ``XCode`` versions are available `here <https://developer.apple.com/download/more/>`_.
2. Accept the license agreement: ``sudo xcodebuild -license``
3. It is best to install Anaconda. Download and install the `Anaconda Python 3.7 Mac installer <https://www.anaconda.com/distribution/#download-section>`_. For older versions of MacOS, compatible version of Anaconda can be found in `this table <https://docs.continuum.io/anaconda/install/#old-os>`_ and downloaded `here <https://repo.anaconda.com/archive/index.html>`_.
4. We recommend using a virtual environment in Conda.

a. In Conda command prompt: ``conda create -n myenv python=3.8``
a. In Conda command prompt: ``conda create -n myenv python=3.10``
b. Activate the virtual environment: ``conda activate myenv``

5. Upgrade your pip: ``python -m pip install --upgrade pip``
6. Run: ``pip install explorepy``, to install ``explorepy`` from PyPI.
7. Run: ``brew install blueutil``, to install blueutil for bluetooth communication
7. Connect your Explore device from Mac Bluetooth menu and run your Python script.

Quick test
----------
Expand Down
2 changes: 2 additions & 0 deletions docs/requirements.txt
Expand Up @@ -12,3 +12,5 @@ PyYAML==6.0.1
scipy==1.11.1
sentry_sdk==1.19.1
tornado==6.3.2
sphinx-rtd-theme==1.3.0
sphinx==7.2.4
4 changes: 2 additions & 2 deletions examples/p300_demo/analysis_csv_4_channel.py
Expand Up @@ -67,8 +67,8 @@ def main():
lf = .5
hf = 40

label_target = 11
label_nontarget = 10
label_target = 'sw_11'
label_nontarget = 'sw_10'

t_min = -.3
t_max = 1.
Expand Down
4 changes: 2 additions & 2 deletions examples/p300_demo/analysis_csv_8_channel.py
Expand Up @@ -67,8 +67,8 @@ def main():
lf = .5
hf = 40

label_target = 11
label_nontarget = 10
label_target = 'sw_11'
label_nontarget = 'sw_10'

t_min = -.3
t_max = 1.
Expand Down
3 changes: 2 additions & 1 deletion installer/windows/installer.cfg
@@ -1,6 +1,6 @@
[Application]
name=MentaLab ExplorePy
version=1.8.2
version=2.0.0
entry_point=explorepy.cli:cli
console=true
icon=mentalab.ico
Expand All @@ -26,6 +26,7 @@ pypi_wheels =
decorator==5.1.1
distlib==0.3.7
eeglabio==0.0.2.post4
explorepy==2.0.0
fonttools==4.42.1
idna==3.4
importlib-resources==6.0.1
Expand Down
Binary file modified lib/mac/_exploresdk.so 100644 → 100755
Binary file not shown.
17 changes: 9 additions & 8 deletions lib/mac/create_shared_lib.sh 100644 → 100755
Expand Up @@ -27,22 +27,23 @@
#ln -s -f /usr/local/bin/python3.7 /usr/local/bin/python
#python can be found at:
#/Library/Frameworks/Python.framework/Versions/3.7/

#For Sonoma OS:
#/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers
swig -python -c++ -py3 -extranative -threads -debug-classes swig_interface.i
# for windows: use the -threads option
#swig -python -c++ -py3 -extranative -debug-classes swig_interface.i
c++ -c -fpic swig_interface_wrap.cxx -I/usr/local/Cellar/python@3.7/3.7.11/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ -ObjC++ -std=c++11
c++ -c -fpic swig_interface_wrap.cxx -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers -ObjC++ -std=c++11

c++ -c -fpic BluetoothDeviceResources.mm -I/usr/local/Cellar/python@3.7/3.7.11/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ -ObjC++ -std=c++11
c++ -c -fpic BluetoothDeviceResources.mm -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers -ObjC++ -std=c++11

c++ -c -fpic BluetoothWorker.mm -I/usr/local/Cellar/python@3.7/3.7.11/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ -ObjC++ -std=c++11
c++ -c -fpic BluetoothWorker.mm -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers -ObjC++ -std=c++11

c++ -c -fpic BTSerialPortBinding.mm -I/usr/local/Cellar/python@3.7/3.7.11/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ -ObjC++ -std=c++11
c++ -c -fpic BTSerialPortBinding.mm -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers -ObjC++ -std=c++11

c++ -c -fpic -std=c++11 DeviceINQ.mm -I/usr/local/Cellar/python@3.7/3.7.11/Frameworks/Python.framework/Versions/3.7/include/python3.7m/ -ObjC++ -std=c++11
c++ -c -fpic -std=c++11 DeviceINQ.mm -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers -ObjC++ -std=c++11

gcc -c -fpic pipe.c -I/usr/local/Cellar/python@3.7/3.7.11/Frameworks/Python.framework/Versions/3.7/include/python3.7m/
gcc -c -fpic pipe.c -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/Headers

c++ -shared -flat_namespace -undefined suppress BTSerialPortBinding.o DeviceINQ.o BluetoothDeviceResources.o BluetoothWorker.o pipe.o swig_interface_wrap.o -std=c++11 -framework foundation -framework IOBluetooth -o _exploresdk.so
c++ -shared -flat_namespace -arch arm64 -undefined suppress BTSerialPortBinding.o DeviceINQ.o BluetoothDeviceResources.o BluetoothWorker.o pipe.o swig_interface_wrap.o -std=c++11 -framework foundation -framework IOBluetooth -o _exploresdk.so

rm -rf *.o