Skip to content

update contributing guide and handle json decoder error #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ source .venv/bin/activate
uv sync --dev
```

> [!TIP]
> - If sync fails with `missing field 'version'`, you may need to delete lockfile and rerun `rm uv.lock && uv sync --dev`.
> - If sync fails with failed compilation, you may need to install clang and rerun `uv sync --dev`.

### Running Tests

```bash
# Unit tests
# Unit tests (tests atomic functionality)
uv run pytest tests/unit -n auto

# Codemod tests
# Codemod tests (tests larger programs)
uv run pytest tests/codemod/test_codemods.py -n auto
```

Expand Down
2 changes: 1 addition & 1 deletion src/graph_sitter/testing/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

try:
REPO_ID_TO_URL = json.loads((TEST_DIR / "repos" / "repos.json").read_text())
except FileNotFoundError:
except (FileNotFoundError, json.decoder.JSONDecodeError):
REPO_ID_TO_URL = {}
if TYPE_CHECKING:
from graph_sitter.codemod import Codemod3
Expand Down
Loading