An open API service indexing awesome lists of open source software.

https://github.com/gesiscss/binder_gallery

Binder Gallery for GESIS Notebooks
https://github.com/gesiscss/binder_gallery

binder gallery gesis-binder

Last synced: 11 months ago
JSON representation

Binder Gallery for GESIS Notebooks

Awesome Lists containing this project

README

          

# Binder Gallery

Binder Gallery for [GESIS Notebooks](https://notebooks.gesis.org/)

## Run the gallery locally

1. Clone the repository and get into it
```bash
git clone https://github.com/gesiscss/binder_gallery.git
cd binder_gallery
```

2. [Create and activate a virtual environment](http://flask.pocoo.org/docs/1.0/installation/#virtual-environments)
with python version at least 3.7.

3. Install dependencies:
```bash
pip install -r dev_requirements.txt
```

4. Set required environment variables
```bash
export FLASK_APP=binder_gallery
export FLASK_ENV=development
# for windows
set FLASK_APP=binder_gallery
set FLASK_ENV=development
```

5. Create a local sqlite3 db and apply migrations
```bash
python manage.py db upgrade
```

6. Run the application
```bash
flask run
```
### Create user

1. With `create-user` command:

```bash
flask create-user
```

2. With flask shell:

2.1. Start a flask shell

```bash
flask shell
```

2.2. Run this code to create a user:

```python
from binder_gallery.models import User
User.create_user("name", "password")
```

## To have custom configuration

1. Create a config file `local_config.py` under project folder `binder_gallery`

2. Put your custom configuration:

```python
from config import Config as BaseConfig

class Config(BaseConfig):
# add your custom configuration here
```

3. Define the env variable for custom config:

```bash
export BG_APPLICATION_SETTINGS=local_config.Config
# for windows
set BG_APPLICATION_SETTINGS=local_config.Config
```

## TODOs

1. Remove GESIS related parts (templates, static files...)?

---

Funded by the German Research Foundation (DFG).
FKZ/project number:
[324867496](https://gepris.dfg.de/gepris/projekt/324867496?context=projekt&task=showDetail&id=324867496&).