forked from loafle/openapi-generator-original
Add python-experimental-openapiv3-sample Add missing files for the Python samples Add python-experimental-petstore.bat for openapi v3 Add python-experimental samples openapi v3 Add python-experimental samples openapi v3 Add python-experimental samples openapi v3. Address review comments add missing files for test purpose fix python formatting issues fix python formatting issues fix python formatting issues Fix unit tests fix python formatting issues fix python formatting issues fix python formatting issues fix 'line too long' pep8 error address PR comments for pep8 'line too long' problem regenerate samples execute samples scripts dummy commit to retrigger circleci Revert dummy commit, it didn't help.
34 lines
661 B
Bash
Executable File
34 lines
661 B
Bash
Executable File
#!/bin/bash
|
|
|
|
REQUIREMENTS_FILE=dev-requirements.txt
|
|
REQUIREMENTS_OUT=dev-requirements.txt.log
|
|
SETUP_OUT=*.egg-info
|
|
VENV=venv
|
|
DEACTIVE=false
|
|
|
|
export LC_ALL=en_US.UTF-8
|
|
export LANG=en_US.UTF-8
|
|
PYTHONPATH="$(which python)"
|
|
|
|
### set virtualenv
|
|
if [ -z "$VIRTUAL_ENV" ]; then
|
|
virtualenv $VENV --python=$PYTHONPATH --no-site-packages --always-copy
|
|
source $VENV/bin/activate
|
|
DEACTIVE=true
|
|
fi
|
|
|
|
### install dependencies
|
|
pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
|
|
|
|
### run tests
|
|
tox -e py27 || exit 1
|
|
|
|
### static analysis of code
|
|
flake8 --show-source petstore_api/
|
|
|
|
### deactivate virtualenv
|
|
#if [ $DEACTIVE == true ]; then
|
|
# deactivate
|
|
#fi
|
|
|