Skip to content

Commit

Permalink
Setup.py restored, Changelog updated
Browse files Browse the repository at this point in the history
  • Loading branch information
celikbasak committed Nov 5, 2024
1 parent b693180 commit 18047a9
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 9 deletions.
51 changes: 42 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,71 @@ Our final release candidate before the official 2.0 release!
- Multimodal Acquisition and Querying
- Support for multiple devices in online querying #286
- Support for trigger handling relative to a given device #293
- Session Orchestrator
- New task protocol for orchestrating tasks in a session. This refactors several Task and Cli functionality #339
- Support multiple device static offests #331
- Support for Device Status (passive or active) #310
- Session Orchestrator #339
- New task protocol for orchestrating tasks in a session. This refactors several Task and Cli functionality #339, #343
- Parameter guardrails #340
- Allow multiple phrases in a single protocol to be defined in a phrase.json and randomized #352
- BciPy Client Additions #346
- Other commands added for offline analysis, visualization and simulation.
- Artifact Module #336
- Simulator #350
- Task
- Calibration Task Refactor: pulls out common elements from RSVP and Matrix calibration tasks #330
- Registry Refactor #332
- Inquiry Preview
- Surface button error probability #347
- Add to Matrix #353
- Bugfixes/Refactor #348
- Add more stoppage criteria #351 (max_incorrect)
- Matrix
- Layout Support #349
- Grid always on #313
- Output stimuli position, screen capture and monitor information after Matrix tasks #303
- Row/Column spacing support #298
- VEP Calibration #304/#296
- session data to VEP calibration #322
- Model
- Offline analysis to support multimodal fusion. Initial release of GazeModel, GazeReshaper, and Gaze Visualization #294
- Updates to ensure seamless offline analysis for both EEG and Gaze data #305
- Offline analysis support for EEG and (multiple) gaze models. Updates to support Eye Tracker Evidence class #360
- Language Model
- Add Oracle model #316
- Random Uniform model #311
- Stimuli
- Updates to ensure stimuli are presented at the same frequency #287 Output stimuli position, screen capture and monitor information after Matrix tasks #303
- Updates to ensure stimuli are presented at the same frequency #287
- Output stimuli position, screen capture and monitor information after Matrix tasks #303
- Dynamic Selection Window
- Updated trial_length to trial_window to allow for greater control of window used after stimulus presentations #291
- Report
- Functionality to generate a report in the form of a PDF #325
- Add a BciPy Calbiraiton Report Action #357
- Offset Support
- Add support for determining offsets between timing verification Tasks (Ex. RSVPTimingVerificationCalibration) and RawData with a photodiode trigger column. This is useful for setting up new systems and preventing errors before an experiment begins. #TODO
- Add support for determining offsets between timing verification Tasks (Ex. RSVPTimingVerificationCalibration) and RawData with a photodiode trigger column. This is useful for setting up new systems and preventing errors before an experiment begins. #327
- Parameters
- Add a Range type parameter #285 Add editable fields #340 Update parameters.json to seperate relevant parameters by task
- Housekeeping
- Add mypy typing to the codebase #301
- Change default log level to INFO to prevent too many messages in the experiment logs #288
- Upgrade requirements for m1/2 chips #299/#300
- Fix GitHub actions build issues with macOS
- Fix occasionally failing test in `test_stimuli` #326
- GUI Refactor
- Fix GitHub actions build issues with macOS #324
- Tests Improvements
- Fix occasionally failing test in `test_stimuli` #326
- Reshaper tests #302
- Fix parameter save as #323
- Pause error #321
- Fix data buffer issue #308
- GUI Refactor #337
- Create new `BCIUI` class for simpler more straightforward UI creation.
- Create dedicated external stylesheet for global styling
- Rewrite Experiment Registry to use new GUI code
- Create intertask action UI
- Task Return Object
- Task Return Object #334
- Create `TaskData` dataclass to be returned from tasks
- updates task `execute` methods to return an instance of `TaskData`
- Allows for optional storage of a save path and task dictionary in `TaskData`
-Experiment Refactor
-Experiment Refactor #333 #329
- Refactors the Experiment Field Collection GUI to be an action
- Allows task protocol to be defined in the orchestrator

Expand Down
135 changes: 135 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
"""Setup for bcipy package.
Installation:
To install locally, run:
pip install -e .
To install as a package, run:
python setup.py install
To create a distribution, run:
python setup.py sdist bdist_wheel
Release:
*credentials required*
PyPi: https://pypi.org/project/bcipy/
GitHub: https://github.com/CAMBI-tech/BciPy
To upload to PyPi and create git tags, run:
python setup.py upload
"""

import os
import platform
import sys
from shutil import rmtree

from setuptools import Command, find_packages, setup

# Package meta-data.
NAME = 'bcipy'
DESCRIPTION = 'Python Software for Brain-Computer Interface.'
URL = 'https://github.com/CAMBI-tech/BciPy'
EMAIL = '[email protected]'
AUTHOR = 'CAMBI'
REQUIRES_PYTHON = '>3.7,<3.11'

VERSION = '2.0.0rc4'

REQUIRED = []

# What packages are required for this module to be executed?
if platform.system() == 'Windows' or platform.system() == 'Darwin':
with open('requirements-winmac.txt', 'r', encoding='utf-8') as f:
REQUIRED += f.read().splitlines()
with open('requirements.txt', 'r', encoding='utf-8') as f:
REQUIRED += f.read().splitlines()

here = os.path.abspath(os.path.dirname(__file__))

long_description = 'Python Brain-Computer Interface Software'

about = {'__version__': VERSION}


class UploadCommand(Command):
"""Support setup.py upload.
Modified from https://github.com/kennethreitz/setup.py
"""

description = 'Build and publish the package.'
user_options = []

@staticmethod
def status(s):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(s))

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
try:
self.status('Removing previous builds…')
rmtree(os.path.join(here, 'dist'))
except OSError:
pass

self.status('Building Source and Wheel (universal) distribution…')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(sys.executable))

self.status('Uploading the package to PyPi via Twine…')
os.system('twine upload dist/*')

self.status('Pushing git tags…')
os.system('git tag v{0}'.format(about['__version__']))
os.system('git push --tags')

sys.exit()


# Where the magic happens:
setup(
name=NAME,
version=about['__version__'],
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
packages=find_packages(exclude=(
'tests',
'demo',
'data',
)),
entry_points={
'console_scripts':
[
'bcipy = bcipy.main:bcipy_main',
'bcipy-erp-viz = bcipy.helpers.visualization:erp',
'bcipy-sim = bcipy.simulator:main',
"bcipy-train = bcipy.signal.model.offline_analysis:main"],
},
install_requires=REQUIRED,
include_package_data=True,
license='Hippocratic License 2.1',
classifiers=[
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
'License :: Other/Proprietary License',
'Topic :: Scientific/Engineering :: Human Machine Interfaces',
'Intended Audience :: Science/Research',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
# $ setup.py publish support.
cmdclass={
'upload': UploadCommand,
},
)

0 comments on commit 18047a9

Please sign in to comment.