Skip to content

Commit

Permalink
Merge branch 'main' into 451-improve-readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenfrank committed Nov 5, 2024
2 parents 7423999 + 57472de commit e9cc336
Show file tree
Hide file tree
Showing 70 changed files with 197 additions and 140 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"ghcr.io/devcontainers-contrib/features/maven-sdkman:2": {},
"ghcr.io/devcontainers/features/node:1": {}
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
java-version: '21'

- name: Run Integration Tests
run: mvn failsafe:integration-test
run: mvn failsafe:integration-test
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@
</plugins>
</build>

</project>
</project>
10 changes: 5 additions & 5 deletions src/main/java/edu/byu/cs/autograder/Grader.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import edu.byu.cs.autograder.git.CommitVerificationConfig;
import edu.byu.cs.autograder.git.CommitVerificationResult;
import edu.byu.cs.autograder.git.GitHelper;
import edu.byu.cs.autograder.git.GitHubAssignmentGrader;
import edu.byu.cs.autograder.quality.QualityGrader;
import edu.byu.cs.autograder.test.GitHubAssignmentGrader;
import edu.byu.cs.autograder.test.QualityGrader;
import edu.byu.cs.autograder.score.Scorer;
import edu.byu.cs.autograder.test.PassoffTestGrader;
import edu.byu.cs.autograder.test.PreviousPhasePassoffTestGrader;
Expand All @@ -21,16 +21,13 @@
import edu.byu.cs.util.FileUtils;
import edu.byu.cs.util.PhaseUtils;
import edu.byu.cs.util.RepoUrlValidator;
import org.eclipse.jgit.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;
import java.time.Instant;
import java.util.EnumMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* A template for fetching, compiling, and running student code
Expand Down Expand Up @@ -123,11 +120,14 @@ private Rubric evaluateProject(RubricConfig rubricConfig, CommitVerificationResu
RubricConfig.RubricConfigItem configItem = rubricConfig.items().get(type);
if(configItem != null) {
Rubric.Results results = switch (type) {
// TODO: How can we fully remove this switch statement and rely on passed-in definitions instead
// This code is violating the open-closed principle.
case PASSOFF_TESTS -> new PassoffTestGrader(gradingContext).runTests();
case UNIT_TESTS -> new UnitTestGrader(gradingContext).runTests();
case QUALITY -> new QualityGrader(gradingContext).runQualityChecks();
case GITHUB_REPO -> new GitHubAssignmentGrader().grade(commitVerificationResult);
case GIT_COMMITS, GRADING_ISSUE -> null;
// TODO: (end) This is the end of what we want to remove.
};
if (results != null) {
rubricItems.put(type, new Rubric.RubricItem(configItem.category(), results, configItem.criteria()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,4 @@ private record QualityRubricCategory(String name, float value, Set<String> repor

private record QualityRubric(Set<QualityRubricCategory> categories) {}

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package edu.byu.cs.autograder.git;
package edu.byu.cs.autograder.test;

import edu.byu.cs.autograder.git.CommitVerificationResult;
import edu.byu.cs.dataAccess.DaoService;
import edu.byu.cs.dataAccess.DataAccessException;
import edu.byu.cs.model.Phase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package edu.byu.cs.autograder.quality;
package edu.byu.cs.autograder.test;

import edu.byu.cs.autograder.GradingContext;
import edu.byu.cs.autograder.GradingException;
import edu.byu.cs.autograder.quality.QualityAnalyzer;
import edu.byu.cs.dataAccess.DaoService;
import edu.byu.cs.dataAccess.DataAccessException;
import edu.byu.cs.model.Rubric;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/byu/cs/autograder/test/TestAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ private TestAnalysis compileAnalysis(TestNode root, TestNode extraCredit, String
TestNode.countTests(extraCredit);
return new TestAnalysis(root, extraCredit, error);
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/edu/byu/cs/dataAccess/ConfigREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ The autograder has a bunch of settings that change from time to time, but need t
The `Configuration` table in the database is a set of key value pairs. This gives us a lot of flexibility, but also the need to define how it will be used. That is what this file is for.

### Live Phases
The `STUDENT_SUBMISSION_ENABLED` Configuration enum has a value of an array of phases. Each phase in the array is enabled, the rest are not.
The `STUDENT_SUBMISSION_ENABLED` Configuration enum has a value of an array of phases. Each phase in the array is enabled, the rest are not.
2 changes: 1 addition & 1 deletion src/main/java/edu/byu/cs/model/Rubric.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ public enum RubricType {
GITHUB_REPO,
GRADING_ISSUE
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/edu/byu/cs/model/TestNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ public TestNode clone() {
throw new RuntimeException(e);
}
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/edu/byu/cs/util/JwtUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ private static SecretKey generateSecretKey() {
keyGenerator.init(512, new SecureRandom());
return keyGenerator.generateKey();
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/frontend/.env.dev
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VITE_APP_BACKEND_URL=http://localhost:8080
VITE_APP_BACKEND_URL=http://localhost:8080
2 changes: 1 addition & 1 deletion src/main/resources/frontend/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
}
2 changes: 1 addition & 1 deletion src/main/resources/frontend/src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ select {

.failure {
color: red;
}
}
116 changes: 48 additions & 68 deletions src/main/resources/frontend/src/components/AboutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PopUp from '@/components/PopUp.vue'
import { onMounted, onUnmounted, ref } from 'vue'
import sound from "@/assets/saints.mp3"
import InfoPanel from '@/components/InfoPanel.vue'
import AboutPagePerson from '@/components/AboutPagePerson.vue'
const audio = new Audio(sound)
Expand Down Expand Up @@ -63,44 +64,56 @@ onUnmounted(() => {
>
<div id="box">
<h1>About the CS 240 Autograder</h1>
<div id="leads">
<div class="person">
<p class="name">Paul Hathaway <a href="https://github.com/pawlh" target="_blank"><i class="fa-solid fa-otter"/></a></p>
<p class="title">Father of the Autograder</p>
<p class="tenure">Sept 2022-Apr 2024</p>
<p class="contributions">Wrote the foundations of the Autograder and its core grading functionality</p>
</div>
<div class="person">
<p class="name">Michael Davenport <a href="https://github.com/19mdavenport" target="_blank"><i class="fa-solid fa-hat-wizard"/></a></p>
<p class="title">Guardian of the Autograder</p>
<p class="tenure">Jan 2023-Apr 2025</p>
<p class="contributions">Developed most of the integrations with Canvas, student database handling, the code quality checker, lots of behind the scenes refactoring, and basically had a hand in every backend system in the program</p>
</div>
</div>
<AboutPagePerson
name="Paul Hathaway"
:lead=true
title="Father of the Autograder"
url="https://github.com/pawlh"
tenure="Sept 2022-Apr 2024"
contributions="Wrote the foundations of the Autograder and its core grading functionality"
fa-icon="fa-solid fa-otter"/>
<AboutPagePerson
name="Michael Davenport"
:lead=true
title="Guardian of the Autograder"
url="https://github.com/19mdavenport"
tenure="Jan 2023-Apr 2025"
contributions="Developed most of the integrations with Canvas, student database handling, the code quality checker, lots of behind the scenes refactoring, and basically had a hand in every backend system in the program"
fa-icon="fa-solid fa-hat-wizard"/>

<br/>

<div id="team">
<div class="person">
<p class="name">Dallin Webecke <a href="https://webecke.dev" target="_blank"><i class="fa-solid fa-tree"/></a></p>
<p class="tenure">Jan 2024-Apr 2025</p>
<p class="contributions">Created several admin tools, cleaned up the Student UI and added Font Awesome</p>
</div>
<div class="person">
<p class="name">James Finlinson <a href="https://github.com/frozenfrank" target="_blank"><i class="fa-solid fa-jedi"/></a></p>
<p class="tenure">Jan 2024-Dec 2025</p>
<p class="contributions">Developed class-requirement enforcement systems, like late-days and git-commits</p>
</div>
<div class="person">
<p class="name">Noah Pratt <a href="https://noahpratt.com" target="_blank"><i class="fa-solid fa-ship"/></a></p>
<p class="tenure">Sept 2022-Jun 2024</p>
<p class="contributions">Developed several important admin analytical tools</p>
</div>
<div class="person">
<p class="name">Isaih Barron <a href="https://github.com/Fiwafoofa" target="_blank"><i class="fa-solid fa-face-grin-squint-tears"/></a></p>
<p class="tenure">Jan 2024-Aug 2024</p>
<p class="contributions">Wrote some systems that did pre-compiling verification of student code</p>
</div>
<AboutPagePerson
name="Dallin Webecke"
url="https://github.com/webecke"
tenure="Jan 2024-Apr 2025"
contributions="Created several admin tools, cleaned up the Student UI and added Font Awesome"
fa-icon="fa-solid fa-tree"/>
<AboutPagePerson
name="James Finlinson"
url="https://github.com/frozenfrank"
tenure="Jan 2024-Dec 2025"
contributions="Developed class-requirement enforcement systems, like late-days and git-commits"
fa-icon="fa-solid fa-jedi"/>
<AboutPagePerson
name="Than Gerlek"
url="https://github.com/ThanGerlek"
tenure="Jan 2024-Apr 2026"
contributions="He's new to the team, but he's doing a lot"
fa-icon="fa-solid fa-not-equal"/>
<AboutPagePerson
name="Noah Pratt"
url="https://github.com/prattnj"
tenure="Sept 2022-Jun 2024"
contributions="Developed several important admin analytical tools"
fa-icon="fa-solid fa-ship"/>
<AboutPagePerson
name="Isaih Barron"
url="https://github.com/Fiwafoofa"
tenure="Jan 2024-Aug 2024"
contributions="Wrote some systems that did pre-compiling verification of student code"
fa-icon="fa-solid fa-face-grin-squint-tears"/>
</div>

<InfoPanel id="about">
Expand All @@ -124,44 +137,11 @@ onUnmounted(() => {
grid-template-columns: 1fr 1fr;
}
.name {
font-weight: 1000;
margin-top: 10px;
}
#leads .name {
font-size: 22px;
}
#team .name {
font-size: 18px;
}
#leads .title {
margin-top: 0;
padding-top: 0;
font-style: italic;
font-size: 14px;
}
.tenure {
font-size: 12px;
font-style: italic;
}
.contributions {
font-size: 14px;
}
#box {
max-width: 60vw;
}
PopUp {
min-height: 100vh !important;
}
i {
color: #0047BA;
}
</style>
</style>
76 changes: 76 additions & 0 deletions src/main/resources/frontend/src/components/AboutPagePerson.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<script setup lang="ts">
defineProps({
lead: {
type: Boolean,
required: false
},
name: {
type: String,
required: true
},
title: {
type: String,
required: false
},
url: {
type: String,
required: true
},
faIcon: {
type: String,
required: true
},
tenure: {
type: String,
required: true
},
contributions: {
type: String,
required: true
}
})
</script>

<template>
<div :id="lead ? 'lead' : ''">
<p class="name">{{ name }} <a :href=url target="_blank"><i :class="faIcon"/></a></p>
<p class="title" v-if="title">{{ title }}</p>
<p class="tenure">{{ tenure }}</p>
<p class="contributions">{{ contributions }}</p>
</div>
</template>

<style scoped>
.name {
font-weight: 1000;
margin-top: 10px;
}
#lead .name {
font-size: 22px;
}
#team .name {
font-size: 18px;
}
.title {
margin-top: 0;
padding-top: 0;
font-style: italic;
font-size: 14px;
}
.tenure {
font-size: 12px;
font-style: italic;
}
.contributions {
font-size: 14px;
}
i {
color: #0047BA;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ const handleClick = () => {
padding: 7px;
margin-top: 15px;
}
</style>
</style>
2 changes: 1 addition & 1 deletion src/main/resources/frontend/src/components/InfoPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
display: flex;
flex-direction: column;
}
</style>
</style>
2 changes: 1 addition & 1 deletion src/main/resources/frontend/src/components/MoreInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ defineProps<{
#slotInfo p a {
padding: 3px;
}
</style>
</style>
2 changes: 1 addition & 1 deletion src/main/resources/frontend/src/components/Panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
border-radius: 5px;
background-color: #f2f2f2;
}
</style>
</style>
2 changes: 1 addition & 1 deletion src/main/resources/frontend/src/components/RepoEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ onMounted( () => {
button {
margin: 5px;
}
</style>
</style>
Loading

0 comments on commit e9cc336

Please sign in to comment.