diff --git a/Makefile b/Makefile index a769e13..a73697c 100644 --- a/Makefile +++ b/Makefile @@ -2,49 +2,49 @@ all: css migrate initialize: npm css migrate sethookdir loadplatforms -HTMLFILES := $(shell find src/timetracker/games/templates -type f) +HTMLFILES := $(shell find timetracker/games/templates -type f) npm: npm install -css: src/input.css - npx tailwindcss -i ./src/input.css -o ./src/timetracker/games/static/base.css +css: input.css + npx tailwindcss -i ./input.css -o ./timetracker/games/static/base.css css-dev: css - npx tailwindcss -i ./src/input.css -o ./src/timetracker/games/static/base.css --watch + npx tailwindcss -i ./input.css -o ./timetracker/games/static/base.css --watch makemigrations: - poetry run python src/timetracker/manage.py makemigrations + poetry run python timetracker/manage.py makemigrations migrate: makemigrations - poetry run python src/timetracker/manage.py migrate + poetry run python timetracker/manage.py migrate dev: migrate - poetry run python src/timetracker/manage.py runserver + poetry run python timetracker/manage.py runserver caddy: caddy run --watch dev-prod: migrate collectstatic - cd src/timetracker/; PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 root.asgi:application -k uvicorn.workers.UvicornWorker + cd timetracker/; PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 root.asgi:application -k uvicorn.workers.UvicornWorker dumpgames: - poetry run python src/timetracker/manage.py dumpdata --format yaml games --output tracker_fixture.yaml + poetry run python timetracker/manage.py dumpdata --format yaml games --output tracker_fixture.yaml loadplatforms: - poetry run python src/timetracker/manage.py loaddata platforms.yaml + poetry run python timetracker/manage.py loaddata platforms.yaml loadsample: - poetry run python src/timetracker/manage.py loaddata sample.yaml + poetry run python timetracker/manage.py loaddata sample.yaml createsuperuser: - poetry run python src/timetracker/manage.py createsuperuser + poetry run python timetracker/manage.py createsuperuser shell: - poetry run python src/timetracker/manage.py shell + poetry run python timetracker/manage.py shell collectstatic: - poetry run python src/timetracker/manage.py collectstatic --clear --no-input + poetry run python timetracker/manage.py collectstatic --clear --no-input poetry.lock: pyproject.toml poetry install @@ -56,6 +56,6 @@ date: poetry run python -c 'import datetime; from zoneinfo import ZoneInfo; print(datetime.datetime.isoformat(datetime.datetime.now(ZoneInfo("Europe/Prague")), timespec="minutes", sep=" "))' cleanstatic: - rm -r src/timetracker/static/* + rm -r timetracker/static/* clean: cleanstatic diff --git a/timetracker/common/__init__.py b/common/__init__.py similarity index 100% rename from timetracker/common/__init__.py rename to common/__init__.py diff --git a/timetracker/common/import_data.py b/common/import_data.py similarity index 100% rename from timetracker/common/import_data.py rename to common/import_data.py diff --git a/timetracker/common/plots.py b/common/plots.py similarity index 100% rename from timetracker/common/plots.py rename to common/plots.py diff --git a/timetracker/common/time.py b/common/time.py similarity index 100% rename from timetracker/common/time.py rename to common/time.py diff --git a/timetracker/games/__init__.py b/games/__init__.py similarity index 100% rename from timetracker/games/__init__.py rename to games/__init__.py diff --git a/timetracker/games/admin.py b/games/admin.py similarity index 100% rename from timetracker/games/admin.py rename to games/admin.py diff --git a/timetracker/games/apps.py b/games/apps.py similarity index 100% rename from timetracker/games/apps.py rename to games/apps.py diff --git a/timetracker/games/fixtures/data.yaml b/games/fixtures/data.yaml similarity index 100% rename from timetracker/games/fixtures/data.yaml rename to games/fixtures/data.yaml diff --git a/timetracker/games/fixtures/platforms.yaml b/games/fixtures/platforms.yaml similarity index 100% rename from timetracker/games/fixtures/platforms.yaml rename to games/fixtures/platforms.yaml diff --git a/timetracker/games/fixtures/ps-tracker.csv b/games/fixtures/ps-tracker.csv similarity index 100% rename from timetracker/games/fixtures/ps-tracker.csv rename to games/fixtures/ps-tracker.csv diff --git a/timetracker/games/fixtures/sample.yaml b/games/fixtures/sample.yaml similarity index 100% rename from timetracker/games/fixtures/sample.yaml rename to games/fixtures/sample.yaml diff --git a/timetracker/games/forms.py b/games/forms.py similarity index 100% rename from timetracker/games/forms.py rename to games/forms.py diff --git a/timetracker/games/migrations/0001_initial.py b/games/migrations/0001_initial.py similarity index 100% rename from timetracker/games/migrations/0001_initial.py rename to games/migrations/0001_initial.py diff --git a/timetracker/games/migrations/0002_alter_session_duration_manual.py b/games/migrations/0002_alter_session_duration_manual.py similarity index 100% rename from timetracker/games/migrations/0002_alter_session_duration_manual.py rename to games/migrations/0002_alter_session_duration_manual.py diff --git a/timetracker/games/migrations/0003_alter_session_duration_manual_and_more.py b/games/migrations/0003_alter_session_duration_manual_and_more.py similarity index 100% rename from timetracker/games/migrations/0003_alter_session_duration_manual_and_more.py rename to games/migrations/0003_alter_session_duration_manual_and_more.py diff --git a/timetracker/games/migrations/0004_alter_session_duration_manual.py b/games/migrations/0004_alter_session_duration_manual.py similarity index 100% rename from timetracker/games/migrations/0004_alter_session_duration_manual.py rename to games/migrations/0004_alter_session_duration_manual.py diff --git a/timetracker/games/migrations/0005_auto_20230109_1843.py b/games/migrations/0005_auto_20230109_1843.py similarity index 100% rename from timetracker/games/migrations/0005_auto_20230109_1843.py rename to games/migrations/0005_auto_20230109_1843.py diff --git a/timetracker/games/migrations/0006_auto_20230109_1904.py b/games/migrations/0006_auto_20230109_1904.py similarity index 100% rename from timetracker/games/migrations/0006_auto_20230109_1904.py rename to games/migrations/0006_auto_20230109_1904.py diff --git a/timetracker/games/migrations/0007_alter_purchase_game_alter_purchase_platform_and_more.py b/games/migrations/0007_alter_purchase_game_alter_purchase_platform_and_more.py similarity index 100% rename from timetracker/games/migrations/0007_alter_purchase_game_alter_purchase_platform_and_more.py rename to games/migrations/0007_alter_purchase_game_alter_purchase_platform_and_more.py diff --git a/timetracker/games/migrations/__init__.py b/games/migrations/__init__.py similarity index 100% rename from timetracker/games/migrations/__init__.py rename to games/migrations/__init__.py diff --git a/timetracker/games/models.py b/games/models.py similarity index 100% rename from timetracker/games/models.py rename to games/models.py diff --git a/timetracker/games/static/base.css b/games/static/base.css similarity index 100% rename from timetracker/games/static/base.css rename to games/static/base.css diff --git a/timetracker/games/templates/add.html b/games/templates/add.html similarity index 100% rename from timetracker/games/templates/add.html rename to games/templates/add.html diff --git a/timetracker/games/templates/base.html b/games/templates/base.html similarity index 100% rename from timetracker/games/templates/base.html rename to games/templates/base.html diff --git a/timetracker/games/templates/index.html b/games/templates/index.html similarity index 100% rename from timetracker/games/templates/index.html rename to games/templates/index.html diff --git a/timetracker/games/templates/list_sessions.html b/games/templates/list_sessions.html similarity index 100% rename from timetracker/games/templates/list_sessions.html rename to games/templates/list_sessions.html diff --git a/timetracker/games/templatetags/version.py b/games/templatetags/version.py similarity index 100% rename from timetracker/games/templatetags/version.py rename to games/templatetags/version.py diff --git a/timetracker/games/tests.py b/games/tests.py similarity index 100% rename from timetracker/games/tests.py rename to games/tests.py diff --git a/timetracker/games/urls.py b/games/urls.py similarity index 100% rename from timetracker/games/urls.py rename to games/urls.py diff --git a/timetracker/games/views.py b/games/views.py similarity index 100% rename from timetracker/games/views.py rename to games/views.py diff --git a/timetracker/manage.py b/manage.py similarity index 100% rename from timetracker/manage.py rename to manage.py diff --git a/pyproject.toml b/pyproject.toml index ea9fc0f..4a42d06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "A simple time tracker." authors = ["Lukáš Kucharczyk "] license = "GPL" readme = "README.md" -packages = [{include = "timetracker", from = "src"}] +packages = [{include = "timetracker"}] [tool.poetry.dependencies] python = "^3.10" @@ -30,10 +30,5 @@ isort = "^5.11.4" requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" -[tool.pytest.ini_options] -pythonpath = [ - "src" -] - [tool.poetry.scripts] -timetracker-import = "timetracker.common.util.import_data:import_from_file" +timetracker-import = "timetracker.common.import_data:import_from_file" diff --git a/timetracker/root/__init__.py b/timetracker/__init__.py similarity index 100% rename from timetracker/root/__init__.py rename to timetracker/__init__.py diff --git a/timetracker/root/asgi.py b/timetracker/asgi.py similarity index 100% rename from timetracker/root/asgi.py rename to timetracker/asgi.py diff --git a/timetracker/root/settings.py b/timetracker/settings.py similarity index 98% rename from timetracker/root/settings.py rename to timetracker/settings.py index 7c60ca3..178e04d 100644 --- a/timetracker/root/settings.py +++ b/timetracker/settings.py @@ -14,7 +14,7 @@ import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. -BASE_DIR = Path(__file__).resolve().parent.parent +BASE_DIR = Path(__file__).resolve() # Quick-start development settings - unsuitable for production diff --git a/timetracker/root/urls.py b/timetracker/urls.py similarity index 100% rename from timetracker/root/urls.py rename to timetracker/urls.py diff --git a/timetracker/root/wsgi.py b/timetracker/wsgi.py similarity index 100% rename from timetracker/root/wsgi.py rename to timetracker/wsgi.py