Skip to content

Commit

Permalink
Drop Pipenv dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mirekdlugosz committed Oct 2, 2019
1 parent 8815ac3 commit 02e8434
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 190 deletions.
14 changes: 0 additions & 14 deletions backend/Pipfile

This file was deleted.

119 changes: 0 additions & 119 deletions backend/Pipfile.lock

This file was deleted.

22 changes: 15 additions & 7 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,29 @@ Flask application that provides data through REST service.

* Python 3.4 or later
* [Flask](http://flask.pocoo.org/)
* json module (should come with Python)
* [pipenv](https://github.com/pypa/pipenv) for installation
* JSON files created by data-reader component
* JSON files created by `data-reader` component

## Installation

Run following command:
Create new virtual environment and install dependencies from requirements.txt file in root of repository:

```
pipenv install --dev
$ python3 -m venv /path/to/venv
$ . /path/to/venv/bin/activate
$ pip install -r ../requirements.txt
```

Then, use `pokedexreader` command to create JSON data files:

```
$ pokedexreader <options> -o backend/api/data/
```

You can - and should! - use one virtual environment for both `backend` and `data-manager`.

## Usage

When running in virtualenv shell (`pipenv shell`), run:
When virtual environment for this project is active, run:

```
./run.py
Expand All @@ -30,7 +38,7 @@ REST service will be available at `http://127.0.0.1:8861/`.

## Running tests

When running in virtualenv shell (`pipenv shell`), run:
When virtual environment for this project is active, run:

```
pytest
Expand Down
19 changes: 0 additions & 19 deletions data-manager/Pipfile

This file was deleted.

25 changes: 0 additions & 25 deletions data-manager/Pipfile.lock

This file was deleted.

14 changes: 8 additions & 6 deletions data-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ data-manager takes data from specified source and outputs JSON files readable by
## Requirements

* Python 3.4 or later
* sqlite3 and json modules (should come with Python)
* [pipenv](https://github.com/pypa/pipenv) for installation
* SQLite file with data from [veekun Pokédex](https://github.com/veekun/pokedex)

## Installation

Run following command:
Create new virtual environment and install dependencies from requirements.txt file in root of repository:

```
pipenv install --dev
$ python3 -m venv /path/to/venv
$ . /path/to/venv/bin/activate
$ pip install -r ../requirements.txt
```

You can - and should! - use one virtual environment for both `backend` and `data-manager`.

## Setting up data source

This component requires some data source. Currently only SQLite file with veekun Pokédex is supported. You can acquire it by running following commands:
This component requires some data source. Currently only SQLite file with veekun Pokédex is supported. You can acquire it by running following commands; make sure to run them outside of **this** project repository:

```
git clone https://github.com/veekun/pokedex.git
Expand All @@ -34,7 +36,7 @@ Path to SQLite file will be printed out at the beginning of output. Or you can u

## Usage

When running in virtualenv shell (`pipenv shell`), run:
When virtual environment for this project is active, run:

```
pokedexreader --eevee <path_to_veekun_pokedex.sqlite> -o <path_to_backend/api/data/>
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
flask

--editable data-manager/
--editable backend/

pytest

0 comments on commit 02e8434

Please sign in to comment.