codeshift 0.2.1__tar.gz → 0.3.2__tar.gz
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.
- {codeshift-0.2.1 → codeshift-0.3.2}/PKG-INFO +1 -1
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/upgrade_all.py +74 -60
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift.egg-info/PKG-INFO +1 -1
- codeshift-0.3.2/pyproject.toml +73 -0
- codeshift-0.2.1/pyproject.toml +0 -120
- {codeshift-0.2.1 → codeshift-0.3.2}/LICENSE +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/README.md +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/analyzer/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/analyzer/risk_assessor.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/auth.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/config.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/database.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/main.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/models/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/models/auth.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/models/billing.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/models/migrate.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/models/usage.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/routers/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/routers/auth.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/routers/billing.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/routers/migrate.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/routers/usage.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/api/routers/webhooks.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/apply.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/auth.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/diff.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/scan.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/commands/upgrade.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/main.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/cli/quota.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge/cache.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge/generator.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge/models.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge/parser.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge/sources.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/libraries/fastapi.yaml +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/libraries/pandas.yaml +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/libraries/pydantic.yaml +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/libraries/requests.yaml +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/libraries/sqlalchemy.yaml +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/loader.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/knowledge_base/models.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/ast_transforms.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/engine.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/llm_migrator.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/transforms/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/transforms/fastapi_transformer.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/transforms/pandas_transformer.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/transforms/pydantic_v1_to_v2.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/transforms/requests_transformer.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/migrator/transforms/sqlalchemy_transformer.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/scanner/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/scanner/code_scanner.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/scanner/dependency_parser.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/utils/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/utils/api_client.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/utils/cache.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/utils/config.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/utils/llm_client.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/validator/__init__.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/validator/syntax_checker.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift/validator/test_runner.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift.egg-info/SOURCES.txt +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift.egg-info/dependency_links.txt +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift.egg-info/entry_points.txt +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift.egg-info/requires.txt +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/codeshift.egg-info/top_level.txt +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/setup.cfg +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_code_scanner.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_fastapi_transforms.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_knowledge_base.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_pandas_transforms.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_pydantic_transforms.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_requests_transforms.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_risk_assessor.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_sqlalchemy_transforms.py +0 -0
- {codeshift-0.2.1 → codeshift-0.3.2}/tests/test_syntax_checker.py +0 -0
|
@@ -149,6 +149,12 @@ def run_single_upgrade(
|
|
|
149
149
|
default=".",
|
|
150
150
|
help="Path to the project to analyze",
|
|
151
151
|
)
|
|
152
|
+
@click.option(
|
|
153
|
+
"--all",
|
|
154
|
+
"upgrade_all_pkgs",
|
|
155
|
+
is_flag=True,
|
|
156
|
+
help="Upgrade all outdated packages (not just Tier 1 or major upgrades)",
|
|
157
|
+
)
|
|
152
158
|
@click.option(
|
|
153
159
|
"--tier1-only",
|
|
154
160
|
is_flag=True,
|
|
@@ -189,6 +195,7 @@ def run_single_upgrade(
|
|
|
189
195
|
)
|
|
190
196
|
def upgrade_all(
|
|
191
197
|
path: str,
|
|
198
|
+
upgrade_all_pkgs: bool,
|
|
192
199
|
tier1_only: bool,
|
|
193
200
|
major_only: bool,
|
|
194
201
|
include: tuple,
|
|
@@ -206,12 +213,15 @@ def upgrade_all(
|
|
|
206
213
|
- All Tier 1 libraries (pydantic, fastapi, sqlalchemy, pandas, requests)
|
|
207
214
|
- Any library with a major version upgrade available
|
|
208
215
|
|
|
216
|
+
Use --all to upgrade ALL outdated packages, regardless of tier or upgrade type.
|
|
217
|
+
|
|
209
218
|
After migration, dependency files (pyproject.toml, requirements.txt) are
|
|
210
219
|
automatically updated with the new versions unless --no-update-deps is specified.
|
|
211
220
|
|
|
212
221
|
\b
|
|
213
222
|
Examples:
|
|
214
223
|
codeshift upgrade-all
|
|
224
|
+
codeshift upgrade-all --all
|
|
215
225
|
codeshift upgrade-all --tier1-only
|
|
216
226
|
codeshift upgrade-all --include pydantic --include fastapi
|
|
217
227
|
codeshift upgrade-all --exclude pandas
|
|
@@ -298,7 +308,8 @@ def upgrade_all(
|
|
|
298
308
|
continue
|
|
299
309
|
|
|
300
310
|
# By default, include Tier 1 libraries and major upgrades
|
|
301
|
-
|
|
311
|
+
# Use --all to include all outdated packages
|
|
312
|
+
if not (tier1_only or major_only or include or upgrade_all_pkgs):
|
|
302
313
|
if not (pkg["is_tier1"] or pkg["is_major"]):
|
|
303
314
|
continue
|
|
304
315
|
|
|
@@ -306,7 +317,9 @@ def upgrade_all(
|
|
|
306
317
|
|
|
307
318
|
if not upgradeable:
|
|
308
319
|
console.print("\n[yellow]No upgradeable packages found matching the criteria.[/]")
|
|
309
|
-
console.print(
|
|
320
|
+
console.print(
|
|
321
|
+
"[dim]Use --all to upgrade all outdated packages, or --verbose to see details.[/]"
|
|
322
|
+
)
|
|
310
323
|
|
|
311
324
|
if verbose and outdated:
|
|
312
325
|
console.print("\nOutdated packages (not matching criteria):")
|
|
@@ -398,75 +411,72 @@ def upgrade_all(
|
|
|
398
411
|
|
|
399
412
|
progress.advance(task)
|
|
400
413
|
|
|
401
|
-
# Display results summary
|
|
402
|
-
if
|
|
414
|
+
# Display code transformation results summary
|
|
415
|
+
if migration_summary:
|
|
416
|
+
console.print("\n[bold]Code Migration Summary[/]\n")
|
|
417
|
+
|
|
418
|
+
summary_table = Table()
|
|
419
|
+
summary_table.add_column("Library", style="cyan")
|
|
420
|
+
summary_table.add_column("Migration", justify="center")
|
|
421
|
+
summary_table.add_column("Files", justify="right")
|
|
422
|
+
summary_table.add_column("Changes", justify="right")
|
|
423
|
+
summary_table.add_column("Status", justify="center")
|
|
424
|
+
|
|
425
|
+
total_files = 0
|
|
426
|
+
total_changes = 0
|
|
427
|
+
|
|
428
|
+
for summary in migration_summary:
|
|
429
|
+
summary_table.add_row(
|
|
430
|
+
summary["library"],
|
|
431
|
+
f"{summary['from_version']} → {summary['to_version']}",
|
|
432
|
+
str(summary["files_changed"]),
|
|
433
|
+
str(summary["total_changes"]),
|
|
434
|
+
"[green]Ready[/]",
|
|
435
|
+
)
|
|
436
|
+
total_files += summary["files_changed"]
|
|
437
|
+
total_changes += summary["total_changes"]
|
|
438
|
+
|
|
439
|
+
console.print(summary_table)
|
|
403
440
|
console.print(
|
|
404
|
-
"[
|
|
441
|
+
f"\n[bold]Total:[/] [cyan]{total_changes}[/] changes across [cyan]{total_files}[/] files"
|
|
405
442
|
)
|
|
406
|
-
return
|
|
407
443
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
"[green]Ready[/]",
|
|
444
|
+
# Show detailed changes if verbose
|
|
445
|
+
if verbose:
|
|
446
|
+
console.print("\n[bold]Change Details[/]")
|
|
447
|
+
for lib_name, lib_results in all_results.items():
|
|
448
|
+
console.print(f"\n[bold cyan]{lib_name}[/]")
|
|
449
|
+
for result_dict in lib_results:
|
|
450
|
+
try:
|
|
451
|
+
display_path = str(
|
|
452
|
+
Path(str(result_dict["file_path"])).relative_to(project_path)
|
|
453
|
+
)
|
|
454
|
+
except ValueError:
|
|
455
|
+
display_path = str(result_dict["file_path"])
|
|
456
|
+
console.print(f" [cyan]{display_path}[/]:")
|
|
457
|
+
for change_dict in result_dict["changes"]:
|
|
458
|
+
console.print(f" • {change_dict['description']}")
|
|
459
|
+
else:
|
|
460
|
+
console.print(
|
|
461
|
+
"\n[green]No code changes needed.[/] Your code is compatible with the new versions."
|
|
427
462
|
)
|
|
428
|
-
total_files += summary["files_changed"]
|
|
429
|
-
total_changes += summary["total_changes"]
|
|
430
|
-
|
|
431
|
-
console.print(summary_table)
|
|
432
|
-
console.print(
|
|
433
|
-
f"\n[bold]Total:[/] [cyan]{total_changes}[/] changes across [cyan]{total_files}[/] files"
|
|
434
|
-
)
|
|
435
463
|
|
|
436
|
-
#
|
|
437
|
-
if
|
|
438
|
-
console.print("\n[bold]Change Details[/]")
|
|
439
|
-
for lib_name, lib_results in all_results.items():
|
|
440
|
-
console.print(f"\n[bold cyan]{lib_name}[/]")
|
|
441
|
-
for result_dict in lib_results:
|
|
442
|
-
try:
|
|
443
|
-
display_path = str(
|
|
444
|
-
Path(str(result_dict["file_path"])).relative_to(project_path)
|
|
445
|
-
)
|
|
446
|
-
except ValueError:
|
|
447
|
-
display_path = str(result_dict["file_path"])
|
|
448
|
-
console.print(f" [cyan]{display_path}[/]:")
|
|
449
|
-
for change_dict in result_dict["changes"]:
|
|
450
|
-
console.print(f" • {change_dict['description']}")
|
|
451
|
-
|
|
452
|
-
# Update dependency files with new versions
|
|
453
|
-
if update_deps and migration_summary:
|
|
464
|
+
# Update dependency files with new versions for ALL upgradeable packages
|
|
465
|
+
if update_deps and upgradeable:
|
|
454
466
|
console.print("\n[bold]Updating dependency files...[/]\n")
|
|
455
467
|
|
|
456
468
|
dep_parser = DependencyParser(project_path)
|
|
457
469
|
dep_updates: list[tuple[str, str, list[tuple[Path, bool]]]] = []
|
|
458
470
|
|
|
459
|
-
for
|
|
471
|
+
for pkg in upgradeable:
|
|
460
472
|
if not dry_run:
|
|
461
473
|
update_results = dep_parser.update_dependency_version(
|
|
462
|
-
str(
|
|
463
|
-
)
|
|
464
|
-
dep_updates.append(
|
|
465
|
-
(str(summary["library"]), str(summary["to_version"]), update_results)
|
|
474
|
+
str(pkg["name"]), str(pkg["latest"])
|
|
466
475
|
)
|
|
476
|
+
dep_updates.append((str(pkg["name"]), str(pkg["latest"]), update_results))
|
|
467
477
|
else:
|
|
468
478
|
# In dry run, just show what would be updated
|
|
469
|
-
dep_updates.append((str(
|
|
479
|
+
dep_updates.append((str(pkg["name"]), str(pkg["latest"]), []))
|
|
470
480
|
|
|
471
481
|
# Display update results
|
|
472
482
|
if dry_run:
|
|
@@ -491,8 +501,8 @@ def upgrade_all(
|
|
|
491
501
|
"[dim]No dependency files were updated (dependencies may not be pinned)[/]"
|
|
492
502
|
)
|
|
493
503
|
|
|
494
|
-
# Save state
|
|
495
|
-
if not dry_run:
|
|
504
|
+
# Save state only if there are code changes to review
|
|
505
|
+
if not dry_run and migration_summary:
|
|
496
506
|
# Merge all results into a combined state format
|
|
497
507
|
# This maintains compatibility with diff/apply commands
|
|
498
508
|
combined_results: list[dict[str, Any]] = []
|
|
@@ -514,5 +524,9 @@ def upgrade_all(
|
|
|
514
524
|
console.print("\nNext steps:")
|
|
515
525
|
console.print(" [cyan]codeshift diff[/] - View detailed diff of proposed changes")
|
|
516
526
|
console.print(" [cyan]codeshift apply[/] - Apply changes to your files")
|
|
517
|
-
|
|
518
|
-
console.print("\n[dim]Dry run mode - no
|
|
527
|
+
elif dry_run:
|
|
528
|
+
console.print("\n[dim]Dry run mode - no changes applied[/]")
|
|
529
|
+
elif not migration_summary and upgradeable:
|
|
530
|
+
console.print(
|
|
531
|
+
"\n[green]Dependencies updated.[/] No code changes required for this upgrade."
|
|
532
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [ "setuptools>=61.0", "wheel",]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "codeshift"
|
|
7
|
+
version = "0.3.2"
|
|
8
|
+
description = "AI-powered CLI tool that migrates Python code to handle breaking dependency changes"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
keywords = [ "migration", "dependencies", "ast", "refactoring", "pydantic",]
|
|
12
|
+
classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries :: Python Modules",]
|
|
13
|
+
dependencies = [ "click>=8.0", "libcst>=1.0", "anthropic>=0.20", "pyyaml>=6.0", "rich>=13.0", "toml>=0.10", "packaging>=23.0", "httpx>=0.25", "pytest>=8.4.2", "nox>=2025.11.12", "black>=24.10.0", "mypy>=1.19.1", "supabase>=2.27.2", "pre-commit>=4.5.1",]
|
|
14
|
+
[[project.authors]]
|
|
15
|
+
name = "PyResolve Team"
|
|
16
|
+
|
|
17
|
+
[dependency-groups]
|
|
18
|
+
dev = [ "types-pyyaml>=6.0.12.20250915", "types-toml>=0.10.8.20240310",]
|
|
19
|
+
|
|
20
|
+
[project.license]
|
|
21
|
+
text = "MIT"
|
|
22
|
+
|
|
23
|
+
[project.optional-dependencies]
|
|
24
|
+
api = [ "fastapi>=0.109.0", "uvicorn>=0.27.0", "supabase>=2.3.0", "stripe>=7.0.0", "pydantic-settings>=2.1.0", "email-validator>=2.0.0",]
|
|
25
|
+
dev = [ "pytest>=7.0", "pytest-cov>=4.0", "black>=24.0,<25.0", "ruff>=0.1.0", "mypy>=1.0", "nox>=2024.0", "pre-commit>=3.6.0", "types-toml>=0.10", "types-PyYAML>=6.0",]
|
|
26
|
+
all = [ "codeshift[api,dev]",]
|
|
27
|
+
|
|
28
|
+
[project.scripts]
|
|
29
|
+
codeshift = "codeshift.cli.main:cli"
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://github.com/youssefragab/PyResolve"
|
|
33
|
+
Repository = "https://github.com/youssefragab/PyResolve"
|
|
34
|
+
Issues = "https://github.com/youssefragab/PyResolve/issues"
|
|
35
|
+
|
|
36
|
+
[tool.black]
|
|
37
|
+
line-length = 100
|
|
38
|
+
target-version = [ "py310", "py311", "py312",]
|
|
39
|
+
|
|
40
|
+
[tool.ruff]
|
|
41
|
+
line-length = 100
|
|
42
|
+
target-version = "py310"
|
|
43
|
+
|
|
44
|
+
[tool.mypy]
|
|
45
|
+
python_version = "3.10"
|
|
46
|
+
warn_return_any = true
|
|
47
|
+
warn_unused_ignores = true
|
|
48
|
+
disallow_untyped_defs = true
|
|
49
|
+
[[tool.mypy.overrides]]
|
|
50
|
+
module = "supabase.*"
|
|
51
|
+
ignore_missing_imports = true
|
|
52
|
+
ignore_errors = true
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.package-data]
|
|
55
|
+
"codeshift.knowledge_base" = [ "libraries/*.yaml",]
|
|
56
|
+
|
|
57
|
+
[tool.pytest.ini_options]
|
|
58
|
+
testpaths = [ "tests",]
|
|
59
|
+
python_files = [ "test_*.py",]
|
|
60
|
+
python_functions = [ "test_*",]
|
|
61
|
+
addopts = "-v --tb=short"
|
|
62
|
+
|
|
63
|
+
[tool.ruff.lint]
|
|
64
|
+
select = [ "E", "F", "W", "I", "UP", "B", "C4",]
|
|
65
|
+
ignore = [ "E501",]
|
|
66
|
+
|
|
67
|
+
[tool.setuptools.packages.find]
|
|
68
|
+
where = [ ".",]
|
|
69
|
+
include = [ "codeshift*",]
|
|
70
|
+
|
|
71
|
+
[tool.ruff.lint.isort]
|
|
72
|
+
known-first-party = [ "codeshift",]
|
|
73
|
+
section-order = [ "future", "standard-library", "third-party", "first-party", "local-folder",]
|
codeshift-0.2.1/pyproject.toml
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "codeshift"
|
|
7
|
-
version = "0.2.1"
|
|
8
|
-
description = "AI-powered CLI tool that migrates Python code to handle breaking dependency changes"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
license = {text = "MIT"}
|
|
11
|
-
requires-python = ">=3.10"
|
|
12
|
-
authors = [
|
|
13
|
-
{name = "PyResolve Team"}
|
|
14
|
-
]
|
|
15
|
-
keywords = ["migration", "dependencies", "ast", "refactoring", "pydantic"]
|
|
16
|
-
classifiers = [
|
|
17
|
-
"Development Status :: 3 - Alpha",
|
|
18
|
-
"Intended Audience :: Developers",
|
|
19
|
-
"License :: OSI Approved :: MIT License",
|
|
20
|
-
"Programming Language :: Python :: 3",
|
|
21
|
-
"Programming Language :: Python :: 3.10",
|
|
22
|
-
"Programming Language :: Python :: 3.11",
|
|
23
|
-
"Programming Language :: Python :: 3.12",
|
|
24
|
-
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
dependencies = [
|
|
28
|
-
"click>=8.0",
|
|
29
|
-
"libcst>=1.0",
|
|
30
|
-
"anthropic>=0.20",
|
|
31
|
-
"pyyaml>=6.0",
|
|
32
|
-
"rich>=13.0",
|
|
33
|
-
"toml>=0.10",
|
|
34
|
-
"packaging>=23.0",
|
|
35
|
-
"httpx>=0.25",
|
|
36
|
-
"pytest>=8.4.2",
|
|
37
|
-
"nox>=2025.11.12",
|
|
38
|
-
"black>=24.10.0",
|
|
39
|
-
"mypy>=1.19.1",
|
|
40
|
-
"supabase>=2.27.2",
|
|
41
|
-
"pre-commit>=4.5.1",
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
[project.optional-dependencies]
|
|
45
|
-
api = [
|
|
46
|
-
"fastapi>=0.109.0",
|
|
47
|
-
"uvicorn>=0.27.0",
|
|
48
|
-
"supabase>=2.3.0",
|
|
49
|
-
"stripe>=7.0.0",
|
|
50
|
-
"pydantic-settings>=2.1.0",
|
|
51
|
-
"email-validator>=2.0.0",
|
|
52
|
-
]
|
|
53
|
-
dev = [
|
|
54
|
-
"pytest>=7.0",
|
|
55
|
-
"pytest-cov>=4.0",
|
|
56
|
-
"black>=24.0,<25.0",
|
|
57
|
-
"ruff>=0.1.0",
|
|
58
|
-
"mypy>=1.0",
|
|
59
|
-
"nox>=2024.0",
|
|
60
|
-
"pre-commit>=3.6.0",
|
|
61
|
-
"types-toml>=0.10",
|
|
62
|
-
"types-PyYAML>=6.0",
|
|
63
|
-
]
|
|
64
|
-
all = [
|
|
65
|
-
"codeshift[api,dev]",
|
|
66
|
-
]
|
|
67
|
-
|
|
68
|
-
[project.scripts]
|
|
69
|
-
codeshift = "codeshift.cli.main:cli"
|
|
70
|
-
|
|
71
|
-
[project.urls]
|
|
72
|
-
Homepage = "https://github.com/youssefragab/PyResolve"
|
|
73
|
-
Repository = "https://github.com/youssefragab/PyResolve"
|
|
74
|
-
Issues = "https://github.com/youssefragab/PyResolve/issues"
|
|
75
|
-
|
|
76
|
-
[tool.setuptools.packages.find]
|
|
77
|
-
where = ["."]
|
|
78
|
-
include = ["codeshift*"]
|
|
79
|
-
|
|
80
|
-
[tool.setuptools.package-data]
|
|
81
|
-
"codeshift.knowledge_base" = ["libraries/*.yaml"]
|
|
82
|
-
|
|
83
|
-
[tool.pytest.ini_options]
|
|
84
|
-
testpaths = ["tests"]
|
|
85
|
-
python_files = ["test_*.py"]
|
|
86
|
-
python_functions = ["test_*"]
|
|
87
|
-
addopts = "-v --tb=short"
|
|
88
|
-
|
|
89
|
-
[tool.black]
|
|
90
|
-
line-length = 100
|
|
91
|
-
target-version = ["py310", "py311", "py312"]
|
|
92
|
-
|
|
93
|
-
[tool.ruff]
|
|
94
|
-
line-length = 100
|
|
95
|
-
target-version = "py310"
|
|
96
|
-
|
|
97
|
-
[tool.ruff.lint]
|
|
98
|
-
select = ["E", "F", "W", "I", "UP", "B", "C4"]
|
|
99
|
-
ignore = ["E501"]
|
|
100
|
-
|
|
101
|
-
[tool.ruff.lint.isort]
|
|
102
|
-
known-first-party = ["codeshift"]
|
|
103
|
-
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
|
|
104
|
-
|
|
105
|
-
[tool.mypy]
|
|
106
|
-
python_version = "3.10"
|
|
107
|
-
warn_return_any = true
|
|
108
|
-
warn_unused_ignores = true
|
|
109
|
-
disallow_untyped_defs = true
|
|
110
|
-
|
|
111
|
-
[[tool.mypy.overrides]]
|
|
112
|
-
module = "supabase.*"
|
|
113
|
-
ignore_missing_imports = true
|
|
114
|
-
ignore_errors = true
|
|
115
|
-
|
|
116
|
-
[dependency-groups]
|
|
117
|
-
dev = [
|
|
118
|
-
"types-pyyaml>=6.0.12.20250915",
|
|
119
|
-
"types-toml>=0.10.8.20240310",
|
|
120
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|