Skip to content

Commit

Permalink
Added pyside/shiboken as extras_require. Added gitlab-ci to update co…
Browse files Browse the repository at this point in the history
…pyright year
  • Loading branch information
Sergio Chica committed Jan 12, 2023
1 parent 4c23457 commit 48aedfb
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 15 deletions.
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
- export year=$(date +"%Y")
- perl -i -pe 's/(?<=\([cC]\)\s)(?<from>\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
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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
<details>
<summary>Screenshots</summary>
<div align="center">
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion neuropy3/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#!/usr/bin/env python3
#!/usr/bin/env python3
2 changes: 1 addition & 1 deletion neuropy3/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 10 additions & 1 deletion neuropy3/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion neuropy3/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion neuropy3/gui/gui.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion neuropy3/gui/raw.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion neuropy3/neuropy3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion neuropy3/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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',
Expand All @@ -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'
Expand Down

0 comments on commit 48aedfb

Please sign in to comment.