Skip to content

Add "Save to GitHub" Feature to PathVisio for Direct WikiPathways Contribution #224

@Akshay-gurav-31

Description

@Akshay-gurav-31

Problem Statement:
Currently, PathVisio users need to manually export their GPML files and upload them to the wikipathways/wikipathways repository on GitHub to contribute pathways. This process is time-consuming and error-prone, especially for users unfamiliar with GitHub workflows.

Proposed Solution:
Implement a "Save to GitHub" feature in PathVisio that allows users to directly upload their GPML files to the wikipathways/wikipathways repository via the GitHub API. The feature should include:

  • A "Save to GitHub" option in the "File" menu.
  • Conversion of the current pathway to a GPML string and uploading it to the specified repository.
  • Authentication using a GitHub personal access token (loaded from a config.properties file to avoid hard-coding).
  • User feedback (success/error messages) after the upload attempt.

Acceptance Criteria:

  1. A "Save to GitHub" menu item should be added to the "File" menu in PathVisio.
  2. Clicking "Save to GitHub" should upload the current pathway as a GPML file to wikipathways/wikipathways under the pathways/ directory.
  3. The file name should be based on the pathway title (e.g., pathways/pathway_name.gpml).
  4. The GitHub token should be loaded from a config.properties file, not hard-coded.
  5. Users should see a success message ("Successfully saved to GitHub!") on successful upload, or an error message if the upload fails.
  6. The feature should handle common errors (e.g., invalid token, no write access to the repository) gracefully.

Technical Details:

  • Use the org.kohsuke.github library (github-api-1.326.jar) for GitHub API integration.
  • Add the jar to the lib/ folder and document this dependency in README.md.
  • Implement the feature in SwingEngine.java and create a new GitHubIntegration.java class for API interactions.

Priority: Medium
Assignee: @Akshay-gurav-31
Labels: enhancement, gsoc, wikipathways
Milestone: GSoC 2025 (if applicable)

Additional Notes:

  • A pull request implementing this feature is already in progress: [link to your PR will be added later].
  • The feature has been tested locally and successfully uploads GPML files to the wikipathways/wikipathways repository (with a valid token).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions