# COCUCO App

TODO: complete project description.

# Developers

This section provides guidance on how to start working on this app.

## Prerequisites

### Git

Git is the foundation of any healthy software project.
It tracks changes to the source code, allowing multiple people to collaborate.
See installation instructions here: https://git-scm.com/downloads.

### VS Code

VS Code is a text editor with advanced capabilities.
See installation instructions here: https://code.visualstudio.com/Download.

#### Python extension

The VS Code Python extension makes the developer's life much easier.
See installation instructions here: https://code.visualstudio.com/docs/python/python-tutorial.

### Conda

We'll use Conda to manage the development environment.
This will allow us to quickly set up a new development environment with the right dependencies.
See installation instructions here: https://docs.conda.io/en/latest/miniconda.html.

## Instructions

### Install all prerequisites

Make sure you have all the components before following these instructions.

### Clone source code

From a terminal run:

```
git clone <URL>
```

Where `URL` will be something like https://github.com/cocuco/app.
If you are reading this on GitHub or GitLab, you'll find instructions at the top of this page.

If you've never used Git before, I suggest you do this with someone else.
Git has a little steep learning curve but it pays off once you learn the basics.
I also suggest you take a couple of minutes to do this short tutorial: https://try.github.io/.

### Initialize environment with Conda

The `git clone` command will create a new folder and download the app source code there.
Change to that directory and use Conda to initialize your development environment.

```sh
cd <FOLDER>
conda env update
conda activate ml-over-molecules-interface
```

### VS Code

You can now open the cloned folder in there in VS Code.
You will now need to select the Conda installation as your interpreter.
You can find instructions on how to do that here: https://code.visualstudio.com/docs/python/environments

TL;DR: Hit `Ctrl+Shift+P` and type "Python: Select Interpreter", then pick the one called `ml-over-molecules-interface`.

### Run the app

Now it's time to run the app.
Go to the debug pane and hit "start debugging".
You can usually just press the `F5` key to do this.

If everything was successful you should see a message like this one:

```
 * Serving Flask app "app.py"
 * Environment: development
 * Debug mode: off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
```

Now open http://127.0.0.1:5000/cocuco in your browser and start coding!