8000 AppStore: fix selecting apps according to their categories. by yakutovicha · Pull Request #75 · aiidalab/aiidalab-home · GitHub
[go: up one dir, main page]

Skip to content

AppStore: fix selecting apps according to their categories. - #75

Merged
yakutovicha merged 1 commit into
developfrom
fix/select-apps-categories
Oct 14, 2021
Merged

yakutovicha merged 1 commit into
developfrom
fix/select-apps-categories

Conversation

@yakutovicha
Copy link
Copy Markdown
Member

To be tested in combination with aiidalab/aiidalab#240

@yakutovicha
yakutovicha requested a review from csadorf October 13, 2021 12:29
@csadorf csadorf left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The AiidaLabApp class should not be directly instantiated, but always instantiated via the from_id() constructor method. What is the motivation for this patch?

@yakutovicha
Copy link
Copy Markdown
Member Author

The AiidaLabApp class should not be directly instantiated, but always instantiated via the from_id() constructor method. What is the motivation for this patch?

But from_id() is gone, no? At least this is the error I got.

@yakutovicha
Copy link
Copy Markdown
Member Author

Why then do we do:

self.apps_to_display = [
AiidaLabApp(app_id, None, None) for app_id in self.index["apps"]
]

?

@csadorf
csadorf commented Oct 14, 2021
Copy link
Copy Markdown
Member

Why then do we do:

self.apps_to_display = [
AiidaLabApp(app_id, None, None) for app_id in self.index["apps"]
]

?

You're right, calling the constructor like this calls the from_id() function internally on the data class: https://github.com/aiidalab/aiidalab/blob/c439d3e901179a7ce3f113c50e28bfb24abc0faf/aiidalab/app.py#L571-L572

@yakutovicha
Copy link
Copy Markdown
Member Author

You're right, calling the constructor like this calls the from_id() function internally on the data class...

yes.

@yakutovicha
yakutovicha merged commit 31d5253 into develop Oct 14, 2021
@yakutovicha
yakutovicha deleted the fix/select-apps-categories branch October 14, 2021 10:02
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.

2 participants

0