ericvh commited on
Commit
1aaef9c
·
verified ·
1 Parent(s): b420299

Update app to fix metadata

Browse files
README.md CHANGED
@@ -1,10 +1,48 @@
1
  ---
2
- title: Hf Space
3
- emoji: 🐨
4
- colorFrom: blue
5
  colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Device Connect Driver
3
+ emoji: 📡
4
+ colorFrom: gray
5
  colorTo: indigo
6
  sdk: static
7
  pinned: false
8
+ short_description: Reachy Mini Device Connect driver with portal settings UI
9
+ tags:
10
+ - reachy_mini
11
+ - reachy_mini_python_app
12
  ---
13
 
14
+ ## Device Connect Edge Driver
15
+
16
+ Thin [Hugging Face Space](https://huggingface.co/docs/hub/spaces) package wrapping the
17
+ **reachy-mini-driver** package (Driver repository: link your own GitHub `reachy-mini-driver` fork in this README when you publish).
18
+
19
+ ### Generate `pyproject.toml` (required)
20
+
21
+ `pyproject.toml` is **generated** by `sync_driver_dependency.py` so `reachy-mini-driver` is referenced with a URL pip can resolve (bare `file:..` breaks in the assistant’s temp venv).
22
+
23
+ **Local monorepo / `reachy-mini-app-assistant check`:**
24
+
25
+ ```bash
26
+ python hf_space/sync_driver_dependency.py local
27
+ reachy-mini-app-assistant check hf_space
28
+ ```
29
+
30
+ **Reset committed placeholder** (invalid until you set GitHub username):
31
+
32
+ ```bash
33
+ python hf_space/sync_driver_dependency.py template
34
+ ```
35
+
36
+ **Before `reachy-mini-app-assistant publish`** (HF uploads only this folder—use Git or PyPI):
37
+
38
+ ```bash
39
+ python hf_space/sync_driver_dependency.py git --url 'git+https://github.com/<you>/reachy-mini-driver.git@main'
40
+ # or: python hf_space/sync_driver_dependency.py pypi --version 0.1.0
41
+
42
+ reachy-mini-app-assistant publish hf_space
43
+ ```
44
+
45
+ ### Community marketplace
46
+
47
+ Uses the standard Reachy flow: [Make and publish your Reachy Mini App](https://huggingface.co/blog/pollen-robotics/make-and-publish-your-reachy-mini-apps).
48
+
build/lib/build/lib/build/lib/build/lib/build/lib/reachy_mini_device_connect_space/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Hugging Face Spaces thin package for ``reachy_mini_driver``."""
build/lib/build/lib/build/lib/build/lib/build/lib/reachy_mini_device_connect_space/main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Space entry: assistant check requires ``class ...(ReachyMiniApp)``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import threading
7
+
8
+ from reachy_mini import ReachyMini, ReachyMiniApp
9
+
10
+ from reachy_mini_driver.reachy_app import (
11
+ SETTINGS_HOST,
12
+ SETTINGS_PORT,
13
+ register_device_connect_settings_routes,
14
+ run_device_connect_app,
15
+ )
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ class ReachyMiniDeviceConnectSpace(ReachyMiniApp):
21
+ """HF Space shell listing; implementation lives in ``reachy_mini_driver.reachy_app``."""
22
+
23
+ custom_app_url: str | None = f"http://{SETTINGS_HOST}:{SETTINGS_PORT}"
24
+ request_media_backend: str | None = "default"
25
+
26
+ def __init__(self, running_on_wireless: bool = False) -> None:
27
+ super().__init__(running_on_wireless)
28
+ register_device_connect_settings_routes(self.settings_app)
29
+
30
+ def run(self, reachy_mini: ReachyMini, stop_event: threading.Event) -> None:
31
+ run_device_connect_app(reachy_mini, stop_event)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ logging.basicConfig(level=logging.INFO)
36
+ app = ReachyMiniDeviceConnectSpace()
37
+ try:
38
+ app.wrapped_run()
39
+ except KeyboardInterrupt:
40
+ app.stop()
build/lib/build/lib/build/lib/build/lib/reachy_mini_device_connect_space/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Hugging Face Spaces thin package for ``reachy_mini_driver``."""
build/lib/build/lib/build/lib/build/lib/reachy_mini_device_connect_space/main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Space entry: assistant check requires ``class ...(ReachyMiniApp)``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import threading
7
+
8
+ from reachy_mini import ReachyMini, ReachyMiniApp
9
+
10
+ from reachy_mini_driver.reachy_app import (
11
+ SETTINGS_HOST,
12
+ SETTINGS_PORT,
13
+ register_device_connect_settings_routes,
14
+ run_device_connect_app,
15
+ )
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ class ReachyMiniDeviceConnectSpace(ReachyMiniApp):
21
+ """HF Space shell listing; implementation lives in ``reachy_mini_driver.reachy_app``."""
22
+
23
+ custom_app_url: str | None = f"http://{SETTINGS_HOST}:{SETTINGS_PORT}"
24
+ request_media_backend: str | None = "default"
25
+
26
+ def __init__(self, running_on_wireless: bool = False) -> None:
27
+ super().__init__(running_on_wireless)
28
+ register_device_connect_settings_routes(self.settings_app)
29
+
30
+ def run(self, reachy_mini: ReachyMini, stop_event: threading.Event) -> None:
31
+ run_device_connect_app(reachy_mini, stop_event)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ logging.basicConfig(level=logging.INFO)
36
+ app = ReachyMiniDeviceConnectSpace()
37
+ try:
38
+ app.wrapped_run()
39
+ except KeyboardInterrupt:
40
+ app.stop()
build/lib/build/lib/build/lib/reachy_mini_device_connect_space/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Hugging Face Spaces thin package for ``reachy_mini_driver``."""
build/lib/build/lib/build/lib/reachy_mini_device_connect_space/main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Space entry: assistant check requires ``class ...(ReachyMiniApp)``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import threading
7
+
8
+ from reachy_mini import ReachyMini, ReachyMiniApp
9
+
10
+ from reachy_mini_driver.reachy_app import (
11
+ SETTINGS_HOST,
12
+ SETTINGS_PORT,
13
+ register_device_connect_settings_routes,
14
+ run_device_connect_app,
15
+ )
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ class ReachyMiniDeviceConnectSpace(ReachyMiniApp):
21
+ """HF Space shell listing; implementation lives in ``reachy_mini_driver.reachy_app``."""
22
+
23
+ custom_app_url: str | None = f"http://{SETTINGS_HOST}:{SETTINGS_PORT}"
24
+ request_media_backend: str | None = "default"
25
+
26
+ def __init__(self, running_on_wireless: bool = False) -> None:
27
+ super().__init__(running_on_wireless)
28
+ register_device_connect_settings_routes(self.settings_app)
29
+
30
+ def run(self, reachy_mini: ReachyMini, stop_event: threading.Event) -> None:
31
+ run_device_connect_app(reachy_mini, stop_event)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ logging.basicConfig(level=logging.INFO)
36
+ app = ReachyMiniDeviceConnectSpace()
37
+ try:
38
+ app.wrapped_run()
39
+ except KeyboardInterrupt:
40
+ app.stop()
build/lib/build/lib/reachy_mini_device_connect_space/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Hugging Face Spaces thin package for ``reachy_mini_driver``."""
build/lib/build/lib/reachy_mini_device_connect_space/main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Space entry: assistant check requires ``class ...(ReachyMiniApp)``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import threading
7
+
8
+ from reachy_mini import ReachyMini, ReachyMiniApp
9
+
10
+ from reachy_mini_driver.reachy_app import (
11
+ SETTINGS_HOST,
12
+ SETTINGS_PORT,
13
+ register_device_connect_settings_routes,
14
+ run_device_connect_app,
15
+ )
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ class ReachyMiniDeviceConnectSpace(ReachyMiniApp):
21
+ """HF Space shell listing; implementation lives in ``reachy_mini_driver.reachy_app``."""
22
+
23
+ custom_app_url: str | None = f"http://{SETTINGS_HOST}:{SETTINGS_PORT}"
24
+ request_media_backend: str | None = "default"
25
+
26
+ def __init__(self, running_on_wireless: bool = False) -> None:
27
+ super().__init__(running_on_wireless)
28
+ register_device_connect_settings_routes(self.settings_app)
29
+
30
+ def run(self, reachy_mini: ReachyMini, stop_event: threading.Event) -> None:
31
+ run_device_connect_app(reachy_mini, stop_event)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ logging.basicConfig(level=logging.INFO)
36
+ app = ReachyMiniDeviceConnectSpace()
37
+ try:
38
+ app.wrapped_run()
39
+ except KeyboardInterrupt:
40
+ app.stop()
build/lib/reachy_mini_device_connect_space/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Hugging Face Spaces thin package for ``reachy_mini_driver``."""
build/lib/reachy_mini_device_connect_space/main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Space entry: assistant check requires ``class ...(ReachyMiniApp)``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import threading
7
+
8
+ from reachy_mini import ReachyMini, ReachyMiniApp
9
+
10
+ from reachy_mini_driver.reachy_app import (
11
+ SETTINGS_HOST,
12
+ SETTINGS_PORT,
13
+ register_device_connect_settings_routes,
14
+ run_device_connect_app,
15
+ )
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ class ReachyMiniDeviceConnectSpace(ReachyMiniApp):
21
+ """HF Space shell listing; implementation lives in ``reachy_mini_driver.reachy_app``."""
22
+
23
+ custom_app_url: str | None = f"http://{SETTINGS_HOST}:{SETTINGS_PORT}"
24
+ request_media_backend: str | None = "default"
25
+
26
+ def __init__(self, running_on_wireless: bool = False) -> None:
27
+ super().__init__(running_on_wireless)
28
+ register_device_connect_settings_routes(self.settings_app)
29
+
30
+ def run(self, reachy_mini: ReachyMini, stop_event: threading.Event) -> None:
31
+ run_device_connect_app(reachy_mini, stop_event)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ logging.basicConfig(level=logging.INFO)
36
+ app = ReachyMiniDeviceConnectSpace()
37
+ try:
38
+ app.wrapped_run()
39
+ except KeyboardInterrupt:
40
+ app.stop()
index.html CHANGED
@@ -1,19 +1,23 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <title>Reachy Mini — Device Connect (Space)</title>
7
+ <link rel="stylesheet" href="style.css" />
8
+ </head>
9
+ <body>
10
+ <h1>Device Connect driver (Reachy Mini app)</h1>
11
+ <p>
12
+ Install this Space from your Reachy Mini dashboard (<strong>Install from Hugging Face</strong>),
13
+ run it once, then open the in-app configuration page at
14
+ <strong><code>http://&lt;robot-ip&gt;:8842</code></strong> to set portal credentials and networking.
15
+ </p>
16
+ <p>
17
+ Documentation:
18
+ <a href="https://github.com/YOUR_USERNAME/reachy-mini-driver">driver repository README</a>
19
+ — replace this link after you publish!
20
+
21
+ </p>
22
+ </body>
23
  </html>
pyproject.toml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "reachy-mini-device-connect-space"
7
+ version = "0.1.0"
8
+ description = "Hugging Face Space package for the Reachy Mini Device Connect driver"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11,<3.14"
11
+ keywords = ["reachy-mini", "reachy-mini-app", "device-connect"]
12
+ dependencies = [
13
+ "reachy-mini>=1.7.3",
14
+ "reachy-mini-driver[app,media] @ git+https://github.com/ericvh/reachy-mini-driver.git@main",
15
+ ]
16
+
17
+ [project.entry-points.reachy_mini_apps]
18
+ reachy-mini-device-connect-space = "reachy_mini_device_connect_space.main:ReachyMiniDeviceConnectSpace"
19
+
20
+ [tool.setuptools.packages.find]
21
+ where = ["."]
reachy_mini_device_connect_space.egg-info/PKG-INFO ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.4
2
+ Name: reachy-mini-device-connect-space
3
+ Version: 0.1.0
4
+ Summary: Hugging Face Space package for the Reachy Mini Device Connect driver
5
+ Keywords: reachy-mini,reachy-mini-app,device-connect
6
+ Requires-Python: <3.14,>=3.11
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: reachy-mini>=1.7.3
9
+ Requires-Dist: reachy-mini-driver[app,media] @ git+https://github.com/ericvh/reachy-mini-driver.git@main
10
+
11
+ ---
12
+ title: Device Connect Driver
13
+ emoji: 📡
14
+ colorFrom: gray
15
+ colorTo: indigo
16
+ sdk: static
17
+ pinned: false
18
+ short_description: Reachy Mini Device Connect driver with portal settings UI
19
+ tags:
20
+ - reachy_mini
21
+ - reachy_mini_python_app
22
+ ---
23
+
24
+ ## Device Connect Edge Driver
25
+
26
+ Thin [Hugging Face Space](https://huggingface.co/docs/hub/spaces) package wrapping the
27
+ **reachy-mini-driver** package (Driver repository: link your own GitHub `reachy-mini-driver` fork in this README when you publish).
28
+
29
+ ### Generate `pyproject.toml` (required)
30
+
31
+ `pyproject.toml` is **generated** by `sync_driver_dependency.py` so `reachy-mini-driver` is referenced with a URL pip can resolve (bare `file:..` breaks in the assistant’s temp venv).
32
+
33
+ **Local monorepo / `reachy-mini-app-assistant check`:**
34
+
35
+ ```bash
36
+ python hf_space/sync_driver_dependency.py local
37
+ reachy-mini-app-assistant check hf_space
38
+ ```
39
+
40
+ **Reset committed placeholder** (invalid until you set GitHub username):
41
+
42
+ ```bash
43
+ python hf_space/sync_driver_dependency.py template
44
+ ```
45
+
46
+ **Before `reachy-mini-app-assistant publish`** (HF uploads only this folder—use Git or PyPI):
47
+
48
+ ```bash
49
+ python hf_space/sync_driver_dependency.py git --url 'git+https://github.com/<you>/reachy-mini-driver.git@main'
50
+ # or: python hf_space/sync_driver_dependency.py pypi --version 0.1.0
51
+
52
+ reachy-mini-app-assistant publish hf_space
53
+ ```
54
+
55
+ ### Community marketplace
56
+
57
+ Uses the standard Reachy flow: [Make and publish your Reachy Mini App](https://huggingface.co/blog/pollen-robotics/make-and-publish-your-reachy-mini-apps).
58
+
reachy_mini_device_connect_space.egg-info/SOURCES.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ README.md
2
+ pyproject.toml
3
+ reachy_mini_device_connect_space/__init__.py
4
+ reachy_mini_device_connect_space/main.py
5
+ reachy_mini_device_connect_space.egg-info/PKG-INFO
6
+ reachy_mini_device_connect_space.egg-info/SOURCES.txt
7
+ reachy_mini_device_connect_space.egg-info/dependency_links.txt
8
+ reachy_mini_device_connect_space.egg-info/entry_points.txt
9
+ reachy_mini_device_connect_space.egg-info/requires.txt
10
+ reachy_mini_device_connect_space.egg-info/top_level.txt
reachy_mini_device_connect_space.egg-info/dependency_links.txt ADDED
@@ -0,0 +1 @@
 
 
1
+
reachy_mini_device_connect_space.egg-info/entry_points.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ [reachy_mini_apps]
2
+ reachy-mini-device-connect-space = reachy_mini_device_connect_space.main:ReachyMiniDeviceConnectSpace
reachy_mini_device_connect_space.egg-info/requires.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ reachy-mini>=1.7.3
2
+ reachy-mini-driver[app,media] @ git+https://github.com/ericvh/reachy-mini-driver.git@main
reachy_mini_device_connect_space.egg-info/top_level.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ build
2
+ reachy_mini_device_connect_space
reachy_mini_device_connect_space/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """Hugging Face Spaces thin package for ``reachy_mini_driver``."""
reachy_mini_device_connect_space/main.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Space entry: assistant check requires ``class ...(ReachyMiniApp)``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import logging
6
+ import threading
7
+
8
+ from reachy_mini import ReachyMini, ReachyMiniApp
9
+
10
+ from reachy_mini_driver.reachy_app import (
11
+ SETTINGS_HOST,
12
+ SETTINGS_PORT,
13
+ register_device_connect_settings_routes,
14
+ run_device_connect_app,
15
+ )
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+
20
+ class ReachyMiniDeviceConnectSpace(ReachyMiniApp):
21
+ """HF Space shell listing; implementation lives in ``reachy_mini_driver.reachy_app``."""
22
+
23
+ custom_app_url: str | None = f"http://{SETTINGS_HOST}:{SETTINGS_PORT}"
24
+ request_media_backend: str | None = "default"
25
+
26
+ def __init__(self, running_on_wireless: bool = False) -> None:
27
+ super().__init__(running_on_wireless)
28
+ register_device_connect_settings_routes(self.settings_app)
29
+
30
+ def run(self, reachy_mini: ReachyMini, stop_event: threading.Event) -> None:
31
+ run_device_connect_app(reachy_mini, stop_event)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ logging.basicConfig(level=logging.INFO)
36
+ app = ReachyMiniDeviceConnectSpace()
37
+ try:
38
+ app.wrapped_run()
39
+ except KeyboardInterrupt:
40
+ app.stop()
style.css CHANGED
@@ -1,28 +1,25 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
4
  }
5
 
6
  h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
  p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
28
  }
 
1
+ :root {
2
+ font-family: system-ui, sans-serif;
3
+ max-width: 52rem;
4
+ margin: 0 auto;
5
+ padding: 2rem;
6
+ color: #1a1a1a;
7
  }
8
 
9
  h1 {
10
+ font-size: 1.4rem;
 
11
  }
12
 
13
  p {
14
+ line-height: 1.55;
 
 
 
15
  }
16
 
17
+ a {
18
+ color: #0f6ecd;
 
 
 
 
19
  }
20
 
21
+ code {
22
+ background: #f3f4f6;
23
+ padding: 0.1rem 0.35rem;
24
+ border-radius: 4px;
25
  }
sync_driver_dependency.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Generate ``hf_space/pyproject.toml`` with a pinned ``reachy-mini-driver`` direct URL.
2
+
3
+ ``reachy-mini-app-assistant check`` installs ``hf_space`` into a disposable venv; bare
4
+ ``file:..`` relative URLs often resolve from the wrong working directory.
5
+
6
+ Usage:
7
+
8
+ python hf_space/sync_driver_dependency.py local
9
+ reachy-mini-app-assistant check hf_space
10
+
11
+ Publish to Hugging Face (after pushing this driver repo to GitHub):
12
+
13
+ python hf_space/sync_driver_dependency.py git --url 'git+https://github.com/you/reachy-mini-driver.git@main'
14
+ reachy-mini-app-assistant publish hf_space
15
+
16
+ Or install from PyPI (when published):
17
+
18
+ python hf_space/sync_driver_dependency.py pypi --version 0.2.0
19
+
20
+ Reset tracked placeholder for git (default before you fork):
21
+
22
+ python hf_space/sync_driver_dependency.py template
23
+ """
24
+
25
+ from __future__ import annotations
26
+
27
+ import argparse
28
+ from pathlib import Path
29
+
30
+ PYPROJECT_BODY = """[build-system]
31
+ requires = ["setuptools>=69", "wheel"]
32
+ build-backend = "setuptools.build_meta"
33
+
34
+ [project]
35
+ name = "reachy-mini-device-connect-space"
36
+ version = "0.1.0"
37
+ description = "Hugging Face Space package for the Reachy Mini Device Connect driver"
38
+ readme = "README.md"
39
+ requires-python = ">=3.11,<3.14"
40
+ keywords = ["reachy-mini", "reachy-mini-app", "device-connect"]
41
+ dependencies = [
42
+ "reachy-mini>=1.7.3",
43
+ {DRIVER_DEPENDENCY_LINE}
44
+ ]
45
+
46
+ [project.entry-points.reachy_mini_apps]
47
+ reachy-mini-device-connect-space = "reachy_mini_device_connect_space.main:ReachyMiniDeviceConnectSpace"
48
+
49
+ [tool.setuptools.packages.find]
50
+ where = ["."]
51
+ """
52
+
53
+
54
+ def driver_root() -> Path:
55
+ return Path(__file__).resolve().parents[1]
56
+
57
+
58
+ def main() -> None:
59
+ p = argparse.ArgumentParser(description=__doc__)
60
+ sub = p.add_subparsers(dest="cmd", required=True)
61
+
62
+ sub.add_parser("local", help="Embed file:// dependency on parent monorepo checkout")
63
+
64
+ gg = sub.add_parser("git", help="Embed git direct reference")
65
+ gg.add_argument(
66
+ "--url",
67
+ required=True,
68
+ help="e.g. git+https://github.com/you/reachy-mini-driver.git@main",
69
+ )
70
+
71
+ pg = sub.add_parser("pypi", help="Embed PyPI version")
72
+ pg.add_argument("--version", required=True)
73
+
74
+ tu = sub.add_parser(
75
+ "template",
76
+ help="Embed YOUR_GITHUB_USERNAME placeholder clone URL (offline-friendly default)",
77
+ )
78
+ tu.add_argument(
79
+ "--username",
80
+ default="YOUR_GITHUB_USERNAME",
81
+ help="GitHub username or org owning reachy-mini-driver",
82
+ )
83
+
84
+ args = p.parse_args()
85
+ out = Path(__file__).resolve().parent / "pyproject.toml"
86
+
87
+ if args.cmd == "local":
88
+ uri = driver_root().as_uri()
89
+ dep = f' "reachy-mini-driver[app,media] @ {uri}",'
90
+ elif args.cmd == "git":
91
+ dep = f' "reachy-mini-driver[app,media] @ {args.url}",'
92
+ elif args.cmd == "pypi":
93
+ dep = f' "reachy-mini-driver[app,media]=={args.version}",'
94
+ else:
95
+ dep = (
96
+ f' "reachy-mini-driver[app,media] @ git+https://github.com/'
97
+ f'{args.username}/reachy-mini-driver.git@main",'
98
+ )
99
+
100
+ out.write_text(PYPROJECT_BODY.replace("{DRIVER_DEPENDENCY_LINE}", dep), encoding="utf-8")
101
+ print(f"Wrote {out} ({args.cmd})")
102
+
103
+
104
+ if __name__ == "__main__":
105
+ main()