materialscloud-org / discover-curated-cofs

Materials Cloud DISCOVER section for CURATED COFs database
https://www.materialscloud.org/discover/curated-cofs
1 stars 0 forks source link

Update October-2020 #30

Closed danieleongari closed 3 years ago

danieleongari commented 3 years ago

Using a new structure of the database/queries that is the same for CCS and other applications, and exploits extras on groups.

danieleongari commented 3 years ago

@ltalirz please give a look to figure.configure.load_profile() if this can be moved to pipeline_config. It is also weird that newer pages (details, results) are not using the update_profile, so I'm not sure it is still needed!

ltalirz commented 3 years ago

please give a look to figure.configure.load_profile() if this can be moved to pipeline_config.

Yes, you can move it there.

It is also weird that newer pages (details, results) are not using the update_profile, so I'm not sure it is still needed!

Well, this function is needed only inside the docker container and all it does is to create the profile if it is missing. I.e. once one of the apps has created the profile, the others will be able to use it. In general, however, it would be better if all apps were importing the load_profile function from the pipeline_config.

danieleongari commented 3 years ago

@ltalirz I'll take care of it, thanks

danieleongari commented 3 years ago

All pages tested, now we should wait that the group extras can be exported. https://github.com/aiidateam/aiida-core/issues/4497

danieleongari commented 3 years ago

One thing that is very inconvenient in the group organization is that group.label is like discover_curated_cofs/{MAT_ID} and therefore one has to always to use .split("/")[1], and since the mat_id is important, this is needed many times. To circumvent this I created the extra mat_id: {MAT_ID}, but now one has to be careful that if he needs to modify the MAT_ID he modifies both. It is more convenient than using again and again .split() but not perfect!

ltalirz commented 3 years ago

One thing that is very inconvenient in the group organization is that group.label is like discover_curated_cofs/{MAT_ID} and therefore one has to always to use .split("/")[1], and since the mat_id is important, this is needed many times.

One could try to play around with the GroupPath functionality but in the end I think the right approach is what you did: to query for groups by the mat_id extra and to regard the group label more as a human-readable labelling on top - which should be possible to change at any time without breaking the queries.