Skip to content

Commit cdd3afc

Browse files
committed
updating claude instructions
1 parent c352332 commit cdd3afc

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

CLAUDE.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,50 @@ uv pip install -e ".[cli,coverage,dev,docs,static,test]"
2121
uv sync --all-extras
2222
```
2323

24-
**Virtual Environment**: Activate with `source ~/.venvs/atlas/bin/activate` before running tests or Python commands
24+
**Virtual Environment**: Activate with `source ~/.venvs/deep/bin/activate` before running tests or Python commands
2525

2626

2727
### Testing
2828
```bash
2929
# Run tests with coverage
30-
pytest --cov=deepdiff --cov-report term-missing
30+
source ~/.venvs/deep/bin/activate && pytest --cov=deepdiff --cov-report term-missing
3131

3232
# Run tests including slow ones
33-
pytest --cov=deepdiff --runslow
33+
source ~/.venvs/deep/bin/activate && pytest --cov=deepdiff --runslow
3434

3535
# Run single test file
36-
pytest tests/test_diff_text.py
36+
source ~/.venvs/deep/bin/activate && pytest tests/test_diff_text.py
3737

38-
# Run tests across multiple Python versions
39-
nox -s pytest
38+
# Run tests across multiple Python versions. No need to use this unless getting ready for creating a new build
39+
source ~/.venvs/deep/bin/activate && nox -s pytest
4040
```
4141

42-
### Quality Checks
42+
### **Type Checking with Pyright:**
43+
Always use this pattern for type checking:
44+
```bash
45+
source ~/.venvs/deep/bin/activate && pyright {file_path}
46+
```
47+
48+
Examples:
49+
- `source ~/.venvs/deep/bin/activate && pyright deepdiff/diff.py` - Type check specific file
50+
- `source ~/.venvs/deep/bin/activate && pyright deepdiff/` - Type check entire module
51+
- `source ~/.venvs/deep/bin/activate && pyright .` - Type check entire repo
52+
53+
54+
### Common Pitfalls to Avoid
55+
56+
1. **Forgetting Virtual Environment**: ALWAYS activate venv before ANY Python command:
57+
```bash
58+
source ~/.venvs/deep/bin/activate
59+
```
60+
2. **Running pytest without venv**: This will cause import errors. Always use:
61+
```bash
62+
source ~/.venvs/deep/bin/activate && pytest
63+
```
64+
3. **Running module commands without venv**: Commands like `capi run`, `cettings shell`, etc. all require venv to be activated first
65+
66+
67+
### Slow quality checks only to run before creating a build
4368
```bash
4469
# Linting (max line length: 120)
4570
nox -s flake8
@@ -51,6 +76,7 @@ nox -s mypy
5176
nox
5277
```
5378

79+
5480
## Architecture
5581

5682
### Core Structure

0 commit comments

Comments
 (0)