From 9c3577737f64cc6f3a589f538e820eb8daa9b894 Mon Sep 17 00:00:00 2001 From: shobu Date: Thu, 5 Mar 2026 07:55:29 +0100 Subject: [PATCH] init --- flake.lock | 99 +++++ flake.nix | 98 +++++ pyproject.toml | 21 + src/healthai/__init__.py | 0 src/healthai/api/__init__.py | 0 src/healthai/api/admin.py | 3 + src/healthai/api/apps.py | 5 + src/healthai/api/migrations/__init__.py | 0 src/healthai/api/models.py | 3 + src/healthai/api/tests.py | 3 + src/healthai/api/views.py | 3 + src/healthai/etl/__init__.py | 0 src/healthai/etl/admin.py | 3 + src/healthai/etl/apps.py | 5 + src/healthai/etl/migrations/__init__.py | 0 src/healthai/etl/models.py | 3 + src/healthai/etl/tests.py | 3 + src/healthai/etl/views.py | 3 + src/healthai/healthai/__init__.py | 0 .../__pycache__/__init__.cpython-313.pyc | Bin 0 -> 166 bytes .../__pycache__/settings.cpython-313.pyc | Bin 0 -> 2441 bytes src/healthai/healthai/asgi.py | 16 + src/healthai/healthai/settings.py | 117 ++++++ src/healthai/healthai/urls.py | 22 ++ src/healthai/healthai/wsgi.py | 16 + src/healthai/manage.py | 22 ++ uv.lock | 363 ++++++++++++++++++ 27 files changed, 808 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 pyproject.toml create mode 100644 src/healthai/__init__.py create mode 100644 src/healthai/api/__init__.py create mode 100644 src/healthai/api/admin.py create mode 100644 src/healthai/api/apps.py create mode 100644 src/healthai/api/migrations/__init__.py create mode 100644 src/healthai/api/models.py create mode 100644 src/healthai/api/tests.py create mode 100644 src/healthai/api/views.py create mode 100644 src/healthai/etl/__init__.py create mode 100644 src/healthai/etl/admin.py create mode 100644 src/healthai/etl/apps.py create mode 100644 src/healthai/etl/migrations/__init__.py create mode 100644 src/healthai/etl/models.py create mode 100644 src/healthai/etl/tests.py create mode 100644 src/healthai/etl/views.py create mode 100644 src/healthai/healthai/__init__.py create mode 100644 src/healthai/healthai/__pycache__/__init__.cpython-313.pyc create mode 100644 src/healthai/healthai/__pycache__/settings.cpython-313.pyc create mode 100644 src/healthai/healthai/asgi.py create mode 100644 src/healthai/healthai/settings.py create mode 100644 src/healthai/healthai/urls.py create mode 100644 src/healthai/healthai/wsgi.py create mode 100644 src/healthai/manage.py create mode 100644 uv.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f364215 --- /dev/null +++ b/flake.lock @@ -0,0 +1,99 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1771848320, + "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pyproject-build-systems": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "pyproject-nix": [ + "pyproject-nix" + ], + "uv2nix": [ + "uv2nix" + ] + }, + "locked": { + "lastModified": 1771423342, + "narHash": "sha256-7uXPiWB0YQ4HNaAqRvVndYL34FEp1ZTwVQHgZmyMtC8=", + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "rev": "04e9c186e01f0830dad3739088070e4c551191a4", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "type": "github" + } + }, + "pyproject-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1771518446, + "narHash": "sha256-nFJSfD89vWTu92KyuJWDoTQJuoDuddkJV3TlOl1cOic=", + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "rev": "eb204c6b3335698dec6c7fc1da0ebc3c6df05937", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "pyproject.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "pyproject-build-systems": "pyproject-build-systems", + "pyproject-nix": "pyproject-nix", + "uv2nix": "uv2nix" + } + }, + "uv2nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "pyproject-nix": [ + "pyproject-nix" + ] + }, + "locked": { + "lastModified": 1772187362, + "narHash": "sha256-gCojeIlQ/rfWMe3adif3akyHsT95wiMkLURpxTeqmPc=", + "owner": "pyproject-nix", + "repo": "uv2nix", + "rev": "abe65de114300de41614002fe9dce2152ac2ac23", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "uv2nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..317e90f --- /dev/null +++ b/flake.nix @@ -0,0 +1,98 @@ +{ + description = "hello world application using uv2nix"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + pyproject-nix = { + url = "github:pyproject-nix/pyproject.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + uv2nix = { + url = "github:pyproject-nix/uv2nix"; + inputs.pyproject-nix.follows = "pyproject-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + pyproject-build-systems = { + url = "github:pyproject-nix/build-system-pkgs"; + inputs.pyproject-nix.follows = "pyproject-nix"; + inputs.uv2nix.follows = "uv2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + nixpkgs, + pyproject-nix, + uv2nix, + pyproject-build-systems, + ... + }: + let + inherit (nixpkgs) lib; + forAllSystems = lib.genAttrs lib.systems.flakeExposed; + + workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; }; + + overlay = workspace.mkPyprojectOverlay { + sourcePreference = "wheel"; + }; + + editableOverlay = workspace.mkEditablePyprojectOverlay { + root = "$REPO_ROOT"; + }; + + pythonSets = forAllSystems ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + python = pkgs.python3; + in + (pkgs.callPackage pyproject-nix.build.packages { + inherit python; + }).overrideScope + ( + lib.composeManyExtensions [ + pyproject-build-systems.overlays.wheel + overlay + ] + ) + ); + + in + { + devShells = forAllSystems ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + pythonSet = pythonSets.${system}.overrideScope editableOverlay; + virtualenv = pythonSet.mkVirtualEnv "healthai-dev-env" workspace.deps.all; + in + { + default = pkgs.mkShell { + packages = [ + virtualenv + pkgs.uv + pythonSet.python.pkgs.setuptools + ]; + env = { + UV_NO_SYNC = "1"; + UV_PYTHON = pythonSet.python.interpreter; + UV_PYTHON_DOWNLOADS = "never"; + }; + shellHook = '' + unset PYTHONPATH + export REPO_ROOT=$(git rev-parse --show-toplevel) + ''; + }; + } + ); + + packages = forAllSystems (system: { + default = pythonSets.${system}.mkVirtualEnv "healthai-env" workspace.deps.default; + }); + }; +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..efd3b9a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "healthai" +version = "0.1.0" +description = "Add your description here" +requires-python = ">=3.12" +dependencies = [ + "django>=6.0.2", + "django-cors-headers>=4.9.0", + "djangorestframework>=3.16.1", + "drf-spectacular>=0.29.0", + "psycopg2-binary>=2.9.11", + "redis>=7.2.1", +] + +# [project.scripts] +# hello = "hello_world:hello" + +[build-system] +requires = ["uv_build>=0.10.0,<0.11.0"] +build-backend = "uv_build" + diff --git a/src/healthai/__init__.py b/src/healthai/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/healthai/api/__init__.py b/src/healthai/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/healthai/api/admin.py b/src/healthai/api/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/src/healthai/api/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/src/healthai/api/apps.py b/src/healthai/api/apps.py new file mode 100644 index 0000000..d87006d --- /dev/null +++ b/src/healthai/api/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class ApiConfig(AppConfig): + name = 'api' diff --git a/src/healthai/api/migrations/__init__.py b/src/healthai/api/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/healthai/api/models.py b/src/healthai/api/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/src/healthai/api/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/src/healthai/api/tests.py b/src/healthai/api/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/src/healthai/api/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/src/healthai/api/views.py b/src/healthai/api/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/src/healthai/api/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/src/healthai/etl/__init__.py b/src/healthai/etl/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/healthai/etl/admin.py b/src/healthai/etl/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/src/healthai/etl/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/src/healthai/etl/apps.py b/src/healthai/etl/apps.py new file mode 100644 index 0000000..d873afb --- /dev/null +++ b/src/healthai/etl/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class EtlConfig(AppConfig): + name = 'etl' diff --git a/src/healthai/etl/migrations/__init__.py b/src/healthai/etl/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/healthai/etl/models.py b/src/healthai/etl/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/src/healthai/etl/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/src/healthai/etl/tests.py b/src/healthai/etl/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/src/healthai/etl/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/src/healthai/etl/views.py b/src/healthai/etl/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/src/healthai/etl/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/src/healthai/healthai/__init__.py b/src/healthai/healthai/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/healthai/healthai/__pycache__/__init__.cpython-313.pyc b/src/healthai/healthai/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6dc70dd4881cffd8bcf05e33de7adb4936380556 GIT binary patch literal 166 zcmey&%ge>Uz`#%KL!yn%m`(CW?^7pn97jOpvmaBlA(x+fq~&ONa~iWenx(7 zs(x`sep0D^cz#iKaY15os(xxgai)GoYGO`FMq;LZaZxgY0~d{t&&LekpKVy literal 0 HcmV?d00001 diff --git a/src/healthai/healthai/__pycache__/settings.cpython-313.pyc b/src/healthai/healthai/__pycache__/settings.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eb25112228e090e781a44d1170565df4506a1085 GIT binary patch literal 2441 zcmey&%ge>Uz`#%Z>FvKt^ zF~l&NGD1`ZaYATh(iF-G0^0%QKq+iuMQp*$MeM;WMI8DJMV$H!!K{IdMO^v}!EAwy zMcl#cMLfYA`V7G=!5}%VKt=<`U~WAYea0f*V4fnrVBTQ97`9-3U2X=3U;#ZQ1I8l$ zV8LJ^1IA#%U|}#R0wzTb81-3-1cJqi1cSwkgo0U$go9a%M1m!XMAIcTr4n@+85p=+ zvJ&&s^A(CyOG+~H(u)<+@{1HQQWJAZG7>Wt3X1ZxQj<&cxVYR?^HPfvOHxx5k}4I{ zQ^1;Z6H{_C^Aw6p5{pWpD%BNAi!<}m6`-b?=^5x5>2YznL?VargCMJloS+O>FcNDCl~8M?0}l9mz5x zNuvpZw4~;hlvEa^7FUU*NfxIT7iZ?@VM^qt78fU`rxsU9q3b9~EXhm;MMtqFdzCI! zHa9aRB`38!u_#p!?9a@SO1)r^hcinmec^IdCQ#)dH-WqXvtAELe=x*JNV+tkx{wql z=jZ0;=jl0vDFRB1i_-L*i;L32GE>Wul$t|Lg}EiMv?K%B9gd|X8L4?CnaSXUh@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