Skip to content

Commit 1699949

Browse files
committed
Release 0.1.1
1 parent 579557e commit 1699949

6 files changed

Lines changed: 39 additions & 9 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The command and HTTP layers are written against an internal backend registry so
2525

2626
## Acceleration support
2727

28-
Current hardware acceleration support is intentionally limited in `v0.1.0`:
28+
Current hardware acceleration support is intentionally limited in `v0.1.1`:
2929

3030
- `aarch64-apple-darwin`:
3131
- uses Apple Metal Performance Shaders (`mps`) automatically when available
@@ -86,7 +86,7 @@ Example response:
8686
"embeddings": [[0.123, -0.456, 0.789]],
8787
"runtime": {
8888
"name": "bitloops-embeddings",
89-
"version": "0.1.0"
89+
"version": "0.1.1"
9090
}
9191
}
9292
```
@@ -160,7 +160,7 @@ Response shape:
160160
"embeddings": [[0.123, -0.456, 0.789]],
161161
"runtime": {
162162
"name": "bitloops-embeddings",
163-
"version": "0.1.0"
163+
"version": "0.1.1"
164164
}
165165
}
166166
```
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
from bitloops_embeddings.cli import main
1+
from __future__ import annotations
22

3+
import multiprocessing
4+
5+
6+
def run() -> None:
7+
# PyInstaller requires freeze_support() in the frozen entrypoint so
8+
# multiprocessing helper processes do not recurse into the CLI parser.
9+
multiprocessing.freeze_support()
10+
from bitloops_embeddings.cli import main
311

4-
if __name__ == "__main__":
512
main()
13+
14+
if __name__ == "__main__":
15+
run()

src/bitloops_embeddings/version.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
__version__ = "0.1.0"
2-
1+
__version__ = "0.1.1"

tests/integration/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_embed_returns_json_to_stdout_and_output_file(
5151
assert stdout_payload["model_id"] == "bge-m3"
5252
assert stdout_payload["dimensions"] == 3
5353
assert stdout_payload["embeddings"][0]
54-
assert stdout_payload["runtime"]["version"] == "0.1.0"
54+
assert stdout_payload["runtime"]["version"] == "0.1.1"
5555
assert file_payload == stdout_payload
5656

5757

tests/unit/test_main_entrypoint.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from __future__ import annotations
2+
3+
import bitloops_embeddings.__main__ as main_module
4+
import bitloops_embeddings.cli as cli_module
5+
6+
7+
def test_run_calls_freeze_support_before_cli(monkeypatch) -> None:
8+
calls: list[str] = []
9+
10+
def fake_freeze_support() -> None:
11+
calls.append("freeze_support")
12+
13+
def fake_main() -> None:
14+
calls.append("main")
15+
16+
monkeypatch.setattr(main_module.multiprocessing, "freeze_support", fake_freeze_support)
17+
monkeypatch.setattr(cli_module, "main", fake_main)
18+
19+
main_module.run()
20+
21+
assert calls == ["freeze_support", "main"]

tests/unit/test_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_embedding_response_serialises_runtime_metadata() -> None:
1010
model_id="bge-m3",
1111
dimensions=3,
1212
embeddings=[[0.1, -0.2, 0.3]],
13-
runtime=RuntimeInfo(name="bitloops-embeddings", version="0.1.0"),
13+
runtime=RuntimeInfo(name="bitloops-embeddings", version="0.1.1"),
1414
)
1515

1616
payload = json.loads(response.model_dump_json())

0 commit comments

Comments
 (0)