diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b5bdd70 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,29 @@ +variables: + REGISTRY_HOST: registry.gast.it.uc3m.es + +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule"' + - if: '$CI_PIPELINE_SOURCE == "web"' + +stages: + - commit + +update-year: + stage: commit + image: docker:stable + script: + - apk add git perl + - git remote remove origin + - git remote add origin https://oauth2:${CI_UPDATER_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git + - git remote set-url origin --push https://oauth2:${CI_UPDATER_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git + - git remote set-url origin --add --push https://updater:${CIGH_UPDATER_TOKEN}@github.com/scmanjarrez/${CI_PROJECT_NAME}.git + - git fetch + - git reset --hard origin/master + - git config user.name "gitlab-ci" + - git config user.email "gitlab-ci@gitlab.gast.it.uc3m.es" + - export year=$(date +"%Y") + - perl -i -pe 's/(?<=\([cC]\)\s)(?\d+)(-\d+)?/$+{from}-$ENV{"year"}/' README.md neuropy3/*py setup.py neuropy3/gui/*py neuropy3/gui/*qml + - git add --update + - git commit -m "Updated year" + - git push origin HEAD:$CI_COMMIT_REF_NAME diff --git a/README.md b/README.md index 56a9e2a..4b151c7 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,17 @@ bluetooth. - libbluetooth-dev # Pre-execution -You can install dependencies using setup.py +You can install dependencies via setup.py ```bash $ python -m pip install . +$ python -m pip install .[gui] # to install gui dependencies ``` -or install manually via pip +via python package index (PyPI) +```bash +$ python -m pip install neuropy3 +$ python -m pip install neuropy3[gui] # to install gui dependencies +``` +or manually ```bash $ python -m pip install -r requirements.txt ``` @@ -40,6 +46,7 @@ $ python -m neuropy3 --help $ python -m neuropy3 --gui $ python -m neuropy3 --address XX:YY:ZZ:AA:BB:CC --gui ``` +> Note: requires neuropy3[gui] extra dependencies
Screenshots
@@ -70,7 +77,7 @@ Funds (ESF and FEDER)** - Communication protocol from [neurosky](http://developer.neurosky.com/docs/doku.php?id=thinkgear_communications_protocol). # License - neuropy3 Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. + neuropy3 Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. Universidad Carlos III de Madrid. This program comes with ABSOLUTELY NO WARRANTY; for details check below. This is free software, and you are welcome to redistribute it diff --git a/neuropy3/__init__.py b/neuropy3/__init__.py index 5eba9e5..e5a0d9b 100644 --- a/neuropy3/__init__.py +++ b/neuropy3/__init__.py @@ -1 +1 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3 diff --git a/neuropy3/__main__.py b/neuropy3/__main__.py index ece8664..d5d5de9 100644 --- a/neuropy3/__main__.py +++ b/neuropy3/__main__.py @@ -4,7 +4,7 @@ # neuropy3 - neuropy3 backend. -# Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. +# Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. # Universidad Carlos III de Madrid. # This file is part of neuropy3. diff --git a/neuropy3/gui/__init__.py b/neuropy3/gui/__init__.py index 5eba9e5..192aa3c 100644 --- a/neuropy3/gui/__init__.py +++ b/neuropy3/gui/__init__.py @@ -1 +1,10 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python3 + +import sys + +try: + import PySide6 +except ModuleNotFoundError: + print("In order to run neuropy3.gui, install extra dependencies with " + "'pip install neuropy3[gui]'") + sys.exit(1) diff --git a/neuropy3/gui/gui.py b/neuropy3/gui/gui.py index 1b96158..7d29da9 100644 --- a/neuropy3/gui/gui.py +++ b/neuropy3/gui/gui.py @@ -4,7 +4,7 @@ # gui - Graphical User Interface module. -# Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. +# Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. # Universidad Carlos III de Madrid. # This file is part of neuropy3. diff --git a/neuropy3/gui/gui.qml b/neuropy3/gui/gui.qml index 8a52c2a..0aa18e2 100644 --- a/neuropy3/gui/gui.qml +++ b/neuropy3/gui/gui.qml @@ -2,7 +2,7 @@ /* gui - Graphical User Interface QML. */ -/* Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. */ +/* Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. */ /* Universidad Carlos III de Madrid. */ /* This file is part of neuropy3. */ diff --git a/neuropy3/gui/raw.qml b/neuropy3/gui/raw.qml index 1e0dcc7..392ee65 100644 --- a/neuropy3/gui/raw.qml +++ b/neuropy3/gui/raw.qml @@ -2,7 +2,7 @@ /* raw - Graphical User Interface (Raw data) QML. */ -/* Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. */ +/* Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. */ /* Universidad Carlos III de Madrid. */ /* This file is part of neuropy3. */ diff --git a/neuropy3/neuropy3.py b/neuropy3/neuropy3.py index b97016f..db13e40 100644 --- a/neuropy3/neuropy3.py +++ b/neuropy3/neuropy3.py @@ -4,7 +4,7 @@ # neuropy3 - Backend module. -# Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. +# Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. # Universidad Carlos III de Madrid. # This file is part of neuropy3. diff --git a/neuropy3/utils.py b/neuropy3/utils.py index 2d4f7f9..ef11c1f 100644 --- a/neuropy3/utils.py +++ b/neuropy3/utils.py @@ -4,7 +4,7 @@ # neuropy3 - Utilities module. -# Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. +# Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. # Universidad Carlos III de Madrid. # This file is part of neuropy3. diff --git a/setup.py b/setup.py index 7a8bb5c..e09b115 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ # setup - package setup. -# Copyright (C) 2022 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. +# Copyright (C) 2022-2023 Sergio Chica Manjarrez @ pervasive.it.uc3m.es. # Universidad Carlos III de Madrid. # This file is part of neuropy3. @@ -31,7 +31,7 @@ setup( name='neuropy3', - version='1.0.1', + version='1.0.2', description=('Python3 library to read data from ' 'Neurosky Mindwave Mobile 2 in linux.'), author='Sergio Chica', @@ -56,12 +56,13 @@ packages=['neuropy3', 'neuropy3.gui'], python_requires='>= 3.8', install_requires=[ - 'PySide6==6.2.3', - 'shiboken6==6.2.3', 'pybluez2==0.46', 'numpy==1.23.3', 'scipy==1.9.1' ], + extras_require={ + 'gui': ['PySide6==6.2.3', 'shiboken6==6.2.3'] + }, entry_points={ 'console_scripts': [ 'neuropy=neuropy3.__main__:main'