Skip to content

Commit 3e99d89

Browse files
committed
Add docs
1 parent 05fac0e commit 3e99d89

File tree

8 files changed

+18
-20
lines changed

8 files changed

+18
-20
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ repos:
2323
- id: end-of-file-fixer
2424
- id: check-yaml
2525
args: [--allow-multiple-documents]
26+
exclude: ^mkdocs\.yml$
2627
- id: check-toml
2728
- id: check-json
2829
- id: check-added-large-files

docs/getting-started/installation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Before installing DSPy Code, make sure you have:
1313

1414
!!! warning "CRITICAL: Create Virtual Environment IN Your Project"
1515
**For security and isolation, ALWAYS create your virtual environment INSIDE your project directory!**
16-
16+
1717
This ensures:
18-
18+
1919
- 🔒 All file scanning stays within your project
2020
- 📦 Complete project isolation
2121
- 🚀 Easy sharing and deployment
@@ -43,11 +43,11 @@ source .venv/bin/activate # On macOS/Linux
4343

4444
!!! success "Why .venv in the Project?"
4545
When you create the virtual environment inside your project:
46-
46+
4747
- All packages install to `my-dspy-project/.venv/`
4848
- All dspy-code data goes to `my-dspy-project/.dspy_code/`
4949
- Everything stays in one place!
50-
50+
5151
**Result**: One directory = one complete project
5252

5353
### Step 3: Install DSPy Code

docs/guide/project-management.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ my-dspy-project/
5353

5454
!!! success "Everything in One Place"
5555
Notice how **everything** is inside `my-dspy-project/`:
56-
56+
5757
- Virtual environment (`.venv/`)
5858
- All packages (in `.venv/lib/`)
5959
- All caches (`.dspy_cache/`, `.dspy_code/`)
6060
- All your code (`generated/`, `modules/`, etc.)
61-
61+
6262
**Result**: Delete `my-dspy-project/` and everything is gone!
6363

6464
**Interactive prompts:**

docs/reference/security.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,4 +399,3 @@ DSPy Code is designed to be **secure by default**:
399399
---
400400

401401
**Questions about security?** [Open an issue](https://github.com/SuperagenticAI/dspy-code/issues) or check our [FAQ](faq.md).
402-

dspy_code/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
All commands are now SLASH COMMANDS in interactive mode!
88
"""
99

10-
import os
1110
import sys
1211
from pathlib import Path
1312

dspy_code/rag/indexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def _is_safe_to_scan(self, path: Path) -> bool:
579579
if len(parts) <= 1:
580580
logger.warning(f"🚨 BLOCKED: Path too close to home directory: {path}")
581581
logger.warning(
582-
f" Please run dspy-code from a project directory, not from ~/ or ~/subdir"
582+
" Please run dspy-code from a project directory, not from ~/ or ~/subdir"
583583
)
584584
return False
585585

mkdocs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ theme:
2626
toggle:
2727
icon: material/brightness-4
2828
name: Switch to light mode
29-
29+
3030
font:
3131
text: Roboto
3232
code: Roboto Mono
33-
33+
3434
features:
3535
- navigation.instant
3636
- navigation.tracking
@@ -42,7 +42,7 @@ theme:
4242
- search.highlight
4343
- content.code.copy
4444
- content.code.annotate
45-
45+
4646
icon:
4747
repo: fontawesome/brands/github
4848
admonition:
@@ -95,9 +95,9 @@ extra:
9595
link: https://github.com/superagentic-ai/dspy-code
9696
- icon: fontawesome/brands/python
9797
link: https://pypi.org/project/dspy-code/
98-
98+
9999
generator: false
100-
100+
101101
version:
102102
provider: mike
103103

@@ -110,7 +110,7 @@ nav:
110110
- ⚡ Quick Start: getting-started/quick-start.md
111111
- 🎯 First Program: getting-started/first-program.md
112112
- 💡 Understanding DSPy Code: getting-started/understanding.md
113-
113+
114114
- 📚 User Guide:
115115
- 💬 Interactive Mode: guide/interactive-mode.md
116116
- 🗣️ Natural Language Commands: guide/natural-language-commands.md
@@ -126,27 +126,27 @@ nav:
126126
- 🎯 Optimization: guide/optimization.md
127127
- 📁 Project Management: guide/project-management.md
128128
- 📊 Creating Gold Data: guide/creating-gold-data.md
129-
129+
130130
- 🎓 Tutorials:
131131
- 😊 Build a Sentiment Analyzer: tutorials/sentiment-analyzer.md
132132
- 🔍 Create a RAG System: tutorials/rag-system.md
133133
- ❓ Question Answering: tutorials/question-answering.md
134134
- 🧬 Optimize with GEPA: tutorials/gepa-optimization.md
135-
135+
136136
- 📖 Reference:
137137
- 📝 Command Reference: reference/commands.md
138138
- ⚙️ Configuration: reference/configuration.md
139139
- 🔒 Security & Best Practices: reference/security.md
140140
- 📋 Templates: reference/templates.md
141141
- 🔧 Troubleshooting: reference/troubleshooting.md
142142
- ❓ FAQ: reference/faq.md
143-
143+
144144
- 🚀 Advanced:
145145
- 🔗 MCP Integration: advanced/mcp-integration.md
146146
- 🧩 Custom Modules: advanced/custom-modules.md
147147
- 🚢 Deployment: advanced/deployment.md
148148
- 🔄 CI/CD Integration: advanced/cicd.md
149-
149+
150150
- ℹ️ About:
151151
- 📖 About DSPy Code: about/index.md
152152
- 💡 Why DSPy Code?: about/why-dspy-code.md

tests/test_security.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Tests for file system safety measures and security protections.
55
"""
66

7-
import os
87
import tempfile
98
from pathlib import Path
109
from unittest.mock import patch

0 commit comments

Comments
 (0)