vega-framework 0.1.25__py3-none-any.whl → 0.1.26__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.
vega/cli/commands/add.py CHANGED
@@ -113,28 +113,50 @@ def add_sqlalchemy_feature(project_path: Path, project_name: str):
113
113
 
114
114
  def _create_user_example_repository(project_path: Path, project_name: str):
115
115
  """Create example User entity, repository, and SQLAlchemy implementation"""
116
- from vega.cli.commands.generate import generate_component
116
+ from vega.cli.commands.generate import _generate_entity, _generate_repository, _generate_sqlalchemy_model, _generate_infrastructure_repository
117
+ from vega.cli.utils import to_pascal_case, to_snake_case
118
+
119
+ # Suppress verbose output temporarily by redirecting
120
+ import sys
121
+ from io import StringIO
117
122
 
118
123
  # Generate User entity
119
- click.echo(" + Generating User entity...")
120
- generate_component('entity', 'User', str(project_path))
124
+ click.echo(" + Creating User entity...")
125
+ _generate_entity(project_path, project_name, 'User', 'user')
126
+
127
+ # Generate UserRepository interface (without next steps)
128
+ click.echo(" + Creating UserRepository interface...")
129
+ original_stdout = sys.stdout
130
+ sys.stdout = StringIO() # Suppress "Next steps" output
121
131
 
122
- # Generate UserRepository interface
123
- click.echo(" + Generating UserRepository interface...")
124
- generate_component('repository', 'UserRepository', str(project_path))
132
+ try:
133
+ _generate_repository(project_path, project_name, 'UserRepository', 'user_repository', implementation=None)
134
+ finally:
135
+ sys.stdout = original_stdout
125
136
 
126
137
  # Generate SQLAlchemy UserModel
127
- click.echo(" + Generating UserModel (SQLAlchemy)...")
128
- generate_component('model', 'User', str(project_path))
138
+ click.echo(" + Creating UserModel (SQLAlchemy)...")
139
+ sys.stdout = StringIO() # Suppress verbose output
140
+ try:
141
+ _generate_sqlalchemy_model(project_path, project_name, 'User', 'user')
142
+ finally:
143
+ sys.stdout = original_stdout
129
144
 
130
145
  # Generate SQLAlchemy repository implementation
131
- click.echo(" + Generating SQLAlchemyUserRepository implementation...")
132
- generate_component('repository', 'UserRepository', str(project_path), implementation='sql')
146
+ click.echo(" + Creating SQLAlchemyUserRepository implementation...")
147
+ _generate_infrastructure_repository(
148
+ project_path,
149
+ 'UserRepository',
150
+ 'user_repository',
151
+ 'User',
152
+ 'user',
153
+ 'sql'
154
+ )
133
155
 
134
156
  click.echo(click.style("\n ✓ Example User repository created!", fg='green'))
135
157
  click.echo("\nGenerated files:")
136
158
  click.echo(" - domain/entities/user.py")
137
159
  click.echo(" - domain/repositories/user_repository.py")
138
- click.echo(" - infrastructure/models/user_model.py")
160
+ click.echo(" - infrastructure/models/user.py")
139
161
  click.echo(" - infrastructure/repositories/sqlalchemy_user_repository.py")
140
- click.echo("\nDon't forget to update config.py to register SQLAlchemyUserRepository!")
162
+ click.echo("\nNext step: Update config.py to register SQLAlchemyUserRepository in SERVICES dict")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vega-framework
3
- Version: 0.1.25
3
+ Version: 0.1.26
4
4
  Summary: Enterprise-ready Python framework that enforces Clean Architecture for building maintainable and scalable applications.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -1,7 +1,7 @@
1
1
  vega/__init__.py,sha256=A05RwOYXooAZUz3GnbJ--ofLXgtRZK9gaSmsLVRdGPY,1811
2
2
  vega/cli/__init__.py,sha256=NCzOOyhKHqLeN1r80ekhMfkQwBdAQXKcKiKoNwYPNiY,304
3
3
  vega/cli/commands/__init__.py,sha256=UH7MdYduBG_YoulgdiWkUCtcgGLzuYRGFzxaqoa0pyg,19
4
- vega/cli/commands/add.py,sha256=hTsvV55kqSj3V4iI6L-zpoRyndDgaAs6OTgXQwJ6rsE,5913
4
+ vega/cli/commands/add.py,sha256=z-KH0R_Si43eqTozPtLNpzXBzPyFWL-oXSCLLfP6mog,6583
5
5
  vega/cli/commands/generate.py,sha256=sR8d-0mgF9Aq0qy-QGAB_-JndCw82EpkwHcXQQxDMnM,34569
6
6
  vega/cli/commands/init.py,sha256=kBRtntHT7e-y9uOwZm9o9IUED64e_pO5fBEsIx5m-X8,5592
7
7
  vega/cli/commands/migrate.py,sha256=00swKeVhmKr1_1VJhg3GpIMcJ6Jfgz5FUpmJoLf5qSQ,3805
@@ -72,8 +72,8 @@ vega/patterns/repository.py,sha256=uYUyLs-O8OqW1Wb9ZqIo8UUcCjZ5UFuHors_F2iDg9A,1
72
72
  vega/patterns/service.py,sha256=buFRgJoeQtZQK22Upb4vh84c1elWKFXWBaB0X4RaruE,1374
73
73
  vega/settings/__init__.py,sha256=Eb8PMUyXAlCAQIcL2W8QhTTUHUbVlkAfXdpTUlADo1I,786
74
74
  vega/settings/base.py,sha256=bL45hyoa3t-hQOvur860eSo7O833sQMsXJJPwbTVbwE,1321
75
- vega_framework-0.1.25.dist-info/METADATA,sha256=qV0Mk93k-E4m0r1vn6lC9dq-9UhuCVAM2dMan_TXLAw,12349
76
- vega_framework-0.1.25.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
77
- vega_framework-0.1.25.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
78
- vega_framework-0.1.25.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
79
- vega_framework-0.1.25.dist-info/RECORD,,
75
+ vega_framework-0.1.26.dist-info/METADATA,sha256=Bquhk2HkD4lRALjv17GC34Mb97X_PzabZiDcXM-ENd0,12349
76
+ vega_framework-0.1.26.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
77
+ vega_framework-0.1.26.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
78
+ vega_framework-0.1.26.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
79
+ vega_framework-0.1.26.dist-info/RECORD,,