ci-parity-cli 0.1.0__tar.gz → 0.1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ci-parity-cli
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Compare your local environment to CI workflows to prevent 'works on my machine' errors.
5
5
  Author-email: Braveen R <your.email@example.com>
6
6
  Requires-Python: >=3.9
@@ -3,6 +3,7 @@ from rich.console import Console
3
3
  from rich.theme import Theme
4
4
  from rich.table import Table
5
5
  from rich.panel import Panel
6
+ import sys
6
7
  from ci_parity.parsers.workflows import get_ci_requirements
7
8
  from ci_parity.probes.local import get_local_state
8
9
  from ci_parity.compare.versions import evaluate_mismatch
@@ -23,12 +24,18 @@ app = typer.Typer(help="ci-parity: Sync your local dev environment with CI.", no
23
24
  def check():
24
25
  console.print("[info]Scanning .github/workflows...[/info]\n")
25
26
  ci_reqs = get_ci_requirements()
27
+
28
+ if ci_reqs["os"] == "unknown" and ci_reqs["python"] == "unknown":
29
+ console.print("[danger]❌ No CI configuration found.[/danger]")
30
+ console.print("[info]Please run this command inside a repository that contains a .github/workflows directory.[/info]")
31
+ sys.exit(1)
32
+
26
33
  local_state = get_local_state(ci_reqs)
27
34
 
28
35
  table = Table(header_style="info", border_style="dim cyan")
29
36
  table.add_column("ITEM")
30
- table.add_column("CI")
31
- table.add_column("YOU")
37
+ table.add_column("EXPECTED (CI)") # Clearer header
38
+ table.add_column("ACTUAL (LOCAL)") # Clearer header
32
39
  table.add_column("RESULT")
33
40
 
34
41
  table.add_row("OS", ci_reqs["os"], local_state["os"], evaluate_mismatch(ci_reqs["os"], local_state["os"], "os"))
@@ -61,15 +68,12 @@ def check():
61
68
  @app.command()
62
69
  def explain(run_url: str):
63
70
  console.print(f"[info]Connecting to GitHub API for:[/info] {run_url}\n")
64
-
65
- # Simulating a fetched failed log containing a Node version error
66
71
  dummy_log = """
67
72
  Step 4: Run tests
68
73
  Error: Cannot find module 'node:test'
69
74
  Require stack:
70
75
  - /home/runner/work/app/app/test.js
71
76
  """
72
-
73
77
  console.print(Panel(dummy_log.strip(), title="[warning]Extracted CI Log Snippet[/warning]", border_style="dim magenta", expand=False))
74
78
 
75
79
  insights = analyze_log(dummy_log)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ci-parity-cli"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "Compare your local environment to CI workflows to prevent 'works on my machine' errors."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
File without changes
File without changes