diff --git a/.gitignore b/.gitignore index 68bbb03..88217a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,14 @@ -*.swp +.DS_Store .env -*~ *.pyc -*.sqlite3 -uwsgi.ini -uwsgi.log -members/logs/* -.idea/ -logs/ +/collected_static/ /media/ +logs/ +members/logs/* node_modules/ .coverage -db.sqlite3 -requirements_henu.txt -/collected_static/ -mydatabase -settings.json .vscode/ -.DS_Store +.idea/ *.code-workspace -sik_test -venv/ \ No newline at end of file +venv/ +.venv/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a58095..ed3469e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ install: expire_in: 1 week test: - image: python:3.7 + image: python:3.9 stage: test needs: [] services: @@ -28,14 +28,15 @@ test: DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" DB_HOST: postgres script: - - python -V - - pip install -r requirements.txt + - pip install poetry==1.1.4 + - poetry config virtualenvs.create false + - poetry install --no-dev --no-interaction --no-ansi - python manage.py migrate --noinput - python manage.py createdefaultadmin - python manage.py test lint:py: - image: python:3.7 + image: python:3.9 stage: lint needs: [] script: diff --git a/.python-version b/.python-version index 0833a98..bd28b9c 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.7.4 +3.9 diff --git a/pyright.json b/pyright.json index 4262159..7ced116 100644 --- a/pyright.json +++ b/pyright.json @@ -12,5 +12,5 @@ "reportMissingImports": true, "reportMissingTypeStubs": false, - "pythonVersion": "3.7.4" + "pythonVersion": "3.9" } \ No newline at end of file diff --git a/setup.sh b/setup.sh deleted file mode 100755 index ec3fc01..0000000 --- a/setup.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -echo "SIK WEB 2.0" -echo "This script will set up the environment for this project." -echo "=========================================================" -echo "Dependencies: python3.7" - -INTERACTIVE="true" -USE_NPM="true" -if [[ $* == *--no-input* ]] -then - INTERACTIVE="false" -fi -if [[ $* == *--no-npm* ]] -then - USE_NPM="false" -fi - -$INTERACTIVE || (echo "Running in non-interactive mode." && env) - -$INTERACTIVE && read -p "Are these programs installed? [y/n]" -n 1 -r || REPLY="y" -echo "" - -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Please install the dependencies. Exiting." - exit 0 -fi - -$INTERACTIVE && read -p "Is virtualenv activated? [y/n]" -n 1 -r || REPLY="y" -echo "" - -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Please activate virtualenv first. Exiting." - exit 0 -fi - -$INTERACTIVE && read -p "Copy pre-push hook to .git/hooks? (recommended) [y/n]" -n 1 -r || REPLY="y" -echo "" - -if [[ $REPLY =~ ^[Yy]$ ]] -then - cp "$PWD/scripts/git/pre-push" "$PWD/.git/hooks/pre-push" -fi - - -$INTERACTIVE && read -p "Start setup? [y/n]" -n 1 -r || REPLY="y" -echo "" - -if [[ ! $REPLY =~ ^[Yy]$ ]] -then - echo "Exiting." - exit 0 -fi - -set -e -set -x -pip install -r requirements.txt -pip install -r requirements.production.txt -$USE_NPM && npm install -python manage.py migrate -python manage.py createdefaultadmin -set +e -set +x - -echo "Done." -echo "Run 'python manage.py runserver 0.0.0.0:8000' to start the development server!"