62 lines
1.4 KiB
Markdown
62 lines
1.4 KiB
Markdown
# How to use the fish book
|
|
|
|
## Requirements
|
|
|
|
* Python 3.5+ only, **no** python 2
|
|
* [datajoint](https://datajoint.io) to connect to the database and to map python objects to table entries.
|
|
* [nixio](https://github.com/g-node/nixpy) to read the relacs-flavored nix files during import or later during data retrieval.
|
|
|
|
## Installation
|
|
|
|
### 1) Clone the repository
|
|
|
|
```bash
|
|
>> git clone https://whale.am28.uni-tuebingen.de/git/jgrewe/fishbook.git
|
|
```
|
|
|
|
### 2) Installation
|
|
|
|
When installing for development: install for the current user, install as "editable":
|
|
|
|
```bash
|
|
>> cd fishbook
|
|
>> pip3 install -e fishbook --user
|
|
```
|
|
|
|
When installing for use:
|
|
|
|
```bash
|
|
>> pip3 install fishbook --user
|
|
# or, for system-wide installation
|
|
>> sudo pip3 install fishbook
|
|
```
|
|
|
|
### 3) Connecting to the database
|
|
|
|
#### Installing a local database
|
|
|
|
When you want to run *fishbook* locally you need to install a local database server (either mariaDB or mysql).
|
|
|
|
On Ubuntu or Linux mint use *apt* to install the server
|
|
|
|
```bash
|
|
sudo apt install mysql
|
|
```
|
|
|
|
On Fedora use *dnf*
|
|
|
|
```bash
|
|
sudo dnf install mysql
|
|
```
|
|
|
|
On MacOS the most convenient way is to use [*homebrew*](https://brew.sh)
|
|
|
|
```bash
|
|
brew install mysql
|
|
```
|
|
|
|
On Windows you probably need to download an installer...
|
|
|
|
#### Database connection
|
|
|
|
Suppose that you intend to work on a project named `foo` use the terminal to navigate to the project directory: `cd foo` |