testmycode / tmc-core Goto Github PK
View Code? Open in Web Editor NEWThe common clientside implementation for tmc-clients. Used by the tmc-netbeans and the tmc-cli
The common clientside implementation for tmc-clients. Used by the tmc-netbeans and the tmc-cli
Files use the Unix newline "\n" when they should be using Windows newline "\r\n". This causes files to display incorrectly on certain programs that lack Unix newline support, such as notepad.
As an TA/admin I want to be able to give url of a submission/paste and to download (and open) it locally
Some methods take as parameters a path and settings, which should contain the same path. These redundancies should be removed
Core should have support to organisations
Submitting: arith_funcs
Zipping project
Submitting project
50%[########################################################### ]Failed: ArithTest testDiv
expected:<3> but was:<0>
Failed: ArithTest testMul
expected:<12> but was:<0>
Failed: ArithTest testSub
expected:<-1> but was:<0>
Test results: 1/4 tests passed
Some tests failed on server. Please review your answer```
At the moment tmc-core fetches courses.json every time when user submits course
exercises with same id's from different courses will overwrite each others checksums in the cache file, which will cause at least unnecessary updates
We should try to reduce the amount of test resource exercises and make them more generic (rename references to our courses away)
However, keep in mind that there are some test resource exercises added for testing a specific bug.
Some of the Javadoc comments are out of date and contain false information. F.ex. see fi.helsinki.cs.tmc.core.commands.Command#L51-56, fi.helsinki.cs.tmc.core.commands.DownloadExercises#L119-124 and fi.helsinki.cs.tmc.core.exceptions.TmcCodeException. Furthermore, multiple classes have undocumented public methods. These need to be updated and documented.
It would also be nice if the comments used Javadoc tags, especially for links to other classes within the project.
The implementation for ProjectRootFinder to use langs to detect a course root directory exists, and the branch should be merged when the this feature is in the master branch of tmc-langs
And rather do the unzipping in memory
mvn clean cobertura:cobertura
fails both locally and in travis
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ core ---
[INFO]
[INFO] --- maven-checkstyle-plugin:2.16:check (test) @ core ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.437 s
[INFO] Finished at: 2016-04-05T05:38:31+03:00
[INFO] Final Memory: 39M/135M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.16:check (test) on project core: Unable to parse configuration of mojo org.apache.maven.plugins:maven-checkstyle-plugin:2.16:check: Basic element 'excludes' must not contain child elements -> [Help 1]
[ERROR]
Instead of strings for paths, we should prefer java.nio.file.Path.
Teatchers get the locked exercises from Course.getExercises method, but they can't download them.
Students won't get the locked exercises from getExercises method.
Admins can see all the exercises and download them.
It would be nice if there would be some way to tmc-clients to know if they can download exercise before they try to download them. Or remove the locked exercises from the exercise list if the user can't download them.
e.g the Place in queue 2/10
Cleanup unneccessary files, or document why such files exist
pom.xml
and dependency-reduced-pom.xml
seems overlapping...
When running tests on the project, checkstyle also runs. Sometimes, checkstyle prints out a bazillion lines about incorrect indentation. It seems that this is caused by checkstyle not finding the .xml
config file specified in pom.xml
and defaulting to use the built-in sun_checks.xml
that is drastically different than our own checkstyle configs.
This causes two issues:
A possible hint towards solving this problem:
On my computer, if I run mvn clean test
, I get the bazillion lines of text. If afterwards I run mvn test
(NB: no clean
), then the correct checkstyle config is applied and no extraneous errors are shown. My theory is that for some reason, checkstyle is looking for the config in /target
instead of in root
, and that the config is copied to /target
only after the first run completes. This theory is corroborated by the fact that if I run mvn clean test
twice, both runs show the incorrect warnings.
If you'd like more info, ping loezi
in IRC or comment here.
Running tests with tmc-cli returns the following errors
PS X:\Tiedostot\Projektit\test\cert-test> tmc test
Testing: arith_funcs
warning: Supported source version 'RELEASE_6' from annotation processor 'fi.helsinki.cs.tmc.testscanner.TestMethodAnnota
tionProcessor' less than -source '1.8'
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:2: error: package fi.helsinki.cs.tmc.edutestutils
does not exist
import fi.helsinki.cs.tmc.edutestutils.Points;
^
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:3: error: package org.junit does not exist
import org.junit.Test;
^
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:4: error: package org.junit does not exist
import static org.junit.Assert.*;
^
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:7: error: cannot find symbol
@Test
^
symbol: class Test
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:8: error: cannot find symbol
@Points("arith-funcs")
^
symbol: class Points
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:13: error: cannot find symbol
@Test
^
symbol: class Test
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:14: error: cannot find symbol
@Points("arith-funcs")
^
symbol: class Points
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:19: error: cannot find symbol
@Test
^
symbol: class Test
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:20: error: cannot find symbol
@Points("arith-funcs")
^
symbol: class Points
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:25: error: cannot find symbol
@Test
^
symbol: class Test
location: class ArithTest
X:\Tiedostot\Projektit\test\cert-test\arith_funcs\test\ArithTest.java:26: error: cannot find symbol
@Points("arith-funcs")
^
symbol: class Points
location: class ArithTest
11 errors
1 warning
Failed to connect to server.
Failed to run tests.
null
Use instances of java.net.URI
instead of String
s where ever possible.
See testmycode/tmc-netbeans#115 for related effort in TMC-Netbeans.
We should get paths/urls from the json and not to generate it ourselfs.
(Only the courses.json needs to be defined manually.)
For all available courses we have the details url in the courses.json
https://github.com/testmycode/tmc-core/blob/master/src/main/java/fi/helsinki/cs/tmc/core/communication/UrlHelper.java#L31
Tmc-core could inform to observer about the state of process. Client (like tmc-cli) that wants to know the state, could print that to user.
Kinda like the paste but for code reviews
There has been a lot of changes...
SubmissionResultParser fails to parse the submissionStatus JSON if there are validation errors. This seems to cause an infinite loop in Submit.call() method where it just fetches the same JSON string over and over again. No interrupt exception is ever thrown, we let it run for 30+ mins.
Here's the parse exception and the JSON string causing it. The same exception is thrown like every two seconds. Very easy to reproduce, just have incorrect indentation in some exercise that does checkstyle validations and do TmcCore.submit(). Local validation works fine.
@Salmela got the parsing to work by defining ValidationResultImpl.validationErrors map as 'transient' but wasn't quite sure whether that's the right way to fix it or if it causes problems elsewhere.
Hope this helps!
This looks promising: https://cwiki.apache.org/confluence/display/OLTU/OAuth+2.0+Client+Quickstart
It's a bigger one, we need to thru each api action and feature to confirm whether we have reduced usability. Based on this generate bugs and make necessary fixes.
Typo in serverAddress makes program return null.
At the moment it's 69% https://coveralls.io/github/rage/tmc-core
And use the correct interfaces from tmc-langs-abstraction.
Now when user types tmc download , all exercises will be downloaded in a single thread. When exercise amount is 100, it's stupid
The default port 8080 is already in use on my machine and it's annoying.
If any client initiated action returns 404 re fetch courses.json and other files and try again with newly updated url.
eg. when submit url address is changed
Replace all System.out/err.print(ln)
's with appropriate logger calls.
The problem seems to be that the SubmissionResultParser tries to parse json with gson library, but the gson can't write the validationErrors map member in ValidationResultImp .
The simplest way to fix this issue is just set the validationErrors member as transient. We tried it and it seemed to work. Another way that this could probably be fixed is set validations member in SubmissionResult as transient.
This bug was discovered by @juvester .
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.