Skip to content

Commit 9fc2c52

Browse files
tomcodgenjayhack
andauthored
update contributing guide and handle json decoder error (#36)
Co-authored-by: Jay Hack <jayhack@users.noreply.github.com>
1 parent 6b7c45a commit 9fc2c52

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,17 @@ source .venv/bin/activate
3434
uv sync --dev
3535
```
3636

37+
> [!TIP]
38+
> - If sync fails with `missing field 'version'`, you may need to delete lockfile and rerun `rm uv.lock && uv sync --dev`.
39+
> - If sync fails with failed compilation, you may need to install clang and rerun `uv sync --dev`.
40+
3741
### Running Tests
3842

3943
```bash
40-
# Unit tests
44+
# Unit tests (tests atomic functionality)
4145
uv run pytest tests/unit -n auto
4246

43-
# Codemod tests
47+
# Codemod tests (tests larger programs)
4448
uv run pytest tests/codemod/test_codemods.py -n auto
4549
```
4650

src/graph_sitter/testing/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
try:
2828
REPO_ID_TO_URL = json.loads((TEST_DIR / "repos" / "repos.json").read_text())
29-
except FileNotFoundError:
29+
except (FileNotFoundError, json.decoder.JSONDecodeError):
3030
REPO_ID_TO_URL = {}
3131
if TYPE_CHECKING:
3232
from graph_sitter.codemod import Codemod3

0 commit comments

Comments
 (0)