Code Monkey home page Code Monkey logo

tmc-core's People

Contributors

a544jh avatar cxcorp avatar darthkipsu avatar jamo avatar josalmi avatar ljleppan avatar nygrenh avatar pirtnea avatar redande avatar rochet2 avatar salmela avatar samutamm avatar umtti avatar vilmakoo avatar wakr avatar zinkko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tmc-core's Issues

refactor methods in TmcCore

Some methods take as parameters a path and settings, which should contain the same path. These redundancies should be removed

Submitting exercise only calls the progress observer once with 50% progress

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```

Simplify and clean up test exercise resources

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.

Root detection from langs

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

mvn clean cobertura:cobertura fails

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]

Teachers can see the locked exercises, but can't download them

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.

2x pom.xml

Cleanup unneccessary files, or document why such files exist
pom.xml and dependency-reduced-pom.xml seems overlapping...

Figure out why checkstyle sometimes uses wrong config

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 .xmlconfig 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:

  1. It's really annoying when your console is flooded with text after a test run
  2. Travic CI auto-stops the build after 4 Mb of logs. This checkstyle issue causes our logs to be over this limit and therefore the build fails even if there's no "real" issue with the code being ran.

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.

Exercises fail to compile on Windows

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

Submit hangs indefinitely if there are validation errors

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!

Parallelize exercise downloading

Now when user types tmc download , all exercises will be downloaded in a single thread. When exercise amount is 100, it's stupid

Checkstyle validation parsing hangs in submit command

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 .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.