diff --git a/.coveragerc b/.coveragerc index a77f5711..756baddc 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,4 @@ [run] omit = - mpwo_api/venv/* - mpwo_api/mpwo_api/tests/* + fittrackee_api/venv/* + fittrackee_api/fittrackee_api/tests/* diff --git a/.gitignore b/.gitignore index 84244cc3..29d2a813 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ Makefile.custom.config # MPWO_API ############### __pycache__ -/mpwo_api/venv/ +/fittrackee_api/venv/ uploads .cache .coverage diff --git a/.travis.yml b/.travis.yml index 11546661..c764ca78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ before_install: before_script: - export DATABASE_TEST_URL=postgres://postgres:@localhost:5432/mpwo_test - - export APP_SETTINGS=mpwo_api.config.TestingConfig + - export APP_SETTINGS=fittrackee_api.config.TestingConfig - export REACT_APP_API_URL=http://127.0.0.1 - export NODE_ENV=development - export TEST_URL=http://127.0.0.1 diff --git a/Makefile b/Makefile index f756314f..d0a1b383 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ install-python: lint-all: lint-python lint-react lint-python: - $(PYTEST) --flake8 --isort -m "flake8 or isort" mpwo_api --ignore=mpwo_api/migrations + $(PYTEST) --flake8 --isort -m "flake8 or isort" fittrackee_api --ignore=fittrackee_api/migrations lint-react: $(NPM) lint @@ -48,10 +48,10 @@ test-e2e: init-db $(NPM) test test-python: - $(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api --cov-report term-missing + $(PYTEST) fittrackee_api --cov-config .coveragerc --cov=fittrackee_api --cov-report term-missing test-python-xml: - $(PYTEST) mpwo_api --cov-config .coveragerc --cov=mpwo_api --cov-report xml + $(PYTEST) fittrackee_api --cov-config .coveragerc --cov=fittrackee_api --cov-report xml update-cov: test-python-xml $(COV) -r coverage.xml diff --git a/Makefile.config b/Makefile.config index 63a3aa16..02999ac0 100644 --- a/Makefile.config +++ b/Makefile.config @@ -3,18 +3,18 @@ API_PORT = 5000 CLIENT_PORT = 3000 export REACT_APP_API_URL = http://$(HOST):$(API_PORT) -export FLASK_APP = $(PWD)/mpwo_api/server.py -export APP_SETTINGS=mpwo_api.config.DevelopmentConfig +export FLASK_APP = $(PWD)/fittrackee_api/server.py +export APP_SETTINGS=fittrackee_api.config.DevelopmentConfig export FLASK_ENV=development export TEST_URL = http://$(HOST):$(CLIENT_PORT) -export REQUIREMENTS = $(PWD)/mpwo_api/requirements.txt -export DATABASE_URL = postgres://mpwo:mpwo@$(HOST):5432/mpwo -export DATABASE_TEST_URL = postgres://mpwo:mpwo@$(HOST):5432/mpwo_test -export MIGRATIONS = $(PWD)/mpwo_api/migrations +export REQUIREMENTS = $(PWD)/fittrackee_api/requirements.txt +export DATABASE_URL = postgres://fittrackee:fittrackee@$(HOST):5432/fittrackee +export DATABASE_TEST_URL = postgres://fittrackee:fittrackee@$(HOST):5432/fittrackee_test +export MIGRATIONS = $(PWD)/fittrackee_api/migrations # Python env PYTHON_VERSION ?= python -VENV = $(PWD)/mpwo_api/venv +VENV = $(PWD)/fittrackee_api/venv PYTHON = $(VENV)/bin/python PIP = $(VENV)/bin/pip FLASK = $(VENV)/bin/flask diff --git a/README.md b/README.md index 913a1df0..e4eb7fb0 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Maps are displayed using [Open Street Map](https://www.openstreetmap.org). **Still under development (not ready for production).** (see [issues](https://github.com/SamR1/mpwo/issues) and [wiki](https://github.com/SamR1/mpwo/wiki) for more informations) -![mpwo screenshot](docs/images/mpwo_screenshot-01.png) +![FitTrackee screenshot](docs/images/fittrackee_screenshot-01.png) -![mpwo screenshot](docs/images/mpwo_screenshot-02.png) +![FitTrackee screenshot](docs/images/fittrackee_screenshot-02.png) --- Notes: diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index e270c19e..cdaf46e3 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -4,7 +4,7 @@ services: mpwo-db: container_name: mpwo-db - build: https://github.com/SamR1/mpwo.git#master:mpwo_api/db + build: https://github.com/SamR1/mpwo.git#master:fittrackee_api/db ports: - 5435:5432 environment: @@ -13,7 +13,7 @@ services: mpwo-api: container_name: mpwo-api - build: https://github.com/SamR1/mpwo.git#master:mpwo_api + build: https://github.com/SamR1/mpwo.git#master:fittrackee_api ports: - 5001:5000 environment: @@ -21,7 +21,7 @@ services: - DATABASE_TEST_URL=postgres://postgres:postgres@mpwo-db:5432/mpwo_test - FLASK_APP=server.py - FLASK_DEBUG=1 - - APP_SETTINGS=mpwo_api.config.TestingConfig + - APP_SETTINGS=fittrackee_api.config.TestingConfig depends_on: - mpwo-db links: diff --git a/docker-compose.yml b/docker-compose.yml index badb6b37..560b07bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ services: mpwo-db: container_name: mpwo-db - build: ./mpwo_api/db + build: ./fittrackee_api/db ports: - 5435:5432 environment: @@ -13,7 +13,7 @@ services: mpwo-api: container_name: mpwo-api - build: ./mpwo_api + build: ./fittrackee_api ports: - 5001:5000 environment: @@ -21,7 +21,7 @@ services: - DATABASE_TEST_URL=postgres://postgres:postgres@mpwo-db:5432/mpwo_test - FLASK_APP=server.py - FLASK_DEBUG=1 - - APP_SETTINGS=mpwo_api.config.DevelopmentConfig + - APP_SETTINGS=fittrackee_api.config.DevelopmentConfig depends_on: - mpwo-db links: diff --git a/docs/db/mpwo.graphml b/docs/db/fittrackee.graphml similarity index 100% rename from docs/db/mpwo.graphml rename to docs/db/fittrackee.graphml diff --git a/docs/images/mpwo_screenshot-01.png b/docs/images/fittrackee_screenshot-01.png similarity index 100% rename from docs/images/mpwo_screenshot-01.png rename to docs/images/fittrackee_screenshot-01.png diff --git a/docs/images/mpwo_screenshot-02.png b/docs/images/fittrackee_screenshot-02.png similarity index 100% rename from docs/images/mpwo_screenshot-02.png rename to docs/images/fittrackee_screenshot-02.png diff --git a/mpwo_api/Dockerfile b/fittrackee_api/Dockerfile similarity index 68% rename from mpwo_api/Dockerfile rename to fittrackee_api/Dockerfile index b35f11f2..ff48dc85 100644 --- a/mpwo_api/Dockerfile +++ b/fittrackee_api/Dockerfile @@ -7,10 +7,10 @@ RUN mkdir -p /usr/src/app WORKDIR /usr/src/app # add requirements -COPY ./requirements.txt /usr/src/app/mpwo_api/requirements.txt +COPY ./requirements.txt /usr/src/app/fittrackee_api/requirements.txt # install requirements -RUN pip install -r mpwo_api/requirements.txt +RUN pip install -r fittrackee_api/requirements.txt # add app COPY . /usr/src/app diff --git a/mpwo_api/db/Dockerfile b/fittrackee_api/db/Dockerfile similarity index 100% rename from mpwo_api/db/Dockerfile rename to fittrackee_api/db/Dockerfile diff --git a/fittrackee_api/db/create.sql b/fittrackee_api/db/create.sql new file mode 100644 index 00000000..79ef9e50 --- /dev/null +++ b/fittrackee_api/db/create.sql @@ -0,0 +1,7 @@ +DROP DATABASE IF EXISTS fittrackee; +DROP DATABASE IF EXISTS fittrackee_test; +CREATE DATABASE fittrackee; +CREATE DATABASE fittrackee_test; +CREATE USER fittrackee WITH PASSWORD 'fittrackee'; +GRANT ALL PRIVILEGES ON DATABASE fittrackee TO fittrackee; +GRANT ALL PRIVILEGES ON DATABASE fittrackee_test TO fittrackee; diff --git a/mpwo_api/mpwo_api/__init__.py b/fittrackee_api/fittrackee_api/__init__.py similarity index 97% rename from mpwo_api/mpwo_api/__init__.py rename to fittrackee_api/fittrackee_api/__init__.py index e60d1086..54e24ee2 100644 --- a/mpwo_api/mpwo_api/__init__.py +++ b/fittrackee_api/fittrackee_api/__init__.py @@ -9,7 +9,7 @@ from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() bcrypt = Bcrypt() migrate = Migrate() -appLog = logging.getLogger('mpwo_api') +appLog = logging.getLogger('fittrackee_api') def create_app(): diff --git a/mpwo_api/mpwo_api/activities/__init__.py b/fittrackee_api/fittrackee_api/activities/__init__.py similarity index 100% rename from mpwo_api/mpwo_api/activities/__init__.py rename to fittrackee_api/fittrackee_api/activities/__init__.py diff --git a/mpwo_api/mpwo_api/activities/activities.py b/fittrackee_api/fittrackee_api/activities/activities.py similarity index 99% rename from mpwo_api/mpwo_api/activities/activities.py rename to fittrackee_api/fittrackee_api/activities/activities.py index 71b47c6b..a9789f8b 100644 --- a/mpwo_api/mpwo_api/activities/activities.py +++ b/fittrackee_api/fittrackee_api/activities/activities.py @@ -3,8 +3,8 @@ import os import shutil from datetime import datetime +from fittrackee_api import appLog, db from flask import Blueprint, current_app, jsonify, request, send_file -from mpwo_api import appLog, db from sqlalchemy import exc from ..users.utils import authenticate, verify_extension diff --git a/mpwo_api/mpwo_api/activities/models.py b/fittrackee_api/fittrackee_api/activities/models.py similarity index 99% rename from mpwo_api/mpwo_api/activities/models.py rename to fittrackee_api/fittrackee_api/activities/models.py index 10fe179d..5e591151 100644 --- a/mpwo_api/mpwo_api/activities/models.py +++ b/fittrackee_api/fittrackee_api/activities/models.py @@ -1,7 +1,7 @@ import datetime import os -from mpwo_api import db +from fittrackee_api import db from sqlalchemy.dialects import postgresql from sqlalchemy.event import listens_for from sqlalchemy.ext.hybrid import hybrid_property diff --git a/mpwo_api/mpwo_api/activities/records.py b/fittrackee_api/fittrackee_api/activities/records.py similarity index 100% rename from mpwo_api/mpwo_api/activities/records.py rename to fittrackee_api/fittrackee_api/activities/records.py diff --git a/mpwo_api/mpwo_api/activities/sports.py b/fittrackee_api/fittrackee_api/activities/sports.py similarity index 99% rename from mpwo_api/mpwo_api/activities/sports.py rename to fittrackee_api/fittrackee_api/activities/sports.py index a11aa2a0..fec39dd4 100644 --- a/mpwo_api/mpwo_api/activities/sports.py +++ b/fittrackee_api/fittrackee_api/activities/sports.py @@ -1,5 +1,5 @@ +from fittrackee_api import appLog, db from flask import Blueprint, jsonify, request -from mpwo_api import appLog, db from sqlalchemy import exc from ..users.utils import authenticate, authenticate_as_admin diff --git a/mpwo_api/mpwo_api/activities/stats.py b/fittrackee_api/fittrackee_api/activities/stats.py similarity index 99% rename from mpwo_api/mpwo_api/activities/stats.py rename to fittrackee_api/fittrackee_api/activities/stats.py index 484c3145..21756e24 100644 --- a/mpwo_api/mpwo_api/activities/stats.py +++ b/fittrackee_api/fittrackee_api/activities/stats.py @@ -1,7 +1,7 @@ from datetime import datetime, timedelta +from fittrackee_api import appLog from flask import Blueprint, jsonify, request -from mpwo_api import appLog from ..users.models import User from ..users.utils import authenticate diff --git a/mpwo_api/mpwo_api/activities/utils.py b/fittrackee_api/fittrackee_api/activities/utils.py similarity index 99% rename from mpwo_api/mpwo_api/activities/utils.py rename to fittrackee_api/fittrackee_api/activities/utils.py index 8db09781..d638125f 100644 --- a/mpwo_api/mpwo_api/activities/utils.py +++ b/fittrackee_api/fittrackee_api/activities/utils.py @@ -5,8 +5,8 @@ import zipfile from datetime import datetime, timedelta import gpxpy.gpx +from fittrackee_api import db from flask import current_app -from mpwo_api import db from sqlalchemy import exc from staticmap import Line, StaticMap from werkzeug.utils import secure_filename diff --git a/mpwo_api/mpwo_api/config.py b/fittrackee_api/fittrackee_api/config.py similarity index 100% rename from mpwo_api/mpwo_api/config.py rename to fittrackee_api/fittrackee_api/config.py diff --git a/mpwo_api/mpwo_api/tests/__init__.py b/fittrackee_api/fittrackee_api/tests/__init__.py similarity index 100% rename from mpwo_api/mpwo_api/tests/__init__.py rename to fittrackee_api/fittrackee_api/tests/__init__.py diff --git a/mpwo_api/mpwo_api/tests/conftest.py b/fittrackee_api/fittrackee_api/tests/conftest.py similarity index 98% rename from mpwo_api/mpwo_api/tests/conftest.py rename to fittrackee_api/fittrackee_api/tests/conftest.py index 44c50e67..241f1aa4 100644 --- a/mpwo_api/mpwo_api/tests/conftest.py +++ b/fittrackee_api/fittrackee_api/tests/conftest.py @@ -2,12 +2,12 @@ import datetime import os import pytest -from mpwo_api import create_app, db -from mpwo_api.activities.models import Activity, ActivitySegment, Sport -from mpwo_api.users.models import User +from fittrackee_api import create_app, db +from fittrackee_api.activities.models import Activity, ActivitySegment, Sport +from fittrackee_api.users.models import User os.environ["FLASK_ENV"] = 'testing' -os.environ["APP_SETTINGS"] = 'mpwo_api.config.TestingConfig' +os.environ["APP_SETTINGS"] = 'fittrackee_api.config.TestingConfig' @pytest.fixture diff --git a/mpwo_api/mpwo_api/tests/files/gpx_test.zip b/fittrackee_api/fittrackee_api/tests/files/gpx_test.zip similarity index 100% rename from mpwo_api/mpwo_api/tests/files/gpx_test.zip rename to fittrackee_api/fittrackee_api/tests/files/gpx_test.zip diff --git a/mpwo_api/mpwo_api/tests/files/gpx_test_folder.zip b/fittrackee_api/fittrackee_api/tests/files/gpx_test_folder.zip similarity index 100% rename from mpwo_api/mpwo_api/tests/files/gpx_test_folder.zip rename to fittrackee_api/fittrackee_api/tests/files/gpx_test_folder.zip diff --git a/mpwo_api/mpwo_api/tests/files/gpx_test_incorrect.zip b/fittrackee_api/fittrackee_api/tests/files/gpx_test_incorrect.zip similarity index 100% rename from mpwo_api/mpwo_api/tests/files/gpx_test_incorrect.zip rename to fittrackee_api/fittrackee_api/tests/files/gpx_test_incorrect.zip diff --git a/mpwo_api/mpwo_api/tests/test_activities_api_0_get.py b/fittrackee_api/fittrackee_api/tests/test_activities_api_0_get.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_activities_api_0_get.py rename to fittrackee_api/fittrackee_api/tests/test_activities_api_0_get.py diff --git a/mpwo_api/mpwo_api/tests/test_activities_api_1_post.py b/fittrackee_api/fittrackee_api/tests/test_activities_api_1_post.py similarity index 99% rename from mpwo_api/mpwo_api/tests/test_activities_api_1_post.py rename to fittrackee_api/fittrackee_api/tests/test_activities_api_1_post.py index d3f82a46..c6bcaa71 100644 --- a/mpwo_api/mpwo_api/tests/test_activities_api_1_post.py +++ b/fittrackee_api/fittrackee_api/tests/test_activities_api_1_post.py @@ -2,7 +2,7 @@ import json import os from io import BytesIO -from mpwo_api.activities.models import Activity +from fittrackee_api.activities.models import Activity def assert_activity_data_with_gpx(data): diff --git a/mpwo_api/mpwo_api/tests/test_activities_api_2_patch.py b/fittrackee_api/fittrackee_api/tests/test_activities_api_2_patch.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_activities_api_2_patch.py rename to fittrackee_api/fittrackee_api/tests/test_activities_api_2_patch.py diff --git a/mpwo_api/mpwo_api/tests/test_activities_api_3_delete.py b/fittrackee_api/fittrackee_api/tests/test_activities_api_3_delete.py similarity index 98% rename from mpwo_api/mpwo_api/tests/test_activities_api_3_delete.py rename to fittrackee_api/fittrackee_api/tests/test_activities_api_3_delete.py index 2c59f151..385d861f 100644 --- a/mpwo_api/mpwo_api/tests/test_activities_api_3_delete.py +++ b/fittrackee_api/fittrackee_api/tests/test_activities_api_3_delete.py @@ -2,7 +2,7 @@ import json import os from io import BytesIO -from mpwo_api.activities.models import Activity +from fittrackee_api.activities.models import Activity def get_gpx_filepath(activity_id): diff --git a/mpwo_api/mpwo_api/tests/test_activities_model.py b/fittrackee_api/fittrackee_api/tests/test_activities_model.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_activities_model.py rename to fittrackee_api/fittrackee_api/tests/test_activities_model.py diff --git a/mpwo_api/mpwo_api/tests/test_auth_api.py b/fittrackee_api/fittrackee_api/tests/test_auth_api.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_auth_api.py rename to fittrackee_api/fittrackee_api/tests/test_auth_api.py diff --git a/mpwo_api/mpwo_api/tests/test_config.py b/fittrackee_api/fittrackee_api/tests/test_config.py similarity index 77% rename from mpwo_api/mpwo_api/tests/test_config.py rename to fittrackee_api/fittrackee_api/tests/test_config.py index b747a84b..9efef2fa 100644 --- a/mpwo_api/mpwo_api/tests/test_config.py +++ b/fittrackee_api/fittrackee_api/tests/test_config.py @@ -2,7 +2,7 @@ import os def test_development_config(app): - app.config.from_object('mpwo_api.config.DevelopmentConfig') + app.config.from_object('fittrackee_api.config.DevelopmentConfig') assert app.config['DEBUG'] assert not app.config['TESTING'] assert app.config['SQLALCHEMY_DATABASE_URI'] == os.environ.get( @@ -10,7 +10,7 @@ def test_development_config(app): def test_testing_config(app): - app.config.from_object('mpwo_api.config.TestingConfig') + app.config.from_object('fittrackee_api.config.TestingConfig') assert app.config['DEBUG'] assert app.config['TESTING'] assert not app.config['PRESERVE_CONTEXT_ON_EXCEPTION'] diff --git a/mpwo_api/mpwo_api/tests/test_records_api.py b/fittrackee_api/fittrackee_api/tests/test_records_api.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_records_api.py rename to fittrackee_api/fittrackee_api/tests/test_records_api.py diff --git a/mpwo_api/mpwo_api/tests/test_records_model.py b/fittrackee_api/fittrackee_api/tests/test_records_model.py similarity index 98% rename from mpwo_api/mpwo_api/tests/test_records_model.py rename to fittrackee_api/fittrackee_api/tests/test_records_model.py index 4b1fc7e7..ba433c8a 100644 --- a/mpwo_api/mpwo_api/tests/test_records_model.py +++ b/fittrackee_api/fittrackee_api/tests/test_records_model.py @@ -1,6 +1,6 @@ import datetime -from mpwo_api.activities.models import Record +from fittrackee_api.activities.models import Record def test_record_model( diff --git a/mpwo_api/mpwo_api/tests/test_sports_api.py b/fittrackee_api/fittrackee_api/tests/test_sports_api.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_sports_api.py rename to fittrackee_api/fittrackee_api/tests/test_sports_api.py diff --git a/mpwo_api/mpwo_api/tests/test_sports_model.py b/fittrackee_api/fittrackee_api/tests/test_sports_model.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_sports_model.py rename to fittrackee_api/fittrackee_api/tests/test_sports_model.py diff --git a/mpwo_api/mpwo_api/tests/test_stats_api.py b/fittrackee_api/fittrackee_api/tests/test_stats_api.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_stats_api.py rename to fittrackee_api/fittrackee_api/tests/test_stats_api.py diff --git a/mpwo_api/mpwo_api/tests/test_users_api.py b/fittrackee_api/fittrackee_api/tests/test_users_api.py similarity index 99% rename from mpwo_api/mpwo_api/tests/test_users_api.py rename to fittrackee_api/fittrackee_api/tests/test_users_api.py index 5897a712..69eb7e96 100644 --- a/mpwo_api/mpwo_api/tests/test_users_api.py +++ b/fittrackee_api/fittrackee_api/tests/test_users_api.py @@ -1,6 +1,6 @@ import json -from mpwo_api.users.models import User +from fittrackee_api.users.models import User def test_ping(app): diff --git a/mpwo_api/mpwo_api/tests/test_users_model.py b/fittrackee_api/fittrackee_api/tests/test_users_model.py similarity index 100% rename from mpwo_api/mpwo_api/tests/test_users_model.py rename to fittrackee_api/fittrackee_api/tests/test_users_model.py diff --git a/mpwo_api/mpwo_api/users/__init__.py b/fittrackee_api/fittrackee_api/users/__init__.py similarity index 100% rename from mpwo_api/mpwo_api/users/__init__.py rename to fittrackee_api/fittrackee_api/users/__init__.py diff --git a/mpwo_api/mpwo_api/users/auth.py b/fittrackee_api/fittrackee_api/users/auth.py similarity index 99% rename from mpwo_api/mpwo_api/users/auth.py rename to fittrackee_api/fittrackee_api/users/auth.py index 2cc112cf..79d2949d 100644 --- a/mpwo_api/mpwo_api/users/auth.py +++ b/fittrackee_api/fittrackee_api/users/auth.py @@ -1,8 +1,8 @@ import datetime import os +from fittrackee_api import appLog, bcrypt, db from flask import Blueprint, current_app, jsonify, request -from mpwo_api import appLog, bcrypt, db from sqlalchemy import exc, or_ from werkzeug.utils import secure_filename diff --git a/mpwo_api/mpwo_api/users/models.py b/fittrackee_api/fittrackee_api/users/models.py similarity index 99% rename from mpwo_api/mpwo_api/users/models.py rename to fittrackee_api/fittrackee_api/users/models.py index 9f8cc5ea..273671cc 100644 --- a/mpwo_api/mpwo_api/users/models.py +++ b/fittrackee_api/fittrackee_api/users/models.py @@ -1,8 +1,8 @@ import datetime import jwt +from fittrackee_api import bcrypt, db from flask import current_app -from mpwo_api import bcrypt, db from sqlalchemy import func from ..activities.models import Activity diff --git a/mpwo_api/mpwo_api/users/users.py b/fittrackee_api/fittrackee_api/users/users.py similarity index 100% rename from mpwo_api/mpwo_api/users/users.py rename to fittrackee_api/fittrackee_api/users/users.py diff --git a/mpwo_api/mpwo_api/users/utils.py b/fittrackee_api/fittrackee_api/users/utils.py similarity index 100% rename from mpwo_api/mpwo_api/users/utils.py rename to fittrackee_api/fittrackee_api/users/utils.py diff --git a/mpwo_api/migrations/README b/fittrackee_api/migrations/README similarity index 100% rename from mpwo_api/migrations/README rename to fittrackee_api/migrations/README diff --git a/mpwo_api/migrations/alembic.ini b/fittrackee_api/migrations/alembic.ini similarity index 100% rename from mpwo_api/migrations/alembic.ini rename to fittrackee_api/migrations/alembic.ini diff --git a/mpwo_api/migrations/env.py b/fittrackee_api/migrations/env.py similarity index 100% rename from mpwo_api/migrations/env.py rename to fittrackee_api/migrations/env.py diff --git a/mpwo_api/migrations/script.py.mako b/fittrackee_api/migrations/script.py.mako similarity index 100% rename from mpwo_api/migrations/script.py.mako rename to fittrackee_api/migrations/script.py.mako diff --git a/mpwo_api/migrations/versions/5a42db64e872_.py b/fittrackee_api/migrations/versions/5a42db64e872_.py similarity index 100% rename from mpwo_api/migrations/versions/5a42db64e872_.py rename to fittrackee_api/migrations/versions/5a42db64e872_.py diff --git a/mpwo_api/migrations/versions/92adde6ac0d0_.py b/fittrackee_api/migrations/versions/92adde6ac0d0_.py similarity index 100% rename from mpwo_api/migrations/versions/92adde6ac0d0_.py rename to fittrackee_api/migrations/versions/92adde6ac0d0_.py diff --git a/mpwo_api/migrations/versions/9741fc7834da_.py b/fittrackee_api/migrations/versions/9741fc7834da_.py similarity index 100% rename from mpwo_api/migrations/versions/9741fc7834da_.py rename to fittrackee_api/migrations/versions/9741fc7834da_.py diff --git a/mpwo_api/migrations/versions/9f8c9c37da44_.py b/fittrackee_api/migrations/versions/9f8c9c37da44_.py similarity index 100% rename from mpwo_api/migrations/versions/9f8c9c37da44_.py rename to fittrackee_api/migrations/versions/9f8c9c37da44_.py diff --git a/mpwo_api/migrations/versions/b7cfe0c17708_.py b/fittrackee_api/migrations/versions/b7cfe0c17708_.py similarity index 100% rename from mpwo_api/migrations/versions/b7cfe0c17708_.py rename to fittrackee_api/migrations/versions/b7cfe0c17708_.py diff --git a/mpwo_api/migrations/versions/caf0e0dc621a_.py b/fittrackee_api/migrations/versions/caf0e0dc621a_.py similarity index 100% rename from mpwo_api/migrations/versions/caf0e0dc621a_.py rename to fittrackee_api/migrations/versions/caf0e0dc621a_.py diff --git a/mpwo_api/migrations/versions/dd73d23a7a3d_.py b/fittrackee_api/migrations/versions/dd73d23a7a3d_.py similarity index 100% rename from mpwo_api/migrations/versions/dd73d23a7a3d_.py rename to fittrackee_api/migrations/versions/dd73d23a7a3d_.py diff --git a/mpwo_api/requirements.txt b/fittrackee_api/requirements.txt similarity index 100% rename from mpwo_api/requirements.txt rename to fittrackee_api/requirements.txt diff --git a/mpwo_api/server.py b/fittrackee_api/server.py similarity index 91% rename from mpwo_api/server.py rename to fittrackee_api/server.py index fd0925f1..d74e7fe2 100644 --- a/mpwo_api/server.py +++ b/fittrackee_api/server.py @@ -1,8 +1,8 @@ import shutil -from mpwo_api import create_app, db -from mpwo_api.activities.models import Sport -from mpwo_api.users.models import User +from fittrackee_api import create_app, db +from fittrackee_api.activities.models import Sport +from fittrackee_api.users.models import User app = create_app() diff --git a/mpwo_api/db/create.sql b/mpwo_api/db/create.sql deleted file mode 100644 index f18b7f3d..00000000 --- a/mpwo_api/db/create.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP DATABASE IF EXISTS mpwo; -DROP DATABASE IF EXISTS mpwo_test; -CREATE DATABASE mpwo; -CREATE DATABASE mpwo_test; -CREATE USER mpwo WITH PASSWORD 'mpwo'; -GRANT ALL PRIVILEGES ON DATABASE mpwo TO mpwo; -GRANT ALL PRIVILEGES ON DATABASE mpwo_test TO mpwo;