Skip to content

Commit 468a915

Browse files
committed
cleaning
1 parent 10edd52 commit 468a915

9 files changed

Lines changed: 50 additions & 44 deletions

File tree

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
.PHONY: setup install test clean
1+
.PHONY: setup install test clean run_macos
22

33
# Default shell
44
SHELL := /bin/bash
55

66
# Venv config
77
VENV_DIR = .venv
8-
PYTHON = $(VENV_DIR)/bin/python3
8+
PYTHON = $(VENV_DIR)/bin/python3.12
99
PIP = $(VENV_DIR)/bin/pip
1010

1111
# Targets
1212
setup: clean
13-
python3 -m venv $(VENV_DIR)
13+
python3.12 -m venv $(VENV_DIR)
1414

1515
install: setup
16-
$(PYTHON) -m pip install --upgrade pip
16+
$(PYTHON) -m pip install "pip<25.0"
1717
$(PIP) install -r requirements.txt
18+
$(PIP) install --no-deps "grc_odycy_joint_sm @ https://huggingface.co/chcaa/grc_odycy_joint_sm/resolve/main/grc_odycy_joint_sm-any-py3-none-any.whl"
1819
@echo "Running tests..."
1920
@$(MAKE) test
2021

2122
test:
2223
PYTHONPATH=. $(VENV_DIR)/bin/pytest
2324

25+
run_macos:
26+
cd macos && swift package clean && swift build && swift run
27+
2428
clean:
2529
rm -rf $(VENV_DIR)

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,19 @@ It provides a Search Bar to quickly lookup verses without opening a terminal, an
441441

442442
## Build & Run
443443

444+
You can run the app in several ways.
445+
446+
### Using Make
447+
448+
The simplest way to build and run the app is using the provided `Makefile` task:
449+
450+
```bash
451+
make run_macos
452+
```
453+
This command changes to the `macos` directory, builds the Swift project, and runs the application.
454+
455+
### Manually
456+
444457
To run the app in debug mode (which also starts the local API server):
445458

446459
```bash

bin/biblecli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ VENV_DIR="$BIBLE_DIR/.venv"
1010
# Check if the virtual environment exists
1111
if [ ! -d "$VENV_DIR" ]; then
1212
echo "Creating virtual environment..."
13-
python3 -m venv "$VENV_DIR"
13+
python3.12 -m venv "$VENV_DIR"
1414

1515
echo "Activating virtual environment..."
1616
source "$VENV_DIR/bin/activate"
@@ -25,4 +25,4 @@ fi
2525
# Run the main script with all passed arguments
2626
export PYTHONPATH="$BIBLE_DIR"
2727
cd "$BIBLE_DIR" || exit 1
28-
"$VENV_DIR/bin/python3" -m src.cli "$@"
28+
"$VENV_DIR/bin/python3.12" -m src.cli "$@"

requirements.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
text-fabric[github]~=13.1
2-
pytest~=8.4
3-
typer~=0.23.1
4-
pydantic~=2.12
5-
fastapi~=0.128.8
6-
uvicorn~=0.39.0
7-
requests~=2.32
8-
numpy~=2.0
9-
zipp~=3.20
10-
spacy~=3.7.2
11-
sentence-transformers~=3.0
12-
https://huggingface.co/chq-matteo/grc_odycy_joint_sm/resolve/main/grc_odycy_joint_sm-any-py3-none-any.whl
2+
pytest~=9.0
3+
typer~=0.24.1
4+
pydantic~=2.12.5
5+
fastapi~=0.135.1
6+
httpx~=0.28.1
7+
uvicorn~=0.41.0
8+
requests~=2.32.5
9+
numpy~=2.4
10+
zipp~=3.23.0
11+
spacy~=3.8.0
12+
sentence-transformers~=5.3.0

src/application/workers/find_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Called by the main CLI via subprocess.
77
88
Usage:
9-
.venv-spacy/bin/python3.13 src/application/workers/find_worker.py <word> [--limit N]
9+
.venv-spacy/bin/python3.12 src/application/workers/find_worker.py <word> [--limit N]
1010
1111
Output: JSON array of results to stdout.
1212
"""

src/cli.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ def main(
9595
- Verse range: "Mt 5:1-10"
9696
- Whole chapter: "Mk 4"
9797
- Book aliases: "Gn" = "Gen" = "Genesis", "Mt" = "Matt", etc.: both French and English abbreviations supported.
98+
99+
MAKE TASKS
100+
The project includes a Makefile for convenience:
101+
102+
make install
103+
Set up the environment and install dependencies.
104+
105+
make test
106+
Run the test suite.
107+
108+
make run_macos
109+
Build and run the native macOS application.
98110
"""
99111

100112
if ctx.invoked_subcommand is not None:

test_find.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/test_find_integration.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ def run_find(word, limit=5):
2121
"""Run the find worker and return parsed JSON output."""
2222
worker_path = os.path.join(project_root, "src", "application", "workers", "find_worker.py")
2323
venv_python = os.path.join(project_root, ".venv-spacy", "bin", "python3")
24+
if not os.path.exists(venv_python):
25+
import sys
26+
venv_python = sys.executable
2427

2528
result = subprocess.run(
2629
[venv_python, worker_path, word, "--limit", str(limit)],

unfound_words.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)