Skip to content

Commit

Permalink
add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bimac committed Sep 12, 2023
1 parent cf5e333 commit 296a034
Show file tree
Hide file tree
Showing 108 changed files with 28,244 additions and 28,207 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ exclude =
.git,
scratch_*.py,
Bonsai,
venv*
venv*
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
force_orphan: true
force_orphan: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ app.log
/.idea/*
/venv/
*.autosave
build
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-toml

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
2 changes: 1 addition & 1 deletion Bonsai/Bonsai.config
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@
<LibraryFolder path="Packages\Rhythm.Net.1.5.0\build\native\bin\x64" platform="x64" />
<LibraryFolder path="Packages\Rhythm.Net.1.5.0\build\native\bin\x86" platform="x86" />
</LibraryFolders>
</PackageConfiguration>
</PackageConfiguration>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
<HintPath>$(MSBuildThisFileDirectory)..\..\build\net45\bin\x64\FlyCapture2Managed_v100.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
</None>
</ItemGroup>
</Target>
</Project>
</Project>
2 changes: 1 addition & 1 deletion Bonsai/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ if (!(Test-Path "./Bonsai.exe")) {
Expand-Archive "temp.zip" -DestinationPath "." -Force
Remove-Item -Path "temp.zip"
}
& .\Bonsai.exe --no-editor
& .\Bonsai.exe --no-editor
2 changes: 1 addition & 1 deletion Bonsai/setup.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
powershell -ExecutionPolicy Bypass -File .\install.ps1
powershell -ExecutionPolicy Bypass -File .\install.ps1
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ 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.
SOFTWARE.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Welcome to the International Brain Laboratory decision making task implementation.

The task is implemented in the Bpod system (Sanworks) and uses the Bonsai visual programming language (on Windows) for the visual stimuli and Python for all other purposes.
The task is implemented in the Bpod system (Sanworks) and uses the Bonsai visual programming language (on Windows) for the visual stimuli and Python for all other purposes.


## Documentation and installation steps here:
Expand All @@ -19,14 +19,14 @@ python -m unittest discover ./iblrig/test
### Build the documentation
```shell
# make sure pre-requisites are installed
pip install -r requirements-dev.txt
pip install -r requirements-dev.txt
# create the static directory
rm -rf ./docs/build
mkdir -p ./docs/build/html/_static
mkdir -p ./docs/build/html/_static
# unit tests generate task diagrams
python -m unittest discover ./iblrig/test
python -m unittest discover ./iblrig/test
# generate class diagrams
pyreverse -o png -m y --ignore iblrig.test -A --output-directory ./docs/build/html/_static ./iblrig_tasks
pyreverse -o png -m y --ignore iblrig.test -A --output-directory ./docs/build/html/_static ./iblrig_tasks
# build and serve the docs locally
sphinx-autobuild ./docs/source ./docs/build/html/
sphinx-autobuild ./docs/source ./docs/build/html/
```
2 changes: 1 addition & 1 deletion devices/camera_recordings/Extensions/GetFrameData.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
<Edge From="15" To="16" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
2 changes: 1 addition & 1 deletion devices/camera_recordings/Osc.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<RemoteHostName>127.0.0.1</RemoteHostName>
<RemotePort>0</RemotePort>
</TransportConfiguration>
</TransportConfigurationSettings>
</TransportConfigurationSettings>
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@
<Edge From="17" To="18" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,4 @@
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
2 changes: 1 addition & 1 deletion devices/camera_recordings/one_camera.bonsai.layout
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,4 @@
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
2 changes: 1 addition & 1 deletion devices/camera_setup/setup_video.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@
<Edge From="13" To="14" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
2 changes: 1 addition & 1 deletion devices/camera_setup/setup_video.bonsai.layout
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@
<IplImageVisualizer />
</VisualizerSettings>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
2 changes: 1 addition & 1 deletion devices/harp_photodiode/photodiode_harp.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
<Edge From="1" To="2" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
2 changes: 1 addition & 1 deletion devices/harp_photodiode/photodiode_harp.bonsai.layout
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@
</DialogSettings>
</EditorVisualizerLayout>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,4 @@ def process(value):
<Edge From="25" To="26" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
Original file line number Diff line number Diff line change
Expand Up @@ -542,4 +542,4 @@
</DialogSettings>
</EditorVisualizerLayout>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
2 changes: 1 addition & 1 deletion devices/microphone/record_mic.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
<Edge From="9" To="10" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
2 changes: 1 addition & 1 deletion devices/microphone/record_mic.bonsai.layout
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
2 changes: 1 addition & 1 deletion devices/screen_calibration/AppleLCD_EDID.txt

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion devices/screen_calibration/instructions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ Hue -> 0

Click on Apply (bottom right of the window)
Close the Nvidia control panel.

2 changes: 1 addition & 1 deletion devices/screen_calibration/wrkflws/Extensions/range.bonsai
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@
<Edge From="12" To="13" Label="Source1" />
</Edges>
</Workflow>
</WorkflowBuilder>
</WorkflowBuilder>
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@
</Size>
<WindowState>Normal</WindowState>
</DialogSettings>
</VisualizerLayout>
</VisualizerLayout>
2 changes: 1 addition & 1 deletion devices/screen_calibration/wrkflws/Osc.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
<RemoteHostName>localhost</RemoteHostName>
<RemotePort>6668</RemotePort>
</TransportConfiguration>
</TransportConfigurationSettings>
</TransportConfigurationSettings>
2 changes: 1 addition & 1 deletion devices/screen_calibration/wrkflws/Shaders.config
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
<QuadEffects>None</QuadEffects>
</MeshConfiguration>
</Meshes>
</ShaderWindowSettings>
</ShaderWindowSettings>
Loading

0 comments on commit 296a034

Please sign in to comment.