Local runner for GitHub autograder
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Exact is not exact ofc, Update Deps

Ben C 8aaaced4 90cde162

+34 -107
+23 -96
Cargo.lock
··· 47 47 source = "registry+https://github.com/rust-lang/crates.io-index" 48 48 checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" 49 49 dependencies = [ 50 - "windows-sys 0.60.2", 50 + "windows-sys", 51 51 ] 52 52 53 53 [[package]] ··· 58 58 dependencies = [ 59 59 "anstyle", 60 60 "once_cell_polyfill", 61 - "windows-sys 0.60.2", 61 + "windows-sys", 62 62 ] 63 63 64 64 [[package]] ··· 146 146 147 147 [[package]] 148 148 name = "console" 149 - version = "0.15.11" 149 + version = "0.16.0" 150 150 source = "registry+https://github.com/rust-lang/crates.io-index" 151 - checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" 151 + checksum = "2e09ced7ebbccb63b4c65413d821f2e00ce54c5ca4514ddc6b3c892fdbcbc69d" 152 152 dependencies = [ 153 153 "encode_unicode", 154 154 "libc", 155 155 "once_cell", 156 156 "unicode-width", 157 - "windows-sys 0.59.0", 157 + "windows-sys", 158 158 ] 159 159 160 160 [[package]] ··· 187 187 188 188 [[package]] 189 189 name = "indicatif" 190 - version = "0.17.11" 190 + version = "0.18.0" 191 191 source = "registry+https://github.com/rust-lang/crates.io-index" 192 - checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" 192 + checksum = "70a646d946d06bedbbc4cac4c218acf4bbf2d87757a784857025f4d447e4e1cd" 193 193 dependencies = [ 194 194 "console", 195 - "number_prefix", 196 195 "portable-atomic", 197 196 "unicode-width", 197 + "unit-prefix", 198 198 "web-time", 199 199 ] 200 200 ··· 237 237 version = "2.7.5" 238 238 source = "registry+https://github.com/rust-lang/crates.io-index" 239 239 checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 240 - 241 - [[package]] 242 - name = "number_prefix" 243 - version = "0.4.0" 244 - source = "registry+https://github.com/rust-lang/crates.io-index" 245 - checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" 246 240 247 241 [[package]] 248 242 name = "once_cell" ··· 383 377 checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" 384 378 385 379 [[package]] 380 + name = "unit-prefix" 381 + version = "0.5.1" 382 + source = "registry+https://github.com/rust-lang/crates.io-index" 383 + checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" 384 + 385 + [[package]] 386 386 name = "utf8parse" 387 387 version = "0.2.2" 388 388 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 472 472 473 473 [[package]] 474 474 name = "windows-sys" 475 - version = "0.59.0" 476 - source = "registry+https://github.com/rust-lang/crates.io-index" 477 - checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 478 - dependencies = [ 479 - "windows-targets 0.52.6", 480 - ] 481 - 482 - [[package]] 483 - name = "windows-sys" 484 475 version = "0.60.2" 485 476 source = "registry+https://github.com/rust-lang/crates.io-index" 486 477 checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" 487 478 dependencies = [ 488 - "windows-targets 0.53.3", 489 - ] 490 - 491 - [[package]] 492 - name = "windows-targets" 493 - version = "0.52.6" 494 - source = "registry+https://github.com/rust-lang/crates.io-index" 495 - checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 496 - dependencies = [ 497 - "windows_aarch64_gnullvm 0.52.6", 498 - "windows_aarch64_msvc 0.52.6", 499 - "windows_i686_gnu 0.52.6", 500 - "windows_i686_gnullvm 0.52.6", 501 - "windows_i686_msvc 0.52.6", 502 - "windows_x86_64_gnu 0.52.6", 503 - "windows_x86_64_gnullvm 0.52.6", 504 - "windows_x86_64_msvc 0.52.6", 479 + "windows-targets", 505 480 ] 506 481 507 482 [[package]] ··· 511 486 checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" 512 487 dependencies = [ 513 488 "windows-link", 514 - "windows_aarch64_gnullvm 0.53.0", 515 - "windows_aarch64_msvc 0.53.0", 516 - "windows_i686_gnu 0.53.0", 517 - "windows_i686_gnullvm 0.53.0", 518 - "windows_i686_msvc 0.53.0", 519 - "windows_x86_64_gnu 0.53.0", 520 - "windows_x86_64_gnullvm 0.53.0", 521 - "windows_x86_64_msvc 0.53.0", 489 + "windows_aarch64_gnullvm", 490 + "windows_aarch64_msvc", 491 + "windows_i686_gnu", 492 + "windows_i686_gnullvm", 493 + "windows_i686_msvc", 494 + "windows_x86_64_gnu", 495 + "windows_x86_64_gnullvm", 496 + "windows_x86_64_msvc", 522 497 ] 523 498 524 499 [[package]] 525 500 name = "windows_aarch64_gnullvm" 526 - version = "0.52.6" 527 - source = "registry+https://github.com/rust-lang/crates.io-index" 528 - checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 529 - 530 - [[package]] 531 - name = "windows_aarch64_gnullvm" 532 501 version = "0.53.0" 533 502 source = "registry+https://github.com/rust-lang/crates.io-index" 534 503 checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" 535 - 536 - [[package]] 537 - name = "windows_aarch64_msvc" 538 - version = "0.52.6" 539 - source = "registry+https://github.com/rust-lang/crates.io-index" 540 - checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 541 504 542 505 [[package]] 543 506 name = "windows_aarch64_msvc" ··· 547 510 548 511 [[package]] 549 512 name = "windows_i686_gnu" 550 - version = "0.52.6" 551 - source = "registry+https://github.com/rust-lang/crates.io-index" 552 - checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 553 - 554 - [[package]] 555 - name = "windows_i686_gnu" 556 513 version = "0.53.0" 557 514 source = "registry+https://github.com/rust-lang/crates.io-index" 558 515 checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" 559 516 560 517 [[package]] 561 518 name = "windows_i686_gnullvm" 562 - version = "0.52.6" 563 - source = "registry+https://github.com/rust-lang/crates.io-index" 564 - checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 565 - 566 - [[package]] 567 - name = "windows_i686_gnullvm" 568 519 version = "0.53.0" 569 520 source = "registry+https://github.com/rust-lang/crates.io-index" 570 521 checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" 571 522 572 523 [[package]] 573 524 name = "windows_i686_msvc" 574 - version = "0.52.6" 575 - source = "registry+https://github.com/rust-lang/crates.io-index" 576 - checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 577 - 578 - [[package]] 579 - name = "windows_i686_msvc" 580 525 version = "0.53.0" 581 526 source = "registry+https://github.com/rust-lang/crates.io-index" 582 527 checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" 583 528 584 529 [[package]] 585 530 name = "windows_x86_64_gnu" 586 - version = "0.52.6" 587 - source = "registry+https://github.com/rust-lang/crates.io-index" 588 - checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 589 - 590 - [[package]] 591 - name = "windows_x86_64_gnu" 592 531 version = "0.53.0" 593 532 source = "registry+https://github.com/rust-lang/crates.io-index" 594 533 checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" 595 534 596 535 [[package]] 597 536 name = "windows_x86_64_gnullvm" 598 - version = "0.52.6" 599 - source = "registry+https://github.com/rust-lang/crates.io-index" 600 - checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 601 - 602 - [[package]] 603 - name = "windows_x86_64_gnullvm" 604 537 version = "0.53.0" 605 538 source = "registry+https://github.com/rust-lang/crates.io-index" 606 539 checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" 607 - 608 - [[package]] 609 - name = "windows_x86_64_msvc" 610 - version = "0.52.6" 611 - source = "registry+https://github.com/rust-lang/crates.io-index" 612 - checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 613 540 614 541 [[package]] 615 542 name = "windows_x86_64_msvc"
+10 -10
Cargo.toml
··· 1 1 [package] 2 2 name = "gh-grader-preview" 3 3 version = "0.2.0" 4 - edition = "2021" 4 + edition = "2024" 5 5 6 6 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 7 8 8 [dependencies] 9 - anyhow = "1.0.79" 10 - clap = { version = "4.4.18", features = ["derive"] } 11 - clap_complete = "4.5.0" 12 - clap_derive = "4.4.7" 13 - clap_mangen = "0.2.20" 14 - indicatif = "0.17.7" 9 + anyhow = "1.0.99" 10 + clap = { version = "4.5.46", features = ["derive"] } 11 + clap_complete = "4.5.57" 12 + clap_derive = "4.5.45" 13 + clap_mangen = "0.2.29" 14 + indicatif = "0.18.0" 15 15 regex = "1.10.3" 16 - serde = { version = "1.0.196", features = ["derive"] } 17 - serde_json = "1.0.113" 18 - wait-timeout = "0.2.0" 16 + serde = { version = "1.0.219", features = ["derive"] } 17 + serde_json = "1.0.143" 18 + wait-timeout = "0.2.1"
+1 -1
src/grader.rs
··· 58 58 match self.comparison { 59 59 ComparisonType::Included => Ok(output.contains(&self.output)), 60 60 ComparisonType::Excluded => Ok(!output.contains(&self.output)), 61 - ComparisonType::Exact => Ok(output == self.output), 61 + ComparisonType::Exact => Ok(output.trim() == self.output.trim()), 62 62 ComparisonType::Regex => { 63 63 let re = regex::Regex::new(&self.output)?; 64 64 Ok(re.is_match(&output))