Comments (11)
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.
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: b29fbb64ad6b068cb3f05f7e40dc670472129bc0Groovy: 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 amd64The 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.
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.
To remove doubt, gradle jar
as per the Wiki works indeed, it just skips the tests I think.
from liblevenshtein-java.
In the latest commit, I removed the shared
submodule. You may have to clean your directories accordingly (the leading /
denotes the project root):
- If you have
/shared
, delete it. - If you have a symlink to
/shared
from/src/test/resources
, delete it. - Do a
git pull origin master
to update your tree, orgit 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.
To see how your tree differs from master
, execute git diff origin/master
.
from liblevenshtein-java.
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.
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.
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.
No problem 👍
from liblevenshtein-java.
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)
- Support sophisticated, parsing rules when reading a dictionary HOT 1
- Create specialized DawgNodes for common characters
- Consider dynamically-compiling node classes that return constant values
- Support customizing the dictionary-search strategy
- Add development wiki
- Test the example code before generating the documentation
- Create integration test suite
- Create regression test suite
- Cache commands across template tasks for same, Gradle process
- Support variable, error penalties by error type (weighted errors)
- Support variable, error penalties by error type and context
- Support generic, dictionary nodes HOT 1
- Periodically-tweet about resolved issues
- Collapse consecutive, dictionary nodes with only one, outgoing edge HOT 1
- Create a Coverity Scan, Java model
- Before each release, ensure that every closed bug has a regression test
- Add support for One-JAR HOT 1
- Generating string variants constrained by Levenshtein distance HOT 10
- Weighted Levenshtein distance support HOT 2
- Is a transducer thread-safe ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liblevenshtein-java.