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

Resource Allocation data in Redis #3430

Merged
merged 13 commits into from
Sep 2, 2024

Conversation

Gossty
Copy link
Contributor

@Gossty Gossty commented Aug 28, 2024

No description provided.

@coveralls
Copy link

coveralls commented Aug 28, 2024

Coverage Status

coverage: 92.759% (-0.01%) from 92.773%
when pulling f5ab035 on Gossty:resource-allocation-page
into e34df41 on qiita-spots:dev.

Copy link
Member

@antgonza antgonza left a 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.

@@ -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
Copy link
Member

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?

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 = [
Copy link
Member

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.

Comment on lines 560 to 570
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)
Copy link
Member

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?

@antgonza antgonza merged commit 6f1a3d4 into qiita-spots:dev Sep 2, 2024
4 checks passed
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