psychopy-neuroplaypro-neurolab 0.0.2__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. psychopy_neuroplaypro_neurolab-0.0.3/PKG-INFO +9 -0
  2. psychopy_neuroplaypro_neurolab-0.0.3/psychopy_neuroplaypro/__init__.py +1 -0
  3. psychopy_neuroplaypro_neurolab-0.0.3/psychopy_neuroplaypro/component.py +26 -0
  4. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/psychopy_neuroplaypro/plugin.py +1 -1
  5. psychopy_neuroplaypro_neurolab-0.0.3/psychopy_neuroplaypro_neurolab.egg-info/PKG-INFO +9 -0
  6. psychopy_neuroplaypro_neurolab-0.0.3/psychopy_neuroplaypro_neurolab.egg-info/requires.txt +1 -0
  7. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/pyproject.toml +3 -12
  8. psychopy_neuroplaypro_neurolab-0.0.2/PKG-INFO +0 -21
  9. psychopy_neuroplaypro_neurolab-0.0.2/psychopy_neuroplaypro/__init__.py +0 -2
  10. psychopy_neuroplaypro_neurolab-0.0.2/psychopy_neuroplaypro/component.py +0 -14
  11. psychopy_neuroplaypro_neurolab-0.0.2/psychopy_neuroplaypro_neurolab.egg-info/PKG-INFO +0 -21
  12. psychopy_neuroplaypro_neurolab-0.0.2/psychopy_neuroplaypro_neurolab.egg-info/requires.txt +0 -1
  13. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/LICENSE +0 -0
  14. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/README.md +0 -0
  15. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/psychopy_neuroplaypro_neurolab.egg-info/SOURCES.txt +0 -0
  16. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/psychopy_neuroplaypro_neurolab.egg-info/dependency_links.txt +0 -0
  17. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/psychopy_neuroplaypro_neurolab.egg-info/entry_points.txt +0 -0
  18. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/psychopy_neuroplaypro_neurolab.egg-info/top_level.txt +0 -0
  19. {psychopy_neuroplaypro_neurolab-0.0.2 → psychopy_neuroplaypro_neurolab-0.0.3}/setup.cfg +0 -0
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: psychopy-neuroplaypro-neurolab
3
+ Version: 0.0.3
4
+ Summary: NeuroPlay EEG recording plugin for PsychoPy Builder
5
+ Author-email: Enicast <enicaster@gmail.com>
6
+ Requires-Python: >=3.8
7
+ License-File: LICENSE
8
+ Requires-Dist: psychopy
9
+ Dynamic: license-file
@@ -0,0 +1 @@
1
+ # Инициализация пакета — можно оставить пустым
@@ -0,0 +1,26 @@
1
+ from psychopy.experiment.components.basecomponent import BaseComponent
2
+ import os
3
+
4
+ class NeuroPlayComponent(BaseComponent):
5
+ categories = ['EEG']
6
+ iconFile = os.path.join(os.path.dirname(__file__), 'resources', 'icon.png')
7
+
8
+ def __init__(self, exp, parentName, name='neuroplay',
9
+ saveFolder='data', filePrefix='recording', autoTimestamp=True,
10
+ startType='time (s)', startVal='0', stopType='duration (s)', stopVal=''):
11
+ super().__init__(exp, parentName, name=name,
12
+ startType=startType, startVal=startVal,
13
+ stopType=stopType, stopVal=stopVal)
14
+ self.type = 'NeuroPlay'
15
+ self.url = "http://127.0.0.1:2336"
16
+ self.order += ['saveFolder', 'filePrefix', 'autoTimestamp']
17
+ self.params['saveFolder'] = {'val': saveFolder, 'valType': 'code', 'updates': 'constant', 'hint': 'Folder to save EEG data'}
18
+ self.params['filePrefix'] = {'val': filePrefix, 'valType': 'code', 'updates': 'constant', 'hint': 'Filename prefix'}
19
+ self.params['autoTimestamp'] = {'val': autoTimestamp, 'valType': 'bool', 'updates': 'constant', 'hint': 'Append timestamp to filename'}
20
+
21
+ def writeRoutineStartCode(self, buff):
22
+ buff.writeIndentedLines(f\"\"\"\n# Start NeuroPlay recording\nimport requests, os, datetime\n\"\"\")
23
+ buff.writeIndentedLines(f\"\"\"\nsave_folder = {self.params['saveFolder']['val']}\nfile_prefix = {self.params['filePrefix']['val']}\nauto_timestamp = {self.params['autoTimestamp']['val']}\nif auto_timestamp:\n timestamp = datetime.datetime.now().strftime('%Y%m%d_%H%M%S')\n filename = f\"{file_prefix}_{{timestamp}}.edf\"\nelse:\n filename = f\"{file_prefix}.edf\"\nfull_path = os.path.join(save_folder, filename)\n\ntry:\n os.makedirs(save_folder, exist_ok=True)\n response = requests.post('{self.url}', json={{\"command\": \"startRecord\", \"path\": full_path}})\n if not response.ok:\n print(f\"[NeuroPlay] Failed to start: {{response.text}}\")\nexcept Exception as e:\n print(f\"[NeuroPlay] Exception: {{e}}\")\n\"\"\")
24
+
25
+ def writeRoutineEndCode(self, buff):
26
+ buff.writeIndentedLines(f\"\"\"\n# Stop NeuroPlay recording\ntry:\n response = requests.post('{self.url}', json={{\"command\": \"stopRecord\"}})\n if not response.ok:\n print(f\"[NeuroPlay] Failed to stop: {{response.text}}\")\nexcept Exception as e:\n print(f\"[NeuroPlay] Exception: {{e}}\")\n\"\"\")
@@ -1,6 +1,6 @@
1
1
  from psychopy.plugins import Plugin
2
2
  from psychopy.experiment.components import registerComponent
3
- from psychopy_neuroplay.component import NeuroPlayComponent
3
+ from psychopy_neuroplaypro.component import NeuroPlayComponent
4
4
 
5
5
  class NeuroPlayPlugin(Plugin):
6
6
  def onLoad(self):
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: psychopy-neuroplaypro-neurolab
3
+ Version: 0.0.3
4
+ Summary: NeuroPlay EEG recording plugin for PsychoPy Builder
5
+ Author-email: Enicast <enicaster@gmail.com>
6
+ Requires-Python: >=3.8
7
+ License-File: LICENSE
8
+ Requires-Dist: psychopy
9
+ Dynamic: license-file
@@ -4,23 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "psychopy-neuroplaypro-neurolab"
7
- version = "0.0.2"
7
+ version = "0.0.3"
8
8
  description = "NeuroPlay EEG recording plugin for PsychoPy Builder"
9
- authors = [
10
- { name = "Enicast", email = "enicaster@gmail.com" }
11
- ]
12
- readme = "README.md"
13
- license = { text = "MIT" }
14
- dependencies = ["psychopy>=2024.2.0"]
9
+ authors = [{name = "Enicast", email = "enicaster@gmail.com"}]
10
+ dependencies = ["psychopy"]
15
11
  requires-python = ">=3.8"
16
12
 
17
- [project.urls]
18
- Homepage = "https://github.com/Enicast/psychopy-neuroplaypro-neurolab"
19
- Repository = "https://github.com/Enicast/psychopy-neuroplaypro-neurolab"
20
-
21
13
  [project.entry-points."psychopy.plugins"]
22
14
  neuroplay = "psychopy_neuroplaypro.plugin:NeuroPlayPlugin"
23
15
 
24
16
  [tool.setuptools]
25
17
  packages = ["psychopy_neuroplaypro"]
26
- include-package-data = true
@@ -1,21 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: psychopy-neuroplaypro-neurolab
3
- Version: 0.0.2
4
- Summary: NeuroPlay EEG recording plugin for PsychoPy Builder
5
- Author-email: Enicast <enicaster@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/Enicast/psychopy-neuroplaypro-neurolab
8
- Project-URL: Repository, https://github.com/Enicast/psychopy-neuroplaypro-neurolab
9
- Requires-Python: >=3.8
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: psychopy>=2024.2.0
13
- Dynamic: license-file
14
-
15
- # PsychoPy NeuroPlay Plugin
16
-
17
- Component for controlling NeuroPlayPro EEG recording from PsychoPy Builder experiments.
18
- - Start recording when the component starts
19
- - Stop recording when the component ends
20
- - Choose folder and filename prefix
21
- - Auto-add timestamp if needed
@@ -1,2 +0,0 @@
1
- # пустой или просто:
2
- from .component import NeuroPlayComponent
@@ -1,14 +0,0 @@
1
- from psychopy.experiment.components.base import BaseComponent
2
-
3
- class NeuroPlayComponent(BaseComponent):
4
- def __init__(self, exp, parentName, name='NeuroPlay'):
5
- super().__init__(exp, parentName, name)
6
- self.type = 'NeuroPlay'
7
- self.url = 'http://localhost:2336'
8
- self.params = {}
9
-
10
- def writeRoutineStartCode(self, buff):
11
- buff.writeIndented("# Start NeuroPlay\n")
12
-
13
- def writeRoutineEndCode(self, buff):
14
- buff.writeIndented("# Stop NeuroPlay\n")
@@ -1,21 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: psychopy-neuroplaypro-neurolab
3
- Version: 0.0.2
4
- Summary: NeuroPlay EEG recording plugin for PsychoPy Builder
5
- Author-email: Enicast <enicaster@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/Enicast/psychopy-neuroplaypro-neurolab
8
- Project-URL: Repository, https://github.com/Enicast/psychopy-neuroplaypro-neurolab
9
- Requires-Python: >=3.8
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: psychopy>=2024.2.0
13
- Dynamic: license-file
14
-
15
- # PsychoPy NeuroPlay Plugin
16
-
17
- Component for controlling NeuroPlayPro EEG recording from PsychoPy Builder experiments.
18
- - Start recording when the component starts
19
- - Stop recording when the component ends
20
- - Choose folder and filename prefix
21
- - Auto-add timestamp if needed