Commit bf37ebaf authored by david's avatar david
Browse files

Python 3.8 as min requirement. #17

parent 3d301163
Pipeline #901 passed with stages
in 2 minutes and 40 seconds
image: python:3.7-buster
image: python:3.8-buster
stages:
- bundle
......
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- "3.7"
- "3.8"
# command to install dependencies
install: "pip3 install -r requirements.txt"
# command to run tests
......
FROM python:3.7-buster
FROM python:3.8-buster
# Initialize the project structure
......
......@@ -114,7 +114,7 @@ The most simple way to get started is by running Engine API using [Docker](https
If you are not planning to go with Docker or just want to setup a local development environment, then you'll need:
- [Python 3.7+](https://www.python.org/)
- [Python 3.8+](https://www.python.org/)
- [MariaDB](https://mariadb.org/)
- [Virtualenv](https://virtualenv.pypa.io/en/latest/)
......@@ -123,7 +123,7 @@ If you are not planning to go with Docker or just want to setup a local developm
Create a virtual environment for your Python dependencies:
```bash
virtualenv -p python3.7 python
virtualenv -p python3.8 python
```
To activate that environment, run
......@@ -370,7 +370,7 @@ All model files can usually be overwritten. Only controller and test classes nee
In the future it might be favorable to use a local Codegen to generate the API artifacts.
> Caveat: There is an issue with the generated source related to Python 3.7. Therefore `./src/rest/util.py` contains a workaround. Think about that when
> Caveat: There is an issue with the generated source related to Python 3.8. Therefore `./src/rest/util.py` contains a workaround. Think about that when
overwriting the existing file.
### Creating a local image
......
......@@ -43,8 +43,6 @@ if [[ $docker == "false" ]]; then
if [[ $mode == "api-dev" ]]; then
echo "Activating Python Environment"
source python/bin/activate
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server"
python src/app.py
fi
......@@ -52,22 +50,16 @@ if [[ $docker == "false" ]]; then
### Runs the API Server (Test) ###
if [[ $mode == "api-test-0" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 0"
/usr/bin/env python3.7 src/app.py config=tests/config/engine-0-api.ini
/usr/bin/env python3 src/app.py config=tests/config/engine-0-api.ini
fi
if [[ $mode == "api-test-1" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 1"
/usr/bin/env python3.7 src/app.py config=tests/config/engine-1-api.ini
/usr/bin/env python3 src/app.py config=tests/config/engine-1-api.ini
fi
if [[ $mode == "api-test-2" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 2"
/usr/bin/env python3.7 src/app.py config=tests/config/engine-2-api.ini
/usr/bin/env python3 src/app.py config=tests/config/engine-2-api.ini
fi
### Runs the API Server using Gunicorn without a system daemon (Production) ###
......@@ -87,7 +79,7 @@ if [[ $docker == "false" ]]; then
### CAUTION: This deletes everything in your database ###
if [[ $mode == "recreate-database" ]]; then
/usr/bin/env python3.7 src/app.py --recreate-database
/usr/bin/env python3 src/app.py --recreate-database
fi
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment