wikipathways / wikipathways.github.io

GitHub pages for GPML-Repo
https://www.wikipathways.org/
5 stars 18 forks source link

Communities lost #111

Closed AlexanderPico closed 9 months ago

AlexanderPico commented 9 months ago

We have a bug in our communities logic. Currently, when a communities text file is updated (e.g., a WPID is add to a community list), then the community is added to the md file for that pathways. This is the on_community_change.yml and it works fine, as outlined here.

However! If a pathway is edited later on, then the on_gpml_change.yml is triggered and it creates a new md file and doesn't access the communities lists, thus removing the community assignment!

@khanspers and others. If you've noticed pathways disappearing from communities, then this might be the cause.

I don't think this happens every time a pathway is edited, since it should just overwrite the changed parts, but it definitely happens sometimes. Need to dig deeper.

AlexanderPico commented 9 months ago

Here is an example of where the community "Rare diseases" was lost during an MD update of the authors. https://github.com/wikipathways/wikipathways.github.io/commit/3516ca12cdd7532c4386eb5e21642c772ef68090

khanspers commented 9 months ago

Yikes! I haven't noticed missing pathways but will look now.....

AlexanderPico commented 9 months ago

Community, CitedIn, and NDEx entries in the MD would be lost for the same reasons.

AlexanderPico commented 9 months ago

Yikes! I haven't noticed missing pathways but will look now.....

Two examples WP5105 and WP5130 are no longer in the Rare Diseases community, even though they are still in the text file lists.

Don't need additional examples to diagnose or fix issue.

AlexanderPico commented 9 months ago

I can simply run the actions for adding communities and ndex entries to md files. This will correct all the losses. But before doing that I want to fix the bug so we don't have to run those every time we run on_gpml_change.yml

AlexanderPico commented 9 months ago

Ok. Fixed create_frontmatter.py and am running actions for communities, NDEx, and CitedIn to refill lost entries.