Skip to content

Commit

Permalink
Clarify stringifier name
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Feb 28, 2019
1 parent 52042f5 commit 5958f53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions backend/lib/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def init_datasource(database, logger, queue, name):
:param name:
:return:
"""
if name not in config.PLATFORMS or "boards" not in config.PLATFORMS[name]:
if True or name not in config.PLATFORMS or "boards" not in config.PLATFORMS[name]:
return

for board in config.PLATFORMS[name]["boards"]:
Expand Down Expand Up @@ -80,7 +80,6 @@ def load_postprocessors():
"description": member[1].description,
"name": member[1].title,
"extension": member[1].extension,
"class": member[0],
"category": member[1].category if hasattr(member[1], "category") else "other",
"accepts": member[1].accepts if hasattr(member[1], "accepts") else [],
"options": member[1].options if hasattr(member[1], "options") else {}
Expand All @@ -90,6 +89,13 @@ def load_postprocessors():
for key in sorted(postprocessors, key=lambda postprocessor: postprocessors[postprocessor]["category"] + postprocessors[postprocessor]["name"].lower()):
sorted_postprocessors[key] = postprocessors[key]

backup = sorted_postprocessors.copy()
for type in sorted_postprocessors:
sorted_postprocessors[type]["further"] = []
for possible_child in backup:
if type in backup[possible_child]["accepts"]:
sorted_postprocessors[type]["further"].append(possible_child)

return sorted_postprocessors


Expand Down
2 changes: 1 addition & 1 deletion backend/postprocessors/stringify.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Stringify(BasicPostProcessor):
"""
type = "stringify-posts" # job type ID
category = "Text analysis" # category
title = "Collapse into string" # title displayed in UI
title = "Merge post texts" # title displayed in UI
description = "Collapses all posts in the results into one plain text string. The result can be used for word clouds, word trees, et cetera." # description displayed in UI
extension = "txt" # extension of result file, used internally and in UI

Expand Down

0 comments on commit 5958f53

Please sign in to comment.