nlpsandbox / nlpsandbox.io

NLPSandbox.io website hosted on Synapse
https://nlpsandbox.io
Apache License 2.0
3 stars 5 forks source link

Update CI/CD workflow to rely on bot personal access token instead of API key #58

Closed tschaffter closed 3 years ago

tschaffter commented 3 years ago

Is your proposal related to a problem?

Using personal access token is preferred to using API key for security reason.

Describe the solution you'd like

  1. Using the bot account, create a token
  2. Update the CI/CD workflow to use the token
thomasyu888 commented 3 years ago

Soon the synapsePythonClient will support this method. For now it is blocked.

tschaffter commented 3 years ago

@thomasyu888 I think that the latest version of the Synapse client for Python now supports PAT. We should now be able to use PAT with challengeutils since it depends on synapseclient>=2.3.0.

tschaffter commented 3 years ago

The workflow is stuck when trying to use PAT..

image

tschaffter commented 3 years ago

Running the push command locally using the bot PAT works fine..

$ challengeutils push-wiki syn22277124
Wiki updated: homepage
no updates: Stakeholders
no updates: NLP Developers
no updates: NLP Users
no updates: Partner Organizations
no updates: Tasks
no updates: PHI Annotation & De-Identification
Wiki updated: Symptom Annotation
no updates: Users & Teams
no updates: How to Participate
no updates: Create a Synapse Environment
no updates: Develop an NLP Sandbox Tool
no updates: Benchmark an NLP Sandbox Tool
no updates: Submission Dashboards
no updates: Date Annotation Dashboard
no updates: Person Name Annotation Dashboard
no updates: Physical Address Annotation Dashboard
no updates: Leaderboards
no updates: Date Annotation Leaderboard
no updates: Person Name Annotation Leaderboard
no updates: Physical Address Annotation Leaderboard
no updates: Datasets
no updates: 2014 i2b2 NLP De-id Challenge Dataset
no updates: Medical College of Wisconsin De-id Dataset
Wiki updated: Mayo Clinic De-id Dataset
no updates: Resources
no updates: Rules
no updates: Admin
no updates: Physical Address Annotation Admin
no updates: Date Annotation Admin
no updates: Person Name Annotation Admin
no updates: Submission Logs
tschaffter commented 3 years ago

@thomasyu888 The solution to the above problem was to remove the double quotes around the username and authtoken.