Skip to content

Commit 5c85788

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dyntype-proj
Not compiling. In progress
2 parents 7e12fdd + 7f2873f commit 5c85788

File tree

263 files changed

+32233
-18517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+32233
-18517
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Claude Code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review, reopened]
6+
# Optional: Only run on specific file changes
7+
# paths:
8+
# - "src/**/*.ts"
9+
# - "src/**/*.tsx"
10+
# - "src/**/*.js"
11+
# - "src/**/*.jsx"
12+
13+
jobs:
14+
claude-review:
15+
# Optional: Filter by PR author
16+
# if: |
17+
# github.event.pull_request.user.login == 'external-contributor' ||
18+
# github.event.pull_request.user.login == 'new-developer' ||
19+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20+
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
pull-requests: read
25+
issues: read
26+
id-token: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 1
33+
34+
- name: Run Claude Code Review
35+
id: claude-review
36+
uses: anthropics/claude-code-action@v1
37+
with:
38+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
40+
plugins: 'code-review@claude-code-plugins'
41+
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
42+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
43+
# or https://code.claude.com/docs/en/cli-reference for available options
44+

.github/workflows/claude.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
jobs:
14+
claude:
15+
if: |
16+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
pull-requests: read
24+
issues: read
25+
id-token: write
26+
actions: read # Required for Claude to read CI results on PRs
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 1
32+
33+
- name: Run Claude Code
34+
id: claude
35+
uses: anthropics/claude-code-action@v1
36+
with:
37+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38+
39+
# This is an optional setting that allows Claude to read CI results on PRs
40+
additional_permissions: |
41+
actions: read
42+
43+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44+
# prompt: 'Update the pull request description to include a summary of changes.'
45+
46+
# Optional: Add claude_args to customize behavior and configuration
47+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48+
# or https://code.claude.com/docs/en/cli-reference for available options
49+
# claude_args: '--allowed-tools Bash(gh pr:*)'
50+

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,8 @@ hazel.opam.locked.old
5959

6060
# Code coverage
6161
_coverage/
62-
node_modules/**
62+
node_modules/**
63+
node_modules
64+
65+
# Claude Code
66+
.claude/

INSTRUCTORS.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@ between the two without clearing your local storage (in browser dev tools).
3737

3838
NOTE: This is only relevant to the EECS490 repo (which include the haz3lschool build target).
3939

40-
1. Open the exercise in instructor mode and export a grading version (button in top bar) which generates an OCaml file.
40+
1. Update the `src/haz3lschool/Specs.re` module with `<module_name>.exercise`.
4141

42-
2. Move the file to `src/haz3lschool/specs`.
42+
2. Run `make grade SUBMISSION=<path to submission json>` under project root to generate a grade report.
4343

44-
3. Update the `src/haz3lschool/Specs.re` module with `<module_name>.exercise`.
45-
46-
4. Run `dune exec ./src/haz3lschool/gradescope.exe <path_to_student_json>` under project root to print the grade report.
47-
48-
To change the output format, adjust `Main.gen_grading_report` function in `Gradescope.re` .
44+
TODO: currently batch grading, export to gradescope, and autograder generation are have regressed. Next time 490 is taught, these can be added by consulting with commit b715dba2ce2949b7277a2d4de0451ccbea6a878c.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016-2024
3+
Copyright (c) 2016-2026
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ TEST_DIR="$(shell pwd)/_build/default/test"
22
HTML_DIR="$(shell pwd)/_build/default/src/web/www"
33
SERVER="http://0.0.0.0:8000/"
44

5-
.PHONY: all deps change-deps setup-instructor setup-student dev dev-helper dev-student fmt watch watch-release release release-student echo-html-dir serve serve2 repl test clean
5+
.PHONY: all deps change-deps setup-instructor setup-student dev dev-helper dev-student fmt watch watch-release release release-student grade echo-html-dir serve serve2 repl test clean
66

77
all: dev
88

@@ -48,6 +48,12 @@ release: setup-instructor
4848
release-student: setup-student
4949
dune build @src/fmt --auto-promote src --profile dev # Uses dev profile for performance reasons. It may be worth it to retest since the ocaml upgrade
5050

51+
grade:
52+
ifndef SUBMISSION
53+
$(error Usage: make grade SUBMISSION=<path to submission json>)
54+
endif
55+
python3 src/grading/grade/grade_individual.py $(SUBMISSION) .
56+
5157
echo-html-dir:
5258
@echo $(HTML_DIR)
5359

OUTPUT.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
{
3+
"name": "Oddly Recursive",
4+
"report": {
5+
"summary": "Overall: 0.0/4.0\n\nTest Validation: 0.0/1.0\n\nSource Code:\n\ntest not(false) end;\ntest not(not(true)) end; \n \n\nMutation Testing: 0.0/1.0\n\nImpl Grading: 0.0/2.0\n\nSource Code:\n\nlet odd: Int -> Bool =\n fun n -> if n < 0 then odd(-n) else \n if n == 0 then true else not(odd(n-1)) \nin \n\n",
6+
"overall": [ 0.0, 4.0 ]
7+
}
8+
},
9+
{
10+
"name": "Recursive Fibonacci",
11+
"report": {
12+
"summary": "Overall: 0.0/4.0\n\nTest Validation: 0.0/1.0\n\nSource Code:\n\n \n\nMutation Testing: 0.0/1.0\n\nImpl Grading: 0.0/2.0\n\nSource Code:\n\nlet fib : Int -> Int = \n fun n -> \nin \n\n",
13+
"overall": [ 0.0, 4.0 ]
14+
}
15+
}
16+
]

hazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ set -e
88
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99

1010
# Path to the JS target relative to the script
11-
JS_TARGET="$SCRIPT_DIR/_build/default/src/hazelcli/cli.bc.js"
11+
JS_TARGET="$SCRIPT_DIR/_build/default/src/CLI/cli.bc.js"
1212

1313
# Run Dune in the script's directory
14-
(cd "$SCRIPT_DIR" && dune build ./src/hazelcli/cli.bc.js)
14+
(cd "$SCRIPT_DIR" && dune build ./src/CLI/cli.bc.js)
1515

1616
# Execute the compiled JavaScript with node
1717
node "$JS_TARGET" "$@"

package-lock.json

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"@esbuild-plugins/node-resolve": "^0.2.2",
1414
"hotkeys-js": "^3.8.7",
1515
"ninja-keys": "^1.2.2",
16-
"algebrite": "^1.4.0"
16+
"algebrite": "^1.4.0",
17+
"web-worker": "^1.5.0"
1718
},
1819
"devDependencies": {
1920
"@types/node": "^22.14.0",

0 commit comments

Comments
 (0)