Skip to content

Commit

Permalink
Update informational content and version bump to 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Jul 6, 2024
1 parent 647cf5d commit a179427
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,40 @@

This contains a SWIG wrapper for Blackrock Microsystems CereStim API.

## Prerequisites
## Downloads

* [SWIG](http://www.swig.org/download.html). In Windows, get swigwin.
Head to the [releases page](https://github.com/CerebusOSS/CereStimWrapper/releases) to see if there is a release for you.

## Build

If there isn't a pre-made release for you, you can build it yourself. Blackrock only provides binaries for Windows x64 and Windows x86, so you can only target those platforms.

### Prerequisites

* [SWIG](http://www.swig.org/download.html). Download swigwin and extract the archive.
* [CereStim API (scroll down on support page)](https://blackrockneurotech.com/support/)
* Copy the extracted folder into this directory (i.e. `CereStimWrapper\CereStim-API`)
* Python
* A compiler (I think it should [match your Python version's compiler](https://wiki.python.org/moin/WindowsCompilers#Which_Microsoft_Visual_C.2B-.2B-_compiler_to_use_with_a_specific_Python_version_.3F))

## Build & Install
### Build & Install

1. Make sure swig.exe is on your PATH.
* via system environment variables
* via command prompt, e.g: `set PATH=%PATH%;%HOMEPATH%\Downloads\swigwin-4.1.1\swigwin-4.1.1`
1. May need to set PYTHON_INCLUDE and PYTHON_LIB
1. Open this directory in command prompt. (probably x64 Native Tools Command Prompt for VS 2019)
1. `swig -c++ -python -I"CereStim-API/Binaries/" cerestim/cerestim.i`
1. Switch to your Anaconda Prompt, activate an appropriate environment, and `cd` to this directory.
1. `pip install .`
2. Make sure swig.exe is on your PATH.
* via system environment variables
* via command prompt, e.g: `set PATH=%PATH%;%HOMEDRIVE%\%HOMEPATH%\Downloads\swigwin-4.2.1\swigwin-4.2.1`
3. May need to set PYTHON_INCLUDE and PYTHON_LIB
4. `swig -c++ -python -I"CereStim-API/Binaries/" cerestim/cerestim.i`
5. Switch to your Anaconda Prompt, activate an appropriate environment, and `cd` to this directory.
6. `pip install .` or `pip wheel .` to build only the wheel.

## Usage

I plan to make a more featureful Python package. For now, the compiled module can be imported directly.
The compiled module can be imported directly.
Read the Blackrock-provided documentation for more information on the API

```Python
import cerestim
```

You can also find a package that uses this wrapper at https://github.com/CerebusOSS/CereStimDBS
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

setup(
name = package_name,
version = '0.1',
version = '0.3.0',
author = 'Chadwick Boulay',
author_email = '[email protected]',
description = 'Wrapper for Blackrock Microsystems CereStim API',
Expand Down

0 comments on commit a179427

Please sign in to comment.