RepoPackPy 0.1.1__tar.gz → 0.1.7__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,8 +1,9 @@
1
1
  name: Publish to PyPI
2
2
 
3
3
  on:
4
- release:
5
- types: [published]
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
6
7
 
7
8
  jobs:
8
9
  verify-tag:
@@ -23,11 +23,13 @@ jobs:
23
23
 
24
24
  - name: Install project and audit tools
25
25
  run: |
26
- pip install -e ".[dev]"
26
+ pip install ".[dev]"
27
27
  pip install pip-audit bandit
28
28
 
29
29
  - name: pip-audit (known CVEs)
30
- run: pip-audit --strict
30
+ run: |
31
+ pip freeze | grep -Eiv "^(repopackpy|repopack-py|-e )" > /tmp/audit-reqs.txt
32
+ pip-audit --strict -r /tmp/audit-reqs.txt
31
33
 
32
34
  - name: bandit (SAST)
33
35
  run: bandit -r repopack/ -ll -ii
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RepoPackPy
3
- Version: 0.1.1
3
+ Version: 0.1.7
4
4
  Summary: Pack/unpack any source workspace into portable JSON, with MCP server support.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -27,18 +27,45 @@ Pack/unpack **any source workspace regardless of technology stack** (Python, Nod
27
27
 
28
28
  ## Installation
29
29
 
30
+ ### From PyPI (recommended)
31
+
32
+ Install the latest stable release:
33
+
30
34
  ```bash
31
35
  pip install RepoPackPy
32
36
  ```
33
37
 
34
- For development:
38
+ Pin to a specific version:
35
39
 
36
40
  ```bash
37
- pip install -e ".[dev]"
41
+ pip install RepoPackPy==0.1.1
38
42
  ```
39
43
 
40
44
  Requires Python 3.10+.
41
45
 
46
+ ### Quick start after install
47
+
48
+ ```bash
49
+ # Verify the install
50
+ repopack --help
51
+
52
+ # Pack your project
53
+ repopack pack . -o my-workspace.json
54
+
55
+ # Restore it somewhere else
56
+ repopack unpack my-workspace.json -t ./restored
57
+ ```
58
+
59
+ ### For development
60
+
61
+ Clone the repo and install in editable mode with test dependencies:
62
+
63
+ ```bash
64
+ git clone https://github.com/ShanKonduru/RepoPack.git
65
+ cd RepoPack
66
+ pip install -e ".[dev]"
67
+ ```
68
+
42
69
  ## CLI Usage
43
70
 
44
71
  ```bash
@@ -13,18 +13,45 @@ Pack/unpack **any source workspace regardless of technology stack** (Python, Nod
13
13
 
14
14
  ## Installation
15
15
 
16
+ ### From PyPI (recommended)
17
+
18
+ Install the latest stable release:
19
+
16
20
  ```bash
17
21
  pip install RepoPackPy
18
22
  ```
19
23
 
20
- For development:
24
+ Pin to a specific version:
21
25
 
22
26
  ```bash
23
- pip install -e ".[dev]"
27
+ pip install RepoPackPy==0.1.1
24
28
  ```
25
29
 
26
30
  Requires Python 3.10+.
27
31
 
32
+ ### Quick start after install
33
+
34
+ ```bash
35
+ # Verify the install
36
+ repopack --help
37
+
38
+ # Pack your project
39
+ repopack pack . -o my-workspace.json
40
+
41
+ # Restore it somewhere else
42
+ repopack unpack my-workspace.json -t ./restored
43
+ ```
44
+
45
+ ### For development
46
+
47
+ Clone the repo and install in editable mode with test dependencies:
48
+
49
+ ```bash
50
+ git clone https://github.com/ShanKonduru/RepoPack.git
51
+ cd RepoPack
52
+ pip install -e ".[dev]"
53
+ ```
54
+
28
55
  ## CLI Usage
29
56
 
30
57
  ```bash
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "RepoPackPy"
7
- version = "0.1.1"
7
+ version = "0.1.7"
8
8
  description = "Pack/unpack any source workspace into portable JSON, with MCP server support."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -0,0 +1 @@
1
+ __version__ = "0.1.7"
@@ -1,14 +1,59 @@
1
1
  import json
2
+ import http.client
3
+ from typing import Optional
2
4
  import typer
3
5
  from pathlib import Path
4
6
 
7
+ from repopack import __version__
5
8
  from repopack.packer import pack_workspace
6
9
  from repopack.unpacker import unpack_workspace
7
10
  from repopack.mcp_server import run_server
8
11
 
12
+ _PYPI_HOST = "pypi.org"
13
+ _PYPI_PATH = "/pypi/RepoPackPy/json"
14
+
15
+
16
+ def _check_latest_version() -> Optional[str]:
17
+ try:
18
+ conn = http.client.HTTPSConnection(_PYPI_HOST, timeout=3)
19
+ conn.request("GET", _PYPI_PATH)
20
+ resp = conn.getresponse()
21
+ if resp.status == 200:
22
+ data = json.loads(resp.read().decode())
23
+ return data["info"]["version"]
24
+ return None
25
+ except Exception:
26
+ return None
27
+
28
+
29
+ def _version_callback(value: bool) -> None:
30
+ if value:
31
+ typer.echo(f"repopack {__version__}")
32
+ latest = _check_latest_version()
33
+ if latest and latest != __version__:
34
+ typer.echo(
35
+ f"A new version is available: {latest} "
36
+ f"(run: pip install --upgrade RepoPackPy)",
37
+ err=True,
38
+ )
39
+ raise typer.Exit()
40
+
41
+
9
42
  app = typer.Typer(name="repopack", help="Pack/unpack any workspace into portable JSON.")
10
43
 
11
44
 
45
+ @app.callback()
46
+ def main_callback(
47
+ version: Optional[bool] = typer.Option(
48
+ None, "--version", "-V",
49
+ callback=_version_callback,
50
+ is_eager=True,
51
+ help="Show version and exit.",
52
+ ),
53
+ ) -> None:
54
+ pass
55
+
56
+
12
57
  @app.command()
13
58
  def pack(
14
59
  directory: str = typer.Argument(".", help="The workspace to pack."),
@@ -23,7 +68,7 @@ def pack(
23
68
  json.dump(result, f, indent=2)
24
69
  total_files = result.get("total_files", 0)
25
70
  total_bytes = result.get("total_bytes", 0)
26
- typer.echo(f"Packed {total_files} files ({total_bytes} bytes) {output}", err=True)
71
+ typer.echo(f"Packed {total_files} files ({total_bytes} bytes) -> {output}", err=True)
27
72
  else:
28
73
  print(json.dumps(result, indent=2))
29
74
  except Exception as e:
@@ -1 +0,0 @@
1
- __version__ = "0.1.1"
File without changes
File without changes
File without changes
File without changes
File without changes