dmart 1.4.10__py3-none-any.whl → 1.4.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
alembic.ini CHANGED
@@ -3,7 +3,7 @@
3
3
  [alembic]
4
4
  # path to migration scripts
5
5
  # Use forward slashes (/) also on windows to provide an os agnostic path
6
- script_location = dmart_migrations
6
+ script_location = alembic
7
7
 
8
8
  # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
9
9
  # Uncomment the line below if you want the files to be prepended with date and time
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dmart
3
- Version: 1.4.10
3
+ Version: 1.4.12
4
4
  Requires-Python: >=3.11
5
5
  Requires-Dist: fastapi
6
6
  Requires-Dist: pydantic
@@ -1,7 +1,7 @@
1
- alembic.ini,sha256=zs8d8VhH9TRwZrPK697EZPBCfaKvI4SqTuGuG0FAm2Y,3747
1
+ alembic.ini,sha256=wQweByyHQm-EI8BQkE0SHNRjULJ6Xn5jqgvv88IT5Sg,3738
2
2
  bundler.py,sha256=so8ZJResb1PcOH5vboa_mpFAdYr_T8u8DbbFXd570Lg,1704
3
3
  data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
4
- dmart.py,sha256=_eXSPzHwdjlPG_v5rvVQslj7ny68-ll6HZ1jCvCKswI,25808
4
+ dmart.py,sha256=5ukER8Qs2kL8E-XFc1jzvJU-nDiG69Akh_lZeVwWzwI,24451
5
5
  get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
6
6
  info.json,sha256=hXQWl19lfMkEj_zXdehGeKjiKGNJ7emY4S7d4pIqJ1E,123
7
7
  main.py,sha256=KZGhIL6AnEm5ZAPy4IvhBDpzSTjuodilV7NafNOyhzM,19676
@@ -175,7 +175,7 @@ data_adapters/sql/json_to_db_migration.py,sha256=KaubDrRZ3MfPLc-CNGPpsEccPELKr1V
175
175
  data_adapters/sql/update_query_policies.py,sha256=LUpkyzDAkiwwVWnXxPdVAU6atehW72ECAazj3mEYHK0,3857
176
176
  dmart_migrations/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
177
177
  dmart_migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
178
- dmart_migrations/env.py,sha256=ahYndeefOvhqeZ7EQMkI1NdqJVQCUqLxYNP_MtJeDfY,2821
178
+ dmart_migrations/env.py,sha256=P1gnJRIUrP2jLHZ7HDbfkzkpuZJ_LMWqw05HIqOUJHo,3110
179
179
  dmart_migrations/notes.txt,sha256=X7LYSNmulLRiAUXvw07Z85bSGRTnx4NUpoNC9D2DfO8,395
180
180
  dmart_migrations/script.py.mako,sha256=u-ABdYW1tcIILgJFJdQZYLxoAI8Awd6wZbx30rY6fxU,680
181
181
  dmart_migrations/__pycache__/__init__.cpython-314.pyc,sha256=CcFVDJxqk1nR7sZH9dbbffqoMo0jRHW-MiSSGFX--qA,174
@@ -282,8 +282,8 @@ utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGVqo,700
282
282
  utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
283
283
  utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
284
284
  utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
285
- dmart-1.4.10.dist-info/METADATA,sha256=1JEg-JLqBDSHLzH8bkIzY4p1gDKbX9bWYcsKc3cIfHQ,2069
286
- dmart-1.4.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
287
- dmart-1.4.10.dist-info/entry_points.txt,sha256=GjfoGh1bpxuU9HHGJzbtCFPNptHv9TryxHMN3uBSKpg,37
288
- dmart-1.4.10.dist-info/top_level.txt,sha256=XELQhaIfj-qupnyBrir39qFRh8ncu1RXkCHeitzqLLg,275
289
- dmart-1.4.10.dist-info/RECORD,,
285
+ dmart-1.4.12.dist-info/METADATA,sha256=rrCC2m1y-WMaLajuBNZIRSpyAxJT7ZAjpIB574knJIM,2069
286
+ dmart-1.4.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
287
+ dmart-1.4.12.dist-info/entry_points.txt,sha256=GjfoGh1bpxuU9HHGJzbtCFPNptHv9TryxHMN3uBSKpg,37
288
+ dmart-1.4.12.dist-info/top_level.txt,sha256=XELQhaIfj-qupnyBrir39qFRh8ncu1RXkCHeitzqLLg,275
289
+ dmart-1.4.12.dist-info/RECORD,,
dmart.py CHANGED
@@ -536,29 +536,8 @@ def main():
536
536
  case "migrate":
537
537
  pkg_dir = Path(__file__).resolve().parent
538
538
 
539
- # Check for shadowing alembic directory and rename it if necessary
540
- shadowing_alembic = pkg_dir / "alembic"
541
- target_migrations = pkg_dir / "dmart_migrations"
542
-
543
- if shadowing_alembic.exists() and shadowing_alembic.is_dir():
544
- if target_migrations.exists():
545
- print(f"Warning: Both {shadowing_alembic} and {target_migrations} exist.")
546
- backup_path = pkg_dir / "alembic_backup"
547
- if not backup_path.exists():
548
- print(f"Renaming {shadowing_alembic} to {backup_path} to avoid shadowing 'alembic' library.")
549
- shutil.move(str(shadowing_alembic), str(backup_path))
550
- else:
551
- print(f"Error: {shadowing_alembic} exists and shadows 'alembic' library, but {target_migrations} and {backup_path} also exist.")
552
- print("Please manually remove or rename the 'alembic' directory.")
553
- sys.exit(1)
554
- else:
555
- print(f"Renaming {shadowing_alembic} to {target_migrations} to avoid shadowing 'alembic' library.")
556
- shutil.move(str(shadowing_alembic), str(target_migrations))
557
-
558
539
  # Try to find migrations directory
559
- alembic_dir = target_migrations
560
- if not alembic_dir.exists():
561
- alembic_dir = pkg_dir / "alembic"
540
+ alembic_dir = pkg_dir / "alembic"
562
541
 
563
542
  original_ini_path = pkg_dir / "alembic.ini"
564
543
  if not original_ini_path.exists():
dmart_migrations/env.py CHANGED
@@ -1,3 +1,9 @@
1
+ import sys
2
+ import os
3
+ # Add the parent directory (backend) to sys.path to allow importing modules from it
4
+ # This is done here to avoid adding it to PYTHONPATH globally which causes shadowing of 'alembic' library
5
+ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
6
+
1
7
  from logging.config import fileConfig
2
8
 
3
9
  from sqlalchemy import engine_from_config
File without changes