Skip to content
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

feat: add portal challenge #252

Merged
merged 26 commits into from
Nov 22, 2023
Merged

feat: add portal challenge #252

merged 26 commits into from
Nov 22, 2023

Conversation

vpchung
Copy link
Member

@vpchung vpchung commented Nov 22, 2023

Changelog

  • new module for creating a new challenge that conforms to the new Sage Challenge Portal. Unlike create-challenge, this new module will:
    • use the Challenge Portal Wiki Template project as the template for staging

      • live will use a simple banner that says "More information coming soon":
        Screenshot 2023-11-22 at 2 34 15 PM
    • create 2 teams instead of 4:

      • Organizers - will have "moderate" access to live, "edit" to staging
      • Participants
      • Preregistrants - ARCHIVED, has no purpose in the new portal
      • Admin - ARCHIVED, currently holds very little value
    • create one queue per task (based on tasks_count)

    • create one folder per task in live (based on tasks_count), where local sharing settings have been set:

      • Participants - will have "download" access
    • create basic annotations for live project (based on Challenge Portal Wiki Template's annotations)

Note

Default tables are not currently created, though the functionality _is_there. For some reason, storing a new table will call on the main module again, thus not finishing the create_portal_challenge module.

  • add the newly-created live project to the Curated Challenge Projects project view, which currently powers the table.

    • Note: to actually see the challenge on the portal, the "Status" annotation will need to be set to either: Active, Upcoming, or Completed
  • new CLI command: create-portal-table, e.g.

    challengeutils create-portal-table "challenge name" [-t <number of tasks (default: 1)>]
    

Examples

Example usage:

$ challengeutils create-portal-challenge -h
usage: challengeutils create-portal-challenge [-h] [-t TASKS_COUNT] [--livesiteid LIVESITEID] challenge_name

positional arguments:
  challenge_name        Challenge name

options:
  -h, --help            show this help message and exit
  -t TASKS_COUNT, --tasks_count TASKS_COUNT
                        Number of challenge tasks (default: 1)
  --livesiteid LIVESITEID
                        Option to specify the live site synapse Id there is already a live site

Create a new challenge called "Portal Test" which has 2 tasks:

$ challengeutils create-portal-challenge "Portal Test" -t 2
INFO:challengeutils.create_portal_challenge: Team created: Portal Test Participants (3487214)
INFO:challengeutils.create_portal_challenge: Team created: Portal Test Organizers (3487215)
INFO:challengeutils.create_portal_challenge: Project created: Portal Test (syn53029636)
INFO:challengeutils.create_portal_challenge: Acivated as Challenge (ID: 4678)
INFO:challengeutils.create_portal_challenge: Queue created: Portal Test Task 1 (9615498)
INFO:challengeutils.create_portal_challenge: Queue created: Portal Test Task 2 (9615499)
INFO:challengeutils.create_portal_challenge: Creating folders...
INFO:challengeutils.create_portal_challenge:    Folder created: Task 1 (syn53029637) ✔
INFO:challengeutils.create_portal_challenge:    Folder created: Task 2 (syn53029638) ✔
 ...
 ...
INFO:challengeutils.create_portal_challenge: Creating basic annotations...
INFO:challengeutils.create_portal_challenge:    Annotations creation complete ✔
INFO:challengeutils.create_portal_challenge: Project created: Portal Test - staging (syn53029640)
INFO:challengeutils.create_portal_challenge: Copying wiki template to Portal Test - staging
 ...
 ...
INFO:challengeutils.create_portal_challenge: Challenge added to 'Curated Challenge Projects' (syn51476218)

Portal Test (Production site): https://www.synapse.org/#!Synapse:syn53029636
Portal Test (Staging site): https://www.synapse.org/#!Synapse:syn53029640
Portal Test (Participant team): https://www.synapse.org/#!Team:3487215
Portal Test (Organizer team): https://www.synapse.org/#!Team:3487214

@vpchung vpchung self-assigned this Nov 22, 2023
@vpchung vpchung requested a review from thomasyu888 November 22, 2023 22:45
@pep8speaks
Copy link

pep8speaks commented Nov 22, 2023

Hello @vpchung! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2023-11-22 22:54:07 UTC

@vpchung vpchung merged commit 710ad23 into develop Nov 22, 2023
5 of 6 checks passed
@vpchung vpchung deleted the feat-add_portal_challenge branch November 22, 2023 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants