Skip to content

Conversation

@flavioamieiro
Copy link
Member

This adds the functionality in the frontend to use the functionality added in NAMD/pypln.backend#183 .

The first worker available calculates the freqdist for a worker.

This adds a fixture for a corpus freqdist, which generates a warning (since
django tries to load a fixture for something that is not a model). For now I'll
leave this warning. But maybe we should fix this before merging this branch.
We were getting some errors when tests ran because the write operation didn't
finish before trying to retrieve data.
The view will also be used to run the analyisis, but is not yet working for
that.
This also includes a change to the corpus analysis fixture, to keep the data
with the "user" user.
This is what the backend expects.
{"index_name": doc.index_name, "doc_type": doc.doc_type}})
(Extractor().si(doc_id) | ElasticIndexer().si(doc_id))()

def corpus_freqdist(corpus):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this have a verb-name, like calculate_corpus_freqdist? I thought the call on the view was strange because of this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I just pushed that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants