Skip to content

Commit 69bd607

Browse files
feat: add clean target to Makefile
- Add comprehensive clean target that removes build artifacts, cache files, and virtual environment - Include clean in .PHONY declaration for reliable execution - Clean target removes: dist/, build/, *.egg-info/, .coverage, .pytest_cache/, __pycache__ directories, *.pyc/*.pyo files, and .venv directory - Provides user feedback during cleanup process
1 parent 0503713 commit 69bd607

File tree

5 files changed

+36
-3
lines changed

5 files changed

+36
-3
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
- uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.12'
21+
- name: Cache pip packages
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-
2128
- name: Install dependencies
2229
run: |
2330
python -m pip install --upgrade pip
@@ -35,6 +42,13 @@ jobs:
3542
- uses: actions/setup-python@v5
3643
with:
3744
python-version: '3.12'
45+
- name: Cache pip packages
46+
uses: actions/cache@v4
47+
with:
48+
path: ~/.cache/pip
49+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
50+
restore-keys: |
51+
${{ runner.os }}-pip-
3852
- name: Install dependencies
3953
run: |
4054
python -m pip install --upgrade pip
@@ -53,10 +67,18 @@ jobs:
5367
- uses: actions/setup-python@v5
5468
with:
5569
python-version: '3.12'
70+
- name: Cache pip packages
71+
uses: actions/cache@v4
72+
with:
73+
path: ~/.cache/pip
74+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements-dev.txt') }}
75+
restore-keys: |
76+
${{ runner.os }}-pip-
5677
- name: Install dependencies
5778
run: |
5879
python -m pip install --upgrade pip
5980
pip install -r requirements.txt
81+
pip install safety pip-audit
6082
- name: Security audit
6183
run: |
6284
safety scan --json > safety-results.json

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
VENV_PYTHON := .venv/bin/python
33
VENV_PIP := .venv/bin/pip
44

5-
.PHONY: all venv setup run format lint smoke precommit test
5+
.PHONY: all venv setup run format lint smoke precommit test clean
6+
7+
clean:
8+
@echo "Cleaning generated artifacts and virtual environment..."
9+
@rm -rf dist/ build/ *.egg-info/ .coverage .pytest_cache/
10+
@find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
11+
@find . -name "*.pyc" -delete 2>/dev/null || true
12+
@find . -name "*.pyo" -delete 2>/dev/null || true
13+
@rm -rf .venv
14+
@echo "Clean complete."
615

716
all: setup
817

clients/typescript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ await client.v0Embed({
204204

205205
**Returns:** `Promise<EmbedResponse>` with hash-based embeddings
206206

207-
### v1 Endpoints (EPI key Required)
207+
### v1 Endpoints (API key Required)
208208

209209
#### v1Store
210210

docs/development.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ ruff check --select I --fix src clients/python tests
283283

284284
### Adding New Endpoints
285285

286+
<!-- markdownlint-disable MD029 -->
286287
1. **Define Pydantic models** in `main.py`:
287288

288289
```python
@@ -314,6 +315,7 @@ def v1_new_endpoint(
314315
3. **Update OpenAPI spec** in `openapi/openapi-v1.yaml`
315316

316317
4. **Add tests** in `tests/`
318+
<!-- markdownlint-enable MD029 -->
317319

318320
### Following API Design Rules
319321

src/contextforge_memory/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class EmbedResponse(BaseModel):
261261
"yes",
262262
}
263263
# Check if we're in testing mode
264-
TESTING_MODE = (
264+
TESTING_MODE: bool = (
265265
"pytest" in sys.modules or
266266
os.environ.get("TESTING", "").lower() in {"1", "true", "yes"}
267267
)

0 commit comments

Comments
 (0)