more docs, move fixmes

This commit is contained in:
Jan Grewe 2020-07-22 11:01:29 +02:00
parent eaaf8a71b5
commit 8af1591f33
3 changed files with 46 additions and 10 deletions

View File

@ -10,12 +10,4 @@ Database of data recorded in the group.
* Question: should we store the sampling rate and hardware info in the database?
* ID card for each cell
## FIXMEs
* repro must have foreign keys to dataset **and** subject
* Dataset finding samplerate in stimuli.dat can be improved
* Reading fi data from old-style directories
* maybe delegate this to Stimulus?
* implement alternative dataSources, somehow
* stimulus contrast is not read from nix file (e.g. filestimulus) maybe a problem with all mutables?
* Add relacs_nix_version to dataset, could be used to decide how to read stuff, in particular, we will switch to DataFrames for most features after nixio version 1.5
**FIXMEs & stuff that needs to be done, check out the to docs folder**

View File

@ -9,3 +9,42 @@ To log into the database you need the `host`, the `database name`, the `user` na
Note, the selected user needs at least read access on the selected database (True? maybe also write?).
The root of the fishbook package contains a file called *template_dj_local_conf.json*. copy this file to your project folder, i.e. the location from which you call your scripts, remove the `template_` prefix and fill in `database.host`, `database.user`, `database.password`.
The json template looks like this:
```json
{
"database.host": "yourhost",
"database.user": "yourdatabaseusername",
"database.password": "yourdatabaseuserpassword",
"database.port": 3306,
"loglevel": "DEBUG",
"display.width": 14,
"display.limit": 7,
"safemode": false,
"connection.init_function": null
}
```
### Example
Let's assume you are working remotely, i.e. connecting to a remote database on a server that has the name ```foo.uni-xyz.de```. The database is up and running and allows connections via port 3306 (the default). The database is called ```fish_db``` and the user credentials are name ```baz``` and password ```bar```. The configuration file will look like this:
```json
{
"database.host": "foo.uni-xyz.de",
"database.user": "bar",
"database.password": "baz",
"database.port": 3306,
"loglevel": "DEBUG",
"display.width": 14,
"display.limit": 7,
"safemode": false,
"connection.init_function": null
}
```
In case you are working with a local database the ```database.host``` entry is ```"localhost"```.
If you ommit ```database.user``` or ```database.password``` fishbook, respectively datajoint, will ask you for the user credentials every time you run your python scripts.
**Note:** This configuration file is pure text and can be easily read by anyone. It **must not** be part of public repository. **Do not add it to your version control system!**

View File

@ -1,4 +1,9 @@
# Getting started
# Getting started working with fishbook
create a project folder and place the configuration file in it (see [configuration](./configuration.md) for more info on it)
## Package contents
```python
import fishbook as fb
```