TypeDAL 3.5.0__py3-none-any.whl → 3.6.0__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.

Potentially problematic release.


This version of TypeDAL might be problematic. Click here for more details.

typedal/__about__.py CHANGED
@@ -5,4 +5,4 @@ This file contains the Version info for this package.
5
5
  # SPDX-FileCopyrightText: 2023-present Robin van der Noord <robinvandernoord@gmail.com>
6
6
  #
7
7
  # SPDX-License-Identifier: MIT
8
- __version__ = "3.5.0"
8
+ __version__ = "3.6.0"
typedal/cli.py CHANGED
@@ -40,7 +40,7 @@ from pydal2sql.types import (
40
40
  OutputFormat_Option,
41
41
  Tables_Option,
42
42
  )
43
- from pydal2sql_core import core_alter, core_create
43
+ from pydal2sql_core import core_alter, core_create, core_stub
44
44
  from typing_extensions import Never
45
45
 
46
46
  from . import caching
@@ -417,6 +417,38 @@ def fake_migrations(
417
417
  return 0
418
418
 
419
419
 
420
+ @app.command(name="migrations.stub")
421
+ @with_exit_code(hide_tb=IS_DEBUG)
422
+ def migrations_stub(
423
+ migration_name: typing.Annotated[str, typer.Argument()] = "stub_migration",
424
+ connection: typing.Annotated[str, typer.Option("--connection", "-c")] = None,
425
+ output_format: OutputFormat_Option = None,
426
+ output_file: Optional[str] = None,
427
+ dry_run: typing.Annotated[bool, typer.Option("--dry", "--dry-run")] = False,
428
+ is_pydal: typing.Annotated[bool, typer.Option("--pydal", "-p")] = False,
429
+ # defaults to is_typedal of course
430
+ ) -> int:
431
+ """
432
+ Create an empty migration via pydal2sql.
433
+ """
434
+ generic_config = load_config(connection)
435
+ pydal2sql_config = generic_config.to_pydal2sql()
436
+ pydal2sql_config.update(
437
+ format=output_format,
438
+ output=output_file,
439
+ _skip_none=True,
440
+ )
441
+
442
+ core_stub(
443
+ migration_name, # raw, without date or number
444
+ output_format=pydal2sql_config.format,
445
+ output_file=pydal2sql_config.output or None,
446
+ dry_run=dry_run,
447
+ is_typedal=not is_pydal,
448
+ )
449
+ return 0
450
+
451
+
420
452
  AnyNestedDict: typing.TypeAlias = dict[str, AnyDict]
421
453
 
422
454
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: TypeDAL
3
- Version: 3.5.0
3
+ Version: 3.6.0
4
4
  Summary: Typing support for PyDAL
5
5
  Project-URL: Documentation, https://typedal.readthedocs.io/
6
6
  Project-URL: Issues, https://github.com/trialandsuccess/TypeDAL/issues
@@ -23,7 +23,7 @@ Requires-Dist: python-slugify
23
23
  Provides-Extra: all
24
24
  Requires-Dist: edwh-migrate>=0.8.0; extra == 'all'
25
25
  Requires-Dist: py4web; extra == 'all'
26
- Requires-Dist: pydal2sql[all]>=1.1.4; extra == 'all'
26
+ Requires-Dist: pydal2sql[all]>=1.2.0; extra == 'all'
27
27
  Requires-Dist: questionary; extra == 'all'
28
28
  Requires-Dist: tabulate; extra == 'all'
29
29
  Requires-Dist: tomlkit; extra == 'all'
@@ -43,7 +43,7 @@ Requires-Dist: types-requests; extra == 'dev'
43
43
  Requires-Dist: types-tabulate; extra == 'dev'
44
44
  Provides-Extra: migrations
45
45
  Requires-Dist: edwh-migrate>=0.8.0; extra == 'migrations'
46
- Requires-Dist: pydal2sql>=1.1.4; extra == 'migrations'
46
+ Requires-Dist: pydal2sql>=1.2.0; extra == 'migrations'
47
47
  Requires-Dist: questionary; extra == 'migrations'
48
48
  Requires-Dist: tabulate; extra == 'migrations'
49
49
  Requires-Dist: tomlkit; extra == 'migrations'
@@ -1,7 +1,7 @@
1
- typedal/__about__.py,sha256=AjgocyPCjgkgwSg0cozJLLzDEJz3aZN-Ze0xcPDV5pc,206
1
+ typedal/__about__.py,sha256=6BHlKIfFsDoanUXT6U-wyOOCusiaMl22UUFAVmE4Clg,206
2
2
  typedal/__init__.py,sha256=QQpLiVl9w9hm2LBxey49Y_tCF_VB2bScVaS_mCjYy54,366
3
3
  typedal/caching.py,sha256=SMcJsahLlZ79yykWCveERFx1ZJUNEKhA9SPmCTIuLp8,11798
4
- typedal/cli.py,sha256=n2TKQGOryck91ByFEcLqwPgh6_kMtoBr3UBIDwU_8n8,18180
4
+ typedal/cli.py,sha256=wzyId6YwRyqfuJ2byxvl6YecDNaKpkLmo-R5HvRuTok,19265
5
5
  typedal/config.py,sha256=0qy1zrTUdtmXPM9jHzFnSR1DJsqGJqcdG6pvhzKQHe0,11625
6
6
  typedal/core.py,sha256=mbNFMv3NJ2QRDuohs03LCGhVVnffsxjsoe-m887U6c8,98367
7
7
  typedal/fields.py,sha256=z2PD9vLWqBR_zXtiY0DthqTG4AeF3yxKoeuVfGXnSdg,5197
@@ -13,7 +13,7 @@ typedal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  typedal/types.py,sha256=W2zsmJSPYbIvhjb5Df_ZANH8riCIJhOOHjI8UCQINls,5239
14
14
  typedal/web2py_py4web_shared.py,sha256=VK9T8P5UwVLvfNBsY4q79ANcABv-jX76YKADt1Zz_co,1539
15
15
  typedal/serializers/as_json.py,sha256=ffo152W-sARYXym4BzwX709rrO2-QwKk2KunWY8RNl4,2229
16
- typedal-3.5.0.dist-info/METADATA,sha256=pffl-arVDPP0CBg3EcVhlze5mxypyCH-Ds_iZ6sZY6s,9462
17
- typedal-3.5.0.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
18
- typedal-3.5.0.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
19
- typedal-3.5.0.dist-info/RECORD,,
16
+ typedal-3.6.0.dist-info/METADATA,sha256=yZpPjMmR24Kzh0QRmMrTihEHGNCJFgX4NtyfOIqMf-A,9462
17
+ typedal-3.6.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
18
+ typedal-3.6.0.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
19
+ typedal-3.6.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.17.1
2
+ Generator: hatchling 1.25.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any