Skip to content
Snippets Groups Projects
Commit bf37ebaf authored by David Trattnig's avatar David Trattnig
Browse files

Python 3.8 as min requirement. #17

parent 3d301163
No related branches found
No related tags found
No related merge requests found
Pipeline #901 passed
image: python:3.7-buster image: python:3.8-buster
stages: stages:
- bundle - bundle
......
# ref: https://docs.travis-ci.com/user/languages/python # ref: https://docs.travis-ci.com/user/languages/python
language: python language: python
python: python:
- "3.7" - "3.8"
# command to install dependencies # command to install dependencies
install: "pip3 install -r requirements.txt" install: "pip3 install -r requirements.txt"
# command to run tests # command to run tests
......
FROM python:3.7-buster FROM python:3.8-buster
# Initialize the project structure # Initialize the project structure
......
...@@ -114,7 +114,7 @@ The most simple way to get started is by running Engine API using [Docker](https ...@@ -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: 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/) - [MariaDB](https://mariadb.org/)
- [Virtualenv](https://virtualenv.pypa.io/en/latest/) - [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 ...@@ -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: Create a virtual environment for your Python dependencies:
```bash ```bash
virtualenv -p python3.7 python virtualenv -p python3.8 python
``` ```
To activate that environment, run To activate that environment, run
...@@ -370,7 +370,7 @@ All model files can usually be overwritten. Only controller and test classes nee ...@@ -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. 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. overwriting the existing file.
### Creating a local image ### Creating a local image
......
...@@ -43,8 +43,6 @@ if [[ $docker == "false" ]]; then ...@@ -43,8 +43,6 @@ if [[ $docker == "false" ]]; then
if [[ $mode == "api-dev" ]]; then if [[ $mode == "api-dev" ]]; then
echo "Activating Python Environment" echo "Activating Python Environment"
source python/bin/activate source python/bin/activate
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server" echo "Starting API Server"
python src/app.py python src/app.py
fi fi
...@@ -52,22 +50,16 @@ if [[ $docker == "false" ]]; then ...@@ -52,22 +50,16 @@ if [[ $docker == "false" ]]; then
### Runs the API Server (Test) ### ### Runs the API Server (Test) ###
if [[ $mode == "api-test-0" ]]; then if [[ $mode == "api-test-0" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 0" 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 fi
if [[ $mode == "api-test-1" ]]; then if [[ $mode == "api-test-1" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 1" 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 fi
if [[ $mode == "api-test-2" ]]; then if [[ $mode == "api-test-2" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 2" 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 fi
### Runs the API Server using Gunicorn without a system daemon (Production) ### ### Runs the API Server using Gunicorn without a system daemon (Production) ###
...@@ -87,7 +79,7 @@ if [[ $docker == "false" ]]; then ...@@ -87,7 +79,7 @@ if [[ $docker == "false" ]]; then
### CAUTION: This deletes everything in your database ### ### CAUTION: This deletes everything in your database ###
if [[ $mode == "recreate-database" ]]; then 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
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment