Skip to content

Commit bc44ae7

Browse files
authored
2.0.0 (#394)
1 parent b551dbc commit bc44ae7

File tree

309 files changed

+19963
-15234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+19963
-15234
lines changed

.bcipy/README.md

Lines changed: 0 additions & 36 deletions
This file was deleted.
-29.3 KB
Binary file not shown.

.coveragerc

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python-version: [3.8, 3.9, 3.10.6]
21+
python-version: [3.9, 3.10.6]
2222

2323
steps:
2424
- uses: actions/checkout@v2
@@ -69,7 +69,7 @@ jobs:
6969
strategy:
7070
fail-fast: false
7171
matrix:
72-
python-version: [3.8, 3.9, 3.10.6]
72+
python-version: [3.9, 3.10.6]
7373

7474
steps:
7575
- uses: actions/checkout@v2
@@ -80,10 +80,6 @@ jobs:
8080
- name: update pip & install custom dependencies
8181
run: |
8282
python -m pip install --upgrade pip
83-
- name: install manually downloaded pyWinhook wheel for Python 3.9
84-
if: matrix.python-version == 3.9
85-
run: |
86-
pip install ./.bcipy/downloads/pyWinhook-1.6.2-cp39-cp39-win_amd64.whl
8783
- name: install dependencies
8884
run: |
8985
make dev-install
@@ -97,17 +93,17 @@ jobs:
9793
- name: lint
9894
run: |
9995
make lint
100-
- name: integration-test
96+
- name: build
10197
run: |
102-
make integration-test
98+
make build
10399
104100
build-macos:
105101

106-
runs-on: macos-latest
102+
runs-on: macos-14
107103
strategy:
108104
fail-fast: false
109105
matrix:
110-
python-version: [3.8, 3.9, 3.10.6]
106+
python-version: [3.9, 3.10.6]
111107

112108
steps:
113109
- uses: actions/checkout@v4
@@ -117,24 +113,30 @@ jobs:
117113
python-version: ${{ matrix.python-version }}
118114
- name: update pip & install custom dependencies
119115
run: |
116+
python -m pip install --upgrade pip
117+
brew update
120118
sh scripts/shell/m2chip_install.sh
121119
brew install labstreaminglayer/tap/lsl
122-
python -m pip install --upgrade pip
120+
pip install psychopy --no-deps
121+
make install
123122
- name: install dependencies
124123
run: |
125124
make dev-install
126125
- name: unittest
127126
if: always()
128127
run: |
129128
make coverage-report
129+
make coverage-xml
130130
- name: type-check
131131
run: |
132132
make type
133133
- name: lint
134134
run: |
135135
make lint
136-
- name: integration-test
136+
- name: build
137137
run: |
138-
make integration-test
139-
140-
138+
make build
139+
- name: codacy
140+
run: |
141+
export CODACY_PROJECT_TOKEN=${{ secrets.CODACY_PROJECT_TOKEN }}
142+
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r "cobertura.xml"

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ mypy-html.css
1111
index.html
1212
htmlcov/
1313
html/
14+
*.xml
1415

1516
# Virtualenv
1617
venv/
1718
venv*/
1819
__pycache__/
20+
.pytest_cache/
1921
.cache/
2022

2123
# BciPy files and directories
22-
*.csv
2324
*.pdf
2425
buffer.db
2526
lmwrap.log
2627
env.txt
2728
.idea
2829
bcipy.egg-info/
29-
data/
3030
build/
3131
dist/
3232
bcipy/parameters/parameters_*
@@ -35,6 +35,9 @@ bcipy/language/lms/lm_dec19_char_large_12gram.*
3535
bcipy/language/lms/out_*
3636
bcipy/language/out/
3737

38-
3938
bcipy/simulator/tests/resource/
40-
!bcipy/simulator/data
39+
# Ignore the data directory, which contains the raw data files, but not the data modules
40+
data/
41+
bids/
42+
!bcipy/simulator/data
43+

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# 2.0.0
2+
3+
The next major BciPy release is here! All features included from release canidates rc1-rc4 and contributions described below.
4+
5+
## Contributions
6+
7+
- BIDS
8+
- Bundling support and refactor of `convert` module. See `demo_convert.py` #362 Add support for 1020 channels and eye tracker data #369
9+
- Library Refactor
10+
- Refactor `helpers` into `io` and `core` #362
11+
- Refactor to use `pyproject.toml` for installs #367
12+
- Language Model Refactor to use lm-toolkit #381 #390
13+
- Gaze Model integration #384
14+
- Simulator
15+
- Multimodal support #385
16+
- Replay feature #376
17+
- Verbose mode configuration #375 and logging fixes #373
18+
- Inquiry- Ranger Sampler #374 Trial Sampler #372
19+
- Metrics #371
20+
- Dependencies
21+
- Upgrade
22+
- `seaborn` #362
23+
- Add
24+
- `mne-bids` #362
25+
- `pybv` #362
26+
- `EDFlib-Python` #362
27+
- Remove
28+
- `pyedflib` #362
29+
- Drop support for python 3.8 #391
30+
- General documentation improvements
31+
- README updates #391
32+
- Drop Twitter links #391
33+
134
# 2.0.1-rc.4
235

336
Patch on final release candidate

LICENSE.md

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,11 @@
1-
BciPy Copyright 2021 (CAMBI)(Licensor)
1+
Copyright 2025 (CAMBI)("Licensor")
22

3-
Hippocratic License Version Number: 2.1.
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
44

5-
Purpose. The purpose of this License is for the Licensor named above to permit the Licensee (as defined below) broad permission, if consistent with Human Rights Laws and Human Rights Principles (as each is defined below), to use and work with the Software (as defined below) within the full scope of Licensor’s copyright and patent rights, if any, in the Software, while ensuring attribution and protecting the Licensor from liability.
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
66

7-
Permission and Conditions. The Licensor grants permission by this license (“License”), free of charge, to the extent of Licensor’s rights under applicable copyright and patent law, to any person or entity (the “Licensee”) obtaining a copy of this software and associated documentation files (the “Software”), to do everything with the Software that would otherwise infringe (i) the Licensor’s copyright in the Software or (ii) any patent claims to the Software that the Licensor can license or becomes able to license, subject to all of the following terms and conditions:
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
88

9-
* Acceptance. This License is automatically offered to every person and entity subject to its terms and conditions. Licensee accepts this License and agrees to its terms and conditions by taking any action with the Software that, absent this License, would infringe any intellectual property right held by Licensor.
9+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1010

11-
* Notice. Licensee must ensure that everyone who gets a copy of any part of this Software from Licensee, with or without changes, also receives the License and the above copyright notice (and if included by the Licensor, patent, trademark and attribution notice). Licensee must cause any modified versions of the Software to carry prominent notices stating that Licensee changed the Software. For clarity, although Licensee is free to create modifications of the Software and distribute only the modified portion created by Licensee with additional or different terms, the portion of the Software not modified must be distributed pursuant to this License. If anyone notifies Licensee in writing that Licensee has not complied with this Notice section, Licensee can keep this License by taking all practical steps to comply within 30 days after the notice. If Licensee does not do so, Licensee’s License (and all rights licensed hereunder) shall end immediately.
12-
13-
* Compliance with Human Rights Principles and Human Rights Laws.
14-
15-
1. Human Rights Principles.
16-
17-
(a) Licensee is advised to consult the articles of the United Nations Universal Declaration of Human Rights and the United Nations Global Compact that define recognized principles of international human rights (the “Human Rights Principles”). Licensee shall use the Software in a manner consistent with Human Rights Principles.
18-
19-
(b) Unless the Licensor and Licensee agree otherwise, any dispute, controversy, or claim arising out of or relating to (i) Section 1(a) regarding Human Rights Principles, including the breach of Section 1(a), termination of this License for breach of the Human Rights Principles, or invalidity of Section 1(a) or (ii) a determination of whether any Law is consistent or in conflict with Human Rights Principles pursuant to Section 2, below, shall be settled by arbitration in accordance with the Hague Rules on Business and Human Rights Arbitration (the “Rules”); provided, however, that Licensee may elect not to participate in such arbitration, in which event this License (and all rights licensed hereunder) shall end immediately. The number of arbitrators shall be one unless the Rules require otherwise.
20-
21-
Unless both the Licensor and Licensee agree to the contrary: (1) All documents and information concerning the arbitration shall be public and may be disclosed by any party; (2) The repository referred to under Article 43 of the Rules shall make available to the public in a timely manner all documents concerning the arbitration which are communicated to it, including all submissions of the parties, all evidence admitted into the record of the proceedings, all transcripts or other recordings of hearings and all orders, decisions and awards of the arbitral tribunal, subject only to the arbitral tribunal's powers to take such measures as may be necessary to safeguard the integrity of the arbitral process pursuant to Articles 18, 33, 41 and 42 of the Rules; and (3) Article 26(6) of the Rules shall not apply.
22-
23-
2. Human Rights Laws. The Software shall not be used by any person or entity for any systems, activities, or other uses that violate any Human Rights Laws. “Human Rights Laws” means any applicable laws, regulations, or rules (collectively, “Laws”) that protect human, civil, labor, privacy, political, environmental, security, economic, due process, or similar rights; provided, however, that such Laws are consistent and not in conflict with Human Rights Principles (a dispute over the consistency or a conflict between Laws and Human Rights Principles shall be determined by arbitration as stated above). Where the Human Rights Laws of more than one jurisdiction are applicable or in conflict with respect to the use of the Software, the Human Rights Laws that are most protective of the individuals or groups harmed shall apply.
24-
25-
3. Indemnity. Licensee shall hold harmless and indemnify Licensor (and any other contributor) against all losses, damages, liabilities, deficiencies, claims, actions, judgments, settlements, interest, awards, penalties, fines, costs, or expenses of whatever kind, including Licensor’s reasonable attorneys’ fees, arising out of or relating to Licensee’s use of the Software in violation of Human Rights Laws or Human Rights Principles.
26-
27-
* Failure to Comply. Any failure of Licensee to act according to the terms and conditions of this License is both a breach of the License and an infringement of the intellectual property rights of the Licensor (subject to exceptions under Laws, e.g., fair use). In the event of a breach or infringement, the terms and conditions of this License may be enforced by Licensor under the Laws of any jurisdiction to which Licensee is subject. Licensee also agrees that the Licensor may enforce the terms and conditions of this License against Licensee through specific performance (or similar remedy under Laws) to the extent permitted by Laws. For clarity, except in the event of a breach of this License, infringement, or as otherwise stated in this License, Licensor may not terminate this License with Licensee.
28-
29-
* Enforceability and Interpretation. If any term or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, then such invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction; provided, however, subject to a court modification pursuant to the immediately following sentence, if any term or provision of this License pertaining to Human Rights Laws or Human Rights Principles is deemed invalid, illegal, or unenforceable against Licensee by a court of competent jurisdiction, all rights in the Software granted to Licensee shall be deemed null and void as between Licensor and Licensee. Upon a determination that any term or provision is invalid, illegal, or unenforceable, to the extent permitted by Laws, the court may modify this License to affect the original purpose that the Software be used in compliance with Human Rights Principles and Human Rights Laws as closely as possible. The language in this License shall be interpreted as to its fair meaning and not strictly for or against any party.
30-
31-
* Disclaimer. TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES “AS IS,” WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR AND ANY OTHER CONTRIBUTOR SHALL NOT BE LIABLE TO ANYONE FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY KIND OF LEGAL CLAIM.
32-
33-
This Hippocratic License is an Ethical Source license (https://ethicalsource.dev) and is offered for use by licensors and licensees at their own risk, on an “AS IS” basis, and with no warranties express or implied, to the maximum extent permitted by Laws.
11+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@ install:
22
pip install -e .
33

44
dev-install:
5-
pip install -r dev_requirements.txt
6-
pip install kenlm==0.1 --global-option="--max_order=12"
5+
pip install -e ".[dev]"
76
make install
87

98
build:
10-
make dev-install
11-
python setup.py sdist bdist_wheel
9+
pip install -e ".[release]"
10+
python -m build --sdist --wheel
1211

1312
test-all:
1413
make coverage-report
1514
make type
1615
make lint
17-
make integration-test
1816

1917
unit-test:
2018
pytest --mpl -k "not slow"
@@ -23,18 +21,21 @@ integration-test:
2321
pytest --mpl -k "slow"
2422

2523
coverage-report:
26-
coverage run --branch --source=bcipy -m pytest --mpl -k "not slow"
24+
coverage run --branch -m pytest --mpl -k "not slow"
2725
coverage report
2826

27+
coverage-xml:
28+
coverage xml -o "cobertura.xml"
29+
2930
coverage-html:
30-
coverage run --branch --source=bcipy -m pytest --mpl -k "not slow"
31+
coverage run --branch -m pytest --mpl -k "not slow"
3132
coverage html
3233

3334
lint:
3435
flake8 bcipy
3536

3637
lint-fix:
37-
autopep8 --in-place --aggressive -r bcipy
38+
autopep8 --in-place --aggressive --max-line-length 120 --ignore "E402,E226,E24,W50,W690" -r bcipy
3839
flake8 bcipy
3940

4041
type:
@@ -47,6 +48,15 @@ clean:
4748
find . -name "*.py[co]" -o -name __pycache__ -exec rm -rf {} +
4849
find . -path "*/*.pyo" -delete
4950
find . -path "*/*.pyc" -delete
51+
find . -path "*/*/__pycache__" -delete
52+
rm -rf .pytest_cache
53+
rm -rf .mypy_cache
54+
rm -rf .coverage
55+
rm -rf htmlcov
56+
rm -rf dist
57+
rm -rf build
58+
rm -rf bcipy.egg-info
59+
rm -rf bcipy_cache
5060

5161
bci-gui:
5262
python bcipy/gui/BCInterface.py

0 commit comments

Comments
 (0)