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

sync branches #255

Merged
merged 29 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8c56743
add new command for new portal challenge
vpchung Nov 22, 2023
3a9d782
make copy of `createchallenge`
vpchung Nov 22, 2023
cffd275
update live wiki template
vpchung Nov 22, 2023
7d69597
reduce to two teams created
vpchung Nov 22, 2023
9adb153
create default table and mat. views
vpchung Nov 22, 2023
bfc1b1c
create default data folders
vpchung Nov 22, 2023
04b32e3
fix typo in fxn name
vpchung Nov 22, 2023
ec2565c
fix
vpchung Nov 22, 2023
3f780b5
fix
vpchung Nov 22, 2023
c2494b0
add logging
vpchung Nov 22, 2023
d632b49
update live markdown
vpchung Nov 22, 2023
00f68eb
add new tab for each task
vpchung Nov 22, 2023
fa829d7
typo fix
vpchung Nov 22, 2023
f97a16c
remove unneeded packages
vpchung Nov 22, 2023
0094401
add FIXME notes to `create_organizer_tables()`
vpchung Nov 22, 2023
6caab73
add annotations for project
vpchung Nov 22, 2023
db4fe84
set custom permissions for data folders
vpchung Nov 22, 2023
29211bc
create one queue per task
vpchung Nov 22, 2023
67befa5
fix task tab creation
vpchung Nov 22, 2023
2b2e225
replace `format()` with f-strings
vpchung Nov 22, 2023
04bfe46
update logging info
vpchung Nov 22, 2023
3868991
add more logging
vpchung Nov 22, 2023
02165f6
fix
vpchung Nov 22, 2023
4273467
add step of adding project to project view
vpchung Nov 22, 2023
4d90255
lint
vpchung Nov 22, 2023
1161a72
one more lint
vpchung Nov 22, 2023
710ad23
Merge pull request #252 from Sage-Bionetworks/feat-add_portal_challenge
vpchung Nov 22, 2023
d8661c7
Add package maintenance warning to readme
vpchung Nov 27, 2023
fa767f1
Release v4.3.0 (#253)
vpchung Nov 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: psf/black@stable

finish-coveralls:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4.7.1
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sphinx-ghpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Standard drop-in approach that should work for most people.
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
# Great extra actions to compose with:
# Create an artifact of the html output.
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v3.1.3
with:
name: DocumentationHTML
path: docs/_build/html/
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Sage Bionetworks Challenge Utilities

> [!WARNING]
> **Starting early 2024, this package will no longer be maintained.** We are in the process of creating a new-and-improved version of `challengeutils` - more information coming soon!

[![Get challengeutils from PyPI](https://img.shields.io/pypi/v/challengeutils.svg?style=for-the-badge&logo=pypi)](https://pypi.python.org/pypi/challengeutils) [![Docker Automated](https://img.shields.io/docker/automated/sagebionetworks/challengeutils.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/sagebionetworks/challengeutils/) [![Docker Pull](https://img.shields.io/docker/pulls/sagebionetworks/challengeutils.svg?style=for-the-badge&logo=docker)](https://hub.docker.com/r/sagebionetworks/challengeutils/) [![Coverage Status](https://img.shields.io/coveralls/github/Sage-Bionetworks/challengeutils.svg?&style=for-the-badge&label=coverage&logo=Coveralls)](https://coveralls.io/github/Sage-Bionetworks/challengeutils)


Expand Down
48 changes: 48 additions & 0 deletions challengeutils/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from . import (
annotations,
createchallenge,
create_portal_challenge,
challenge,
cheat_detection,
evaluation_queue,
Expand Down Expand Up @@ -81,6 +82,33 @@ def command_createchallenge(syn, args):
return challenge_components


def command_create_portal_challenge(syn, args):
"""Creates a challenge on the Sage Challenge Portal.

>>> challengeutils create-portal-challenge "Challenge Name Here" [-n <int>]
"""
challenge_components = create_portal_challenge.main(
syn, args.challenge_name, args.tasks_count, args.livesiteid
)
# component: project or team
# componentid: project id or teamid
urls = {}
for component, componentid in challenge_components.items():
if component.endswith("projectid"):
urls[component] = f"https://www.synapse.org/#!Synapse:{componentid}"
elif component.endswith("teamid"):
urls[component] = f"https://www.synapse.org/#!Team:{componentid}"
urls["name"] = args.challenge_name
text = (
"{name} (Production site): {live_projectid}",
"{name} (Staging site): {staging_projectid}",
"{name} (Participant team): {organizer_teamid}",
"{name} (Organizer team): {participant_teamid}",
)
print("\n" + "\n".join(text).format(**urls))
return challenge_components


def command_query(syn, args):
"""Command line convenience function to call evaluation queue query
Evaluation queues offer a separate query service from the rest of Synapse.
Expand Down Expand Up @@ -439,6 +467,26 @@ def build_parser():
)
parser_createchallenge.set_defaults(func=command_createchallenge)

parser_create_portal_challenge = subparsers.add_parser(
"create-portal-challenge",
help="Create a Sage Challenge Portal challenge from template",
)
parser_create_portal_challenge.add_argument("challenge_name", help="Challenge name")
parser_create_portal_challenge.add_argument(
"-t",
"--tasks_count",
type=int,
default=1,
help=("Number of challenge tasks (default: 1)"),
)
parser_create_portal_challenge.add_argument(
"--livesiteid",
help=(
"Option to specify the live site synapse Id" " there is already a live site"
),
)
parser_create_portal_challenge.set_defaults(func=command_create_portal_challenge)

parser_mirrorwiki = subparsers.add_parser(
"mirror-wiki",
help="Mirrors (sync) wiki pages by using the wikipage titles between "
Expand Down
2 changes: 1 addition & 1 deletion challengeutils/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.2.1"
__version__ = "4.3.0"
Loading