-
Notifications
You must be signed in to change notification settings - Fork 4
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
Minting WPIDs #2
Comments
There can be multiple PRs open, each with files named "WP0001" and they won't conflict since each PR is handled independently during the initial automatic tests and review. They only require unique filenames immediately before merging. And if a given author submits more than one new pathway, then we increment locally, w.r.t. their fork, "WP0002", etc. These are all recognizable as provisional and won't be conflicting within nor across author forks and PRs. The merge actions will stack so that even if two or more merges are triggered immediately, the first will complete before the second one starts, thus the second one will see the latest WPID issued from the first one. The |
Regarding PathVisio and using GH API, all commits should be made on WPID-specific branches so that independent PRs can be made by a given author. For example, if I make a new pathway, it would be committed to my fork in the "WP0001" branch as "WP0001.gpml". A PR would be created for this new submission. While in review, I could edit an existing pathway "WP554". Changed would be committed a "WP554" branch and the PR would be separately handled. |
So the branches would need to match the WPID exactly? What about multiple edits to the same pathway, does the branch get rebased and re-used? And what about small edits to multiple pathways (e.g. updating the references of ~50 pathways)? |
The proposal is a PR per author and pathway.
The branches will be named by PathVisio at the time of submission, so we can devise any convention we want. For simplicity, I'm proposing to just name them the same as the WPID to help organize. |
This should work. |
Cool. Fortunately, we have years of experience with the wiki and know that that rarely happens. Further, any changes to distinct parts of the GPML (especially GPML2022) will auto-merge via git. Manual resolution should only be needed if two authors edit, say the description, within the same hour or so. And, if that (ever) happens, then it probably is worth manual attention :) |
Extended Proposal: For new pathways, after they arrive with a user-incremented, temporary WPID, e.g., WP0001 or WPX1 for the user's first submission via their fork (always with a preceding 0 or X). This ensures uniqueness within the constraints of what PathVisio "knows" at the time of submission. Then, the PR processing workflow can assign a new temporary WPID, based on the PR number, e.g., WP010 or WPR10 for PR#10 (always with a preceding 0 or R). This ensures uniqueness across submissions and over time, which is particularly critical during the review period, especially if we're going to use Jekyll to serve the draft pathways on the website. The final, official WPID would be assigned at time of PR acceptance. Note: the preceding 0 (or character) is a great convention for identifying temporary WPIDs from official WPIDs. |
Ok. New idea... What if we never formally "accept" pull requests? Then we don't have to worry about the WPID of the attached gpml file. We can instead use |
|
Proposal:
PRs containing new pathways (not edits of existing pathways) can be given a provisional ID "WP0001" to be used by parsing scripts to generate JSON, TSV and image files (e.g., WP0001-datanodes.tsv) as part of the PR review process.
When a new pathway PR is ready to be accepted and merged, that is when a separate GH Action will be triggered to perform the final steps, including minting a proper WPID. This can easily be done by the action simply by checking the latest WPID in wp-db at the time of merge and incrementing the number. The action would simply rename all the "WP0001" files at that time and insert the WPID into the .gpml as well. Then commit/push the files to wp-db and sync with the wp.github.io.
The text was updated successfully, but these errors were encountered: