Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/remove mongodict #179

Merged
merged 25 commits into from
Oct 28, 2015
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f8b4b87
Removes MongoDictAdapter
flavioamieiro Aug 6, 2015
f8ecdd4
Adapts test utils for the new database format
flavioamieiro Aug 6, 2015
acca8e8
Fixes the name of the property for the index id in elasticindexer
flavioamieiro Aug 6, 2015
3b735cd
Adapts elasticsearch worker tests
flavioamieiro Aug 6, 2015
4ae2654
Adapts tests for bigrams worker to the removal of MongoDict
flavioamieiro Aug 6, 2015
ad901fb
Fixes huge bug in PyPLNTask
flavioamieiro Aug 10, 2015
38e3f7e
Changes GridFSDataRetriever to base64 encode the contents before storing
flavioamieiro Aug 10, 2015
2c7bb07
Adapts Extractor to the removal of MongoDict
flavioamieiro Aug 10, 2015
d3ca42e
Adapts GridFSFileDeleter to the removal of MongoDict
flavioamieiro Aug 31, 2015
a1880b8
Adapts Lemmatizer tests to the removal of MongoDict
flavioamieiro Aug 31, 2015
077d6a9
Adapts NounPhrase worker to the removal of MongoDict
flavioamieiro Aug 31, 2015
23db880
Adapts WordCloud worker to the removal of MongoDict
flavioamieiro Aug 31, 2015
02c620d
Removes trailing `_` from Trigram worker test name
flavioamieiro Aug 31, 2015
565c380
Adapts Tokenizer test to the removal of MongoDict
flavioamieiro Sep 1, 2015
d8f7435
Adapts the Statistics worker tests to the removal of MongoDict
flavioamieiro Sep 1, 2015
dfc69f0
Adapts Spellchecker worker tests to the removal of MongoDict
flavioamieiro Sep 1, 2015
bc9a174
Adapts POS worker tests to the removal of MongoDict
flavioamieiro Sep 1, 2015
ba8b40f
Adapts SemanticTagger worker tests to the removal of MongoDict
flavioamieiro Sep 1, 2015
53515b4
Adapts PalavrasRaw worker tests to the removal of MongoDict
flavioamieiro Sep 1, 2015
72a54a5
Adapts Trigrams worker to the removal of MongoDict
flavioamieiro Sep 15, 2015
48d41a7
Removes last references to MongoDict
flavioamieiro Sep 15, 2015
b12833e
Adds `w=1` to all inserts in tests as suggested by @fccoelho
flavioamieiro Sep 16, 2015
1871148
Adds test for trigrams with dots and dollar signs
flavioamieiro Sep 30, 2015
3bd3896
Adds test for bigrams with dots and dollar signs
flavioamieiro Sep 30, 2015
5569227
Start checking the values in bigram and trigram tests
flavioamieiro Sep 30, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adapts WordCloud worker to the removal of MongoDict
flavioamieiro committed Aug 31, 2015
commit 23db88009b82ff9dd53a295b14d49f354f5f704f
11 changes: 6 additions & 5 deletions tests/test_worker_wordcloud.py
Original file line number Diff line number Diff line change
@@ -29,12 +29,13 @@
class TestFreqDistWorker(TaskTest):
name = "WordCloud"
def test_wordcloud_should_return_a_base64_encoded_png(self):
self.document['freqdist'] = [('is', 2), ('the', 2), ('blue', 1), ('sun', 1),
('sky', 1), (',', 1), ('yellow', 1), ('.', 1)]
self.document['language'] = 'en'
WordCloud().delay(self.fake_id).get()
doc = {'freqdist': [('is', 2), ('the', 2), ('blue', 1), ('sun', 1),
('sky', 1), (',', 1), ('yellow', 1), ('.', 1)], 'language': 'en'}
doc_id = self.collection.insert(doc)
WordCloud().delay(doc_id)

raw_png_data = base64.b64decode(self.document['wordcloud'])
refreshed_document = self.collection.find_one({'_id': doc_id})
raw_png_data = base64.b64decode(refreshed_document['wordcloud'])

fake_file = StringIO(raw_png_data)
img = Image.open(fake_file)