Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Fabbri committed Oct 4, 2022
2 parents adba5bd + c4046dd commit c176a50
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 77 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 International Brain Laboratory

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
64 changes: 57 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,76 @@
# PyBpod #
# iblpybpod #

**version:** 1.8.2a2
**version:** 2.0.0

iblpybpod is a GUI application that enables interaction with the Bpod device from [Sanworks](https://sanworks.io/). Much credit
and thanks go to the original creators of the [pybpod project](https://github.com/pybpod/pybpod).

This project is has recently been adopted by the software development team at the International Brain Lab and is very much a 'work
in progress' at the moment.
This project has recently been adopted by the software development team at the International Brain Lab to bring the code into
modernity.

## Steps to install ##
## Installation for use

Currently, only Python v3.8 on Ubuntu 22.04 and Windows 10 is being tested.

### Python venv commands for setup
```bash
python3.8 -m venv iblpybpod
source iblpybpod/bin/activate
python -m pip install --upgrade pip wheel
python -m pip install iblpybpod
start-pybpod
```

### Anaconda commands for setup
```bash
conda create --name iblpybpod python=3.8
conda activate iblpybpod
pip install iblpybpod
start-pybpod
```

## Steps to setup development environment ##
---

## For developers
This repository is adhering to the following conventions:
* [semantic versioning](https://semver.org/) for consistent version numbering logic
* [gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) for managing branches
* [Flake8](https://flake8.pycqa.org/) for style guide enforcement

![](README_semver.png)
![](README_gitflow_workflow.png)

Please review these conventions to more easily contribute to the project.

### New feature branches:
- a `new_feature` branch is forked from the current `develop` branch
- the `new_feature` branch is then merged back into the `develop` branch
- the `new_feature` branch will eventually be deleted

### Release candidate branches:
- a release candidate, `rc` branch is a "pre-release" branch for beta testers on production rigs
- the `rc` branch is forked from the `develop` branch
- once the `rc` has been thoroughly tested, it will be merged into `master` and `develop`
- the `rc` branch will eventually be deleted

### Hotfix branches:
- a `hotfix` or `maintenance` branch is forked from `master`
- once the fix has been thoroughly tested, it will get merged back into `master` and `develop`
- the `hotfix` branch will eventually be deleted

### Python venv commands for setup
```bash
python3.8 -m venv iblpybpod-dev
source iblpybpod-dev/bin/activate
python -m pip install --upgrade pip wheel
git clone https://github.com/int-brain-lab/iblpybpod
python -m pip install --editable iblpybpod
```

### Anaconda commands for setup
```bash
conda create --name iblpybpod-dev python=3.8
conda activate iblpybpod-dev
git clone https://github.com/int-brain-lab/iblpybpod
pip install --editable iblpybpod
start-pybpod
```
Binary file added README_gitflow_workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README_semver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 21 additions & 22 deletions CHANGELOG.rst → release_notes.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# **Release Notes**

Changelog
=========
v1.8.2 (2020/02/10)
-------------------
## **v2.0.0 (2022-10-04)**
- first IBL release
- flattened git submodule structure to a single module
- removed a multitude of abandoned packages
- mogrified all png files
- simplified logging
- python v3.8 support
- modern pandas python package support
- github actions automated pypi package publishing

## v1.8.2 (2020/02/10)
- pybpod-gui-plugin (v1.8.2)
- Changed 'Skip all trials' button to 'Stop'
- Changed 'Stop trial' button to 'Skip trial'
- pybpod-gui-plugin-emulator (v0.1.5)
- Update button names

v1.8.1 (2019/12/09)
-------------------
## v1.8.1 (2019/12/09)
- pybpod-api (v1.8.1)
- Fixed global_timer output actions for GlobalTimerTrig
- Fixed default send_events value on set_global_timer to 1 (as expected in the Bpod firmware)

v1.8.0 (2019/11/09)
-------------------
## v1.8.0 (2019/11/09)
- PyBpod's version number is now shared between the main packages of PyBpod
(pybpod, pybpod-api, pybpod-gui-api and pybpod-gui-plugin).
- pybpod-api (v1.8.0)
Expand All @@ -40,24 +46,20 @@ v1.8.0 (2019/11/09)
- Added libusb backend support
- Increased timeout duration on read

v1.7.8 (2019/06/03)
-------------------
## v1.7.8 (2019/06/03)
- Fixed a problem with the setup requirements

v1.7.7 (2019/06/03)
-------------------
## v1.7.7 (2019/06/03)
- Fixed a problem with pybpod-gui-plugin-waveplayer.

v1.7.6 (2019/06/03)
-------------------
## v1.7.6 (2019/06/03)
- Requirements for PyBpod now point to specific package versions to ease upgrades
- pybpod-api (updated to v1.6.4)
- Fixed problem with bad indexing when accessing modules in _bpodcom_module_write
- pybpod-gui-plugin-waveplayer (v1.0)
- Corrected version number in the package and PyPi

v1.7.5 (2019/05/15)
-------------------
## v1.7.5 (2019/05/15)
- pybpod-gui-plugin (updated to v1.6.2)
- Fixed png that was creating a warning on PyBpod initialization
- Now it points correctly to the master branch
Expand All @@ -73,16 +75,13 @@ v1.7.5 (2019/05/15)
- pybpod-soundcard-module (v0.1.5)
- Added bumpversion support to this module

v1.7.4 (2019/05/08)
-------------------
## v1.7.4 (2019/05/08)
- The pybpodgui_plugin_session_history is now pointing to the master branch as it should (v1.4.1)

v1.7.3 (2019/05/08)
-------------------
## v1.7.3 (2019/05/08)
- Fixed problem with wrong pybpod-alyx-module version (now it is v1.1)

v1.7.2 (2019/05/03)
-------------------
## v1.7.2 (2019/05/03)
- Python base version changed to v3.6.6
- Conda environment files are now more coherent between Windows and Linux
- pybpod-api (updated to v1.6.3)
Expand Down
3 changes: 0 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ confapp
markdown2
matplotlib
numpy
# ONE-api
# opencv-python
opencv-python==4.3.0.36 # locking down may just be necessary on dev box
pandas
# pydot
PyOpenGL
PyQt5
PyQtWebEngine
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

IBLPYBPOD_CURRENT_VERSION = "1.8.2a3"
IBLPYBPOD_CURRENT_VERSION = "2.0.0"
CURRENT_DIRECTORY = Path(__file__).parent
CURRENT_PYTHON_VERSION = sys.version_info[:2]
REQUIRED_PYTHON_VERSION = (3, 8)
Expand All @@ -26,7 +26,6 @@

setup(
name='iblpybpod',
# version=get_version(Path("iblpybpod").joinpath("__init__.py")),
version=IBLPYBPOD_CURRENT_VERSION,
python_requires='>={}.{}'.format(*REQUIRED_PYTHON_VERSION),
description='IBL implementation of pybpod software',
Expand Down
32 changes: 19 additions & 13 deletions tests/test_iblrig_params.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Entry point for iblpybpod
# /home/michele/Documents/repos/iblpybpod/src/pybpodgui_plugin/__main__.py
import os
import shutil
from pathlib import Path
Expand All @@ -12,21 +10,17 @@ def create_setup(exp, setup_name: str, board: str, subj: object, task: str = Non
# task name is defined as the experiment_name + '_' + setup_name
# Create or get preexisting setup
setup = exp.create_setup()

setup.name = setup_name
setup.task = task if isinstance(task, str) else exp.name + "_" + setup_name
setup.board = board
setup += subj
setup.detached = True

return setup


def setup_iblpybpod_for_iblrig_params():
def setup_iblpybpod_for_iblrig_params(iblrig_path: Path, iblrig_params_path: Path):
# Set path vars
iblrig_path = Path("/home/michele/Documents/repos/iblrig")
iblrig_tasks_path = iblrig_path / "tasks"
iblrig_params_path = Path("/home/michele/Documents/iblrig_params") # IBLRIG_FOLDER.parent / "iblrig_params"
iblrig_params_plugins_path = iblrig_params_path / "plugins"
iblrig_params_project_path = iblrig_params_path / "IBL"
iblrig_params_project_tasks_path = iblrig_params_project_path / "tasks"
Expand Down Expand Up @@ -80,7 +74,19 @@ def setup_iblpybpod_for_iblrig_params():
# create ibl tasks
task_names = [
"_iblrig_calibration_screen",
"_iblrig_calibration_water"
"_iblrig_calibration_water",
"_iblrig_calibration_input_listner",
"_iblrig_calibration_frame2TTL",
"_iblrig_misc_flush_water",
"_iblrig_misc_bpod_ttl_test",
"_iblrig_misc_frame2TTL_freq_test",
"_iblrig_tasks_biasedChoiceWorld",
"_iblrig_tasks_habituationChoiceWorld",
"_iblrig_tasks_trainingChoiceWorld",
"_iblrig_tasks_ephysChoiceWorld",
"_iblrig_tasks_ephys_certification",
"_iblrig_tasks_passiveChoiceWorld",
"_iblrig_tasks_passiveChoiceWorldIndependent"
]
for task_name in task_names:
# create task
Expand All @@ -94,8 +100,6 @@ def setup_iblpybpod_for_iblrig_params():
p.load(iblrig_params_project_path)
task = p.find_task(task_name)
task._commands = []
if task.name == "_iblrig_calibration_screen":
print("configuring task")
p.save(str(iblrig_params_project_path))

# create ibl experiments
Expand Down Expand Up @@ -169,6 +173,8 @@ def setup_iblpybpod_for_iblrig_params():


if __name__ == "__main__":
setup_iblpybpod_for_iblrig_params()
os.chdir("/home/michele/Documents/iblrig_params/")
pybpod_start()
iblrig_path = Path.home() / "Documents" / "repos" / "iblrig"
iblrig_params_path = Path.home() / "Documents" / "iblrig_params"
setup_iblpybpod_for_iblrig_params(iblrig_path, iblrig_params_path)
os.chdir(iblrig_params_path)
pybpod_start()
14 changes: 0 additions & 14 deletions tests/test_imports.py

This file was deleted.

16 changes: 0 additions & 16 deletions user_settings.yml

This file was deleted.

0 comments on commit c176a50

Please sign in to comment.