Skip to content

Commit

Permalink
chore: Add Output Schema Validation (#53)
Browse files Browse the repository at this point in the history
# Pull Request

## Description

Add output file (e.g `repository_statistics.json`) schema validation

fixes #49
  • Loading branch information
JackPlowman authored Sep 28, 2024
1 parent 203a868 commit 1e2599e
Show file tree
Hide file tree
Showing 6 changed files with 453 additions and 8 deletions.
5 changes: 4 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ unit-test:
unit-test-debug:
poetry run pytest analyser --cov=analyser --cov-report=xml -vvvv

validate-schema:
poetry run check-jsonschema --schemafile test/schema_validation/repository_statistics_schema.json test/schema_validation/repository_statistics.json

# ------------------------------------------------------------------------------
# Ruff - # Set up red-knot when it's ready
# Ruff - Set up red-knot when it's ready
# ------------------------------------------------------------------------------

ruff-fix:
Expand Down
2 changes: 1 addition & 1 deletion analyser/file_analysis/tests/test_repository_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_analyse_repository(
mock_repository_languages: MagicMock,
) -> None:
# Arrange
path_to_repo = "test"
path_to_repo = "tester"
# Act
response = analyse_repository(path_to_repo)
# Assert
Expand Down
Loading

0 comments on commit 1e2599e

Please sign in to comment.