Giter VIP home page Giter VIP logo

Comments (11)

dylon avatar dylon commented on August 15, 2024

Hi,

I've followed the instructions, step-by-step, and have no issue with the tests. As well, I'm using Travis CI for automated testing, and it has no issues with the tests (https://travis-ci.org/universal-automata/liblevenshtein-java).

What git revision are you on? Have you modified the source or tests in any way (including changing the list of terms)? What OS are you using? Also, what versions of the following are you using? These are the versions I'm using, which are currently the only versions I support:

% gradle --version

------------------------------------------------------------
Gradle 2.12
------------------------------------------------------------

Build time:   2016-03-14 08:32:03 UTC
Build number: none
Revision:     b29fbb64ad6b068cb3f05f7e40dc670472129bc0

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_77 (Oracle Corporation 25.77-b03)
OS:           Linux 4.4.5-1-ARCH amd64

The minimum, required version of the JDK is 1.8, but you may be able to get by with slightly-older versions of Gradle, Groovy, and Ant (although you should stick to the supported versions).

from liblevenshtein-java.

matanox avatar matanox commented on August 15, 2024

Thanks for checking ― I'm sure it will sort out using the same versions of
things. I should look deeper then come back here.

On Sun, Apr 3, 2016 at 4:02 AM, Dylon Edwards [email protected]
wrote:

I've followed the instructions, step-by-step, and have no issue with the
tests. What git revision are you on? Have you modified the source or tests
in any way? What OS are you using? Also, what versions of the following are
you using? These are the versions I'm using, which are currently the only
versions I support:

% gradle --version


Gradle 2.12

Build time: 2016-03-14 08:32:03 UTC
Build number: none
Revision: b29fbb64ad6b068cb3f05f7e40dc670472129bc0

Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_77 (Oracle Corporation 25.77-b03)
OS: Linux 4.4.5-1-ARCH amd64

The minimum, required version of the JDK is 1.8, but you may be able to
get by with slightly-older versions of Gradle, Groovy, and Ant (although
you should stick to the supported versions).


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#11 (comment)

from liblevenshtein-java.

matanox avatar matanox commented on August 15, 2024

I've not tried again until now, but upgraded to maven 3 meanwhile, for other project's sake. any special reason to reopen? I think will have to have you specify the directory layout you have for running the tests, or the command you use for running them, as it is otherwise clearly a directory layout thing, as the error says it can't read an input file /resources/programming-languages.txt.

com.github.dylon.liblevenshtein.levenshtein.MergeAndSplitTransducerTest.setUp FAILED
    java.lang.NullPointerException
        at java.io.Reader.<init>(Reader.java:78)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
        at com.github.dylon.liblevenshtein.levenshtein.AbstractTransducerTest.readLines(AbstractTransducerTest.java:16)
        at com.github.dylon.liblevenshtein.levenshtein.MergeAndSplitTransducerTest.setUp(MergeAndSplitTransducerTest.java:32)


That file is at /shared not under the java subproject, as the code expects.

For a fresh install I have:

git clone [email protected]:universal-automata/liblevenshtein.git
cd liblevenshtein/
cd java/
git submodule update --init
gradle build

And the test cannot find the resource file under that setup. Have I missed something, or is it just an easy to fix directory layout discrepancy?

from liblevenshtein-java.

matanox avatar matanox commented on August 15, 2024

To remove doubt, gradle jar as per the Wiki works indeed, it just skips the tests I think.

from liblevenshtein-java.

dylon avatar dylon commented on August 15, 2024

In the latest commit, I removed the shared submodule. You may have to clean your directories accordingly (the leading / denotes the project root):

  1. If you have /shared, delete it.
  2. If you have a symlink to /shared from /src/test/resources, delete it.
  3. Do a git pull origin master to update your tree, or git reset --hard HEAD if you are already updated.

After those, you should have a normal directory at /src/test/resources with the files needed for testing. Here is what the directory should look like post-cleanup: /src/test/resources

from liblevenshtein-java.

dylon avatar dylon commented on August 15, 2024

To see how your tree differs from master, execute git diff origin/master.

from liblevenshtein-java.

dylon avatar dylon commented on August 15, 2024

Oh, you are cloning from universal-automata/liblevenshtein, which references an older version of universal-automata/liblevenshtein-java. Updating your git tree (and maybe cleaning up the shared submodule) should fix the problem.

from liblevenshtein-java.

dylon avatar dylon commented on August 15, 2024

Try these steps:

% git clone [email protected]:universal-automata/liblevenshtein-java.git
Cloning into 'liblevenshtein-java'...
remote: Counting objects: 2668, done.
remote: Compressing objects: 100% (320/320), done.
remote: Total 2668 (delta 138), reused 0 (delta 0), pack-reused 2246
Receiving objects: 100% (2668/2668), 786.57 KiB | 1.22 MiB/s, done.
Resolving deltas: 100% (1141/1141), done.
Checking connectivity... done.
% cd liblevenshtein-java
% git submodule init
Submodule 'wiki' (https://github.com/universal-automata/liblevenshtein.wiki.git) registered for path 'wiki'
% git submodule update
Cloning into 'wiki'...
remote: Counting objects: 215, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 215 (delta 6), reused 1 (delta 1), pack-reused 202
Receiving objects: 100% (215/215), 42.15 KiB | 0 bytes/s, done.
Resolving deltas: 100% (128/128), done.
Checking connectivity... done.
Submodule path 'wiki': checked out 'a625d8ea36c8defe6a7c58c06c3e27ae0cfa7cb1'
% ./gradlew test
:extractIncludeProto
:extractProto
:generateProto
:compileJavawarning: No processor claimed any of these annotations: lombok.experimental.FieldDefaults,lombok.Setter,lombok.Getter,lombok.NonNull,lombok.RequiredArgsConstructor,lombok.EqualsAndHashCode,lombok.Value,lombok.extern.slf4j.Slf4j,lombok.Data,lombok.ToString,lombok.AllArgsConstructor,lombok.NoArgsConstructor,lombok.experimental.NonFinal
/tmp/liblevenshtein-java/src/main/java/com/github/dylon/liblevenshtein/levenshtein/factory/CandidateCollectionBuilder.java:53: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
      return new CandidateCollection.WithDistance(maxCandidates);
                 ^
/tmp/liblevenshtein-java/src/main/java/com/github/dylon/liblevenshtein/levenshtein/factory/CandidateCollectionBuilder.java:73: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
      return new CandidateCollection.WithoutDistance(maxCandidates);
                 ^
3 warnings

:processResources
:classes
:extractIncludeTestProto
:extractTestProto
:generateTestProto UP-TO-DATE
:compileTestJava/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:5: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertionsTest.java:12: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
warning: No processor claimed any of these annotations: org.testng.annotations.BeforeTest,lombok.extern.slf4j.Slf4j,org.testng.annotations.DataProvider,org.testng.annotations.BeforeClass,lombok.RequiredArgsConstructor,org.testng.annotations.BeforeMethod,org.testng.annotations.Test
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:5: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertionsTest.java:12: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:5: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertionsTest.java:12: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:5: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertionsTest.java:12: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
import com.github.dylon.liblevenshtein.levenshtein.CandidateCollection;
                                                  ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:11: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
                extends AbstractAssert<CandidateCollectionAssertions<Type>, CandidateCollection<Type>> {
                                                                            ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:17: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
        public CandidateCollectionAssertions(final CandidateCollection<Type> actual) {
                                                   ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertions.java:27: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
                        final CandidateCollection<Type> actual) {
                              ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/levenshtein/CandidateCollectionTest.java:16: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
    val candidates = new CandidateCollection.WithoutDistance(3);
    ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/levenshtein/CandidateCollectionTest.java:16: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
    val candidates = new CandidateCollection.WithoutDistance(3);
                         ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/levenshtein/CandidateCollectionTest.java:28: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
    val candidates = new CandidateCollection.WithDistance(3);
    ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/levenshtein/CandidateCollectionTest.java:28: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
    val candidates = new CandidateCollection.WithDistance(3);
                         ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/levenshtein/CandidateCollectionTest.java:38: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
  private void enqueueCandidates(final CandidateCollection<?> candidates) {
                                       ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertionsTest.java:17: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
        private CandidateCollection<String> candidates = null;
                ^
/tmp/liblevenshtein-java/src/test/java/com/github/dylon/liblevenshtein/assertion/CandidateCollectionAssertionsTest.java:22: warning: [deprecation] CandidateCollection in com.github.dylon.liblevenshtein.levenshtein has been deprecated
                this.candidates = mock(CandidateCollection.class);
                                       ^
19 warnings

:processTestResources
:testClasses
:test

Gradle suite > Gradle test STANDARD_OUT
    12:54:10.568 [Test worker] INFO  c.g.d.l.l.factory.TransducerBuilder - Building transducer out of [673] terms with algorithm [MERGE_AND_SPLIT], defaultMaxDistance [3], includeDistance [true], and maxCandidates [2147483647]
    12:54:10.584 [Test worker] INFO  c.g.d.l.l.factory.TransducerBuilder - Building transducer out of [673] terms with algorithm [STANDARD], defaultMaxDistance [3], includeDistance [true], and maxCandidates [2147483647]
    12:54:10.590 [Test worker] INFO  c.g.d.l.l.factory.TransducerBuilder - Building transducer out of [673] terms with algorithm [TRANSPOSITION], defaultMaxDistance [3], includeDistance [true], and maxCandidates [2147483647]
    12:54:10.872 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [10000] of [109582] terms
    12:54:10.891 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [20000] of [109582] terms
    12:54:10.912 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [30000] of [109582] terms
    12:54:10.928 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [40000] of [109582] terms
    12:54:10.942 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [50000] of [109582] terms
    12:54:10.958 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [60000] of [109582] terms
    12:54:10.974 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [70000] of [109582] terms
    12:54:10.987 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [80000] of [109582] terms
    12:54:10.998 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [90000] of [109582] terms
    12:54:11.011 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [100000] of [109582] terms

Gradle suite > Gradle test > com.github.dylon.liblevenshtein.collection.dawg.DawgTest.equivalentDawgsShouldBeEqual STANDARD_OUT
    12:54:14.994 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [10000] of [109582] terms
    12:54:15.007 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [20000] of [109582] terms
    12:54:15.022 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [30000] of [109582] terms
    12:54:15.035 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [40000] of [109582] terms
    12:54:15.049 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [50000] of [109582] terms
    12:54:15.063 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [60000] of [109582] terms
    12:54:15.078 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [70000] of [109582] terms
    12:54:15.092 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [80000] of [109582] terms
    12:54:15.103 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [90000] of [109582] terms
    12:54:15.117 [Test worker] INFO  c.g.d.l.collection.dawg.AbstractDawg - Added [100000] of [109582] terms

Gradle suite > Gradle test > com.github.dylon.liblevenshtein.levenshtein.MergeAndSplitTransducerTest.testSerialization[1](com.github.dylon.liblevenshtein.serialization.ProtobufSerializer@5a2ec128) STANDARD_OUT
    12:54:16.477 [Test worker] INFO  c.g.d.l.l.factory.TransducerBuilder - Building transducer out of [673] terms with algorithm [MERGE_AND_SPLIT], defaultMaxDistance [3], includeDistance [true], and maxCandidates [2147483647]

Gradle suite > Gradle test > com.github.dylon.liblevenshtein.levenshtein.StandardDistanceTransducerTest.testSerialization[1](com.github.dylon.liblevenshtein.serialization.ProtobufSerializer@2f5df409) STANDARD_OUT
    12:54:16.523 [Test worker] INFO  c.g.d.l.l.factory.TransducerBuilder - Building transducer out of [673] terms with algorithm [STANDARD], defaultMaxDistance [3], includeDistance [true], and maxCandidates [2147483647]

Gradle suite > Gradle test > com.github.dylon.liblevenshtein.levenshtein.TranspositionTransducerTest.testSerialization[1](com.github.dylon.liblevenshtein.serialization.ProtobufSerializer@534b0b31) STANDARD_OUT
    12:54:16.595 [Test worker] INFO  c.g.d.l.l.factory.TransducerBuilder - Building transducer out of [673] terms with algorithm [TRANSPOSITION], defaultMaxDistance [3], includeDistance [true], and maxCandidates [2147483647]

BUILD SUCCESSFUL

Total time: 18.061 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.12/userguide/gradle_daemon.html

from liblevenshtein-java.

matanox avatar matanox commented on August 15, 2024

Awesome, it is working. And thanks for the reorg & for integrating gradlew which decouples away the locally installed version of gradle I guess.

from liblevenshtein-java.

dylon avatar dylon commented on August 15, 2024

No problem 👍

from liblevenshtein-java.

matanox avatar matanox commented on August 15, 2024

Thanks for adding it to the Wiki.

On Mon, Apr 11, 2016 at 11:31 PM, Dylon Edwards [email protected]
wrote:

No problem [image: 👍]


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#11 (comment)

from liblevenshtein-java.

Related Issues (20)

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.