-
Notifications
You must be signed in to change notification settings - Fork 80
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
Resource Allocation data in Redis #3430
Conversation
This pull request should only contain changes with uploading data to redis. I accidentally commited some changes to qiita_pet here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Gossty, this looks real good; just some minor comments and suggestions.
qiita_db/meta_util.py
Outdated
@@ -37,11 +37,18 @@ | |||
from re import sub | |||
from json import loads, dump, dumps | |||
|
|||
from qiita_db.util import create_nested_path | |||
from qiita_db.util import create_nested_path, _retrieve_resource_data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If _retrieve_resource_data
is going to be use outside of util, then it should not start with _, could you change?
qiita_db/meta_util.py
Outdated
from qiita_core.qiita_settings import qiita_config, r_client | ||
from qiita_core.configuration_manager import ConfigurationManager | ||
import qiita_db as qdb | ||
|
||
# global constant list used in resource_allocation_page | ||
columns = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally global variables are all upper case.
qiita_db/meta_util.py
Outdated
software_commands = dict() | ||
for software in software_list: | ||
sname = software.name | ||
sversion = software.version | ||
commands = software.commands | ||
if sname not in software_commands: | ||
software_commands[sname] = {} | ||
if sversion not in software_commands[sname]: | ||
software_commands[sname][sversion] = [] | ||
for command in commands: | ||
software_commands[sname][sversion].append(command.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be simplified with a defaultdict, could you check that?
No description provided.