ricecomp215-staff / ricechecks Goto Github PK
View Code? Open in Web Editor NEWGradle-based Java AutoGrader
License: Apache License 2.0
Gradle-based Java AutoGrader
License: Apache License 2.0
We seem to have the basics working now. Still need to sort out how to do "standalone mode".
https://github.com/Kotlin/kotlinx.serialization
Currently this:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4/userguide/command_line_interface.html#sec:command_line_warnings
The problem seems to be the way we're calling project.javaexec:
gradle.buildFinished { ignoredResult ->
project.javaexec {
classpath = configurations.ricechecks
main = "edu.rice.autograder.AutoGraderKt"
args = [ "--project", gradeProject,
"--config", gradeConfig,
"grade" ]
}
}
Possible solution: finalizedBy
:
https://discuss.gradle.org/t/how-to-call-task-execution-from-outside-task/25971
Here's a script that doesn't seem to do the job:
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.withXml { fixPomXml(it) }
}
}
}
Deleted for now since it was throwing errors on Travis (and I don't want to set up username/password environment variables there.).
If we're going to release versions of RiceChecks on a regular basis, we need to get the uploading process properly automated. Manual upload sucks.
Example: if GradeTopic
was attached to a class, then any Grade
within that class that doesn't name a topic could "inherit" the stated topic and project.
Upsides: cleaner annotations.
Downsides: even more error checking and validation.
We probably want the lambdas' coverage stats to be accumulated alongside their containing classes, rather than being treated as separate classes for coverage purposes. This will require paying attention to the mangled names.
Rather than "0.8", instead it's some crazy Docker string (a file directory with a carriage return in it!).
Tentative fix seems to work. Need to roll out a new Jar, etc.
Created a branch to experiment with this:
https://github.com/RiceComp215-Staff/RiceChecks/tree/jdk8-support
build.gradle
files (notably, switching to a much older error-prone
plugin)var
declarationsList.of(...)
to Arrays.asList(...)
It's going to be all-JDK8 or all-JDK11. No easy way to mix them. Among other issues, we need to make sure all the generated libraries use the "version 53" classfiles, otherwise this happens in a JDK8 project trying to read JDK11 classfiles:
> Task :standaloneSort:compileJava FAILED
/Users/dwallach/IdeaProjects/RiceChecks/standaloneSort/src/main/java/edu/rice/sort/InsertionSort.java:9: error: cannot access GradeCoverage
import edu.rice.autograder.annotations.GradeCoverage;
^
bad class file: /Users/dwallach/.gradle/caches/modules-2/files-2.1/edu.rice.ricechecks/ricechecks-annotations/0.5/780f06a5a0184415e1eab7e3ca34756690d8ee75/ricechecks-annotations-0.5.jar(/edu/rice/autograder/annotations/GradeCoverage.class)
class file has wrong version 55.0, should be 53.0
Tried switched over to Arrow 0.10.3 and tons of warnings about deprecating Try
, in favor of the new hotness. This would represent some fairly major code changes, and might clean up some things, but it's going to be a bunch of work.
Issue seems to be with ClassGraph:
classgraph/classgraph#339
This looks like a great way to report the autograder's results.
https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/
In a nutshell, $GITHUB_STEP_SUMMARY
is an environment variable containing a filename. You write Markdown into that file, and it shows up for the user.
Code checked in to allow @GradeConverage
annotations on anonymous inner classes. Testing and whatnot will be necessary here.
Related links:
https://www.oracle.com/technetwork/articles/java/ma14-architect-annotations-2177655.html
https://stackoverflow.com/questions/3021548/annotate-anonymous-inner-class/40793526
Outer "include", inner "exclude", the exclude is being ignored.
Make a flag to write autograder output to a file (YAML? JSON?) suitable for uploading elsewhere. Seems as good an interface for others to do uploads as anything.
The autograders from GitHub Education all use the check_run
facility to set annotations on the build. We should do this with the final score of the autograder.
Relevant code:
Relevant GitHub APIs:
Prior code that I wrote that works with the check-suites
data:
Implementation strategy?
ClassNotFoundError, etc, rather than stopping.
build.gradle
to convert ErrorProne errors into warningsbuild.gradle
to make builds fail correctly
sdk use java 11.0.2-open
.gitpod.yml
: https://www.gitpod.io/docs/41_Config_Gitpod_File/Currently no Kotlin support: gitpod-io/gitpod#83
The hard part is how to bring the autograder in without making it visible in the student's namespace.
We can't require uses to edit a file in the C:\Program Files\JetBrains... directory.
Do we need to file a bug against IntelliJ?
A student was using raw types, generated a bunch of warnings, still got the "no warning" point.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.