-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: remove self example from openapi (#3173) * chore: cherry pick changes from #3172 surface dataset batch_condition in curation API (#3177) * feat: surface dataset batch_condition in curation API * resolve merge conflict * fix: document upload links that are suported (#3176) * Document the types of links that are supported * Update documentation * docs: Renaming scExpression to Gene Expression (#3091) * docs: Renaming scExpression to Gene Expression - changing route to gene-expression instead of scExpression * chore(fe): upgrade to nextjs12 blueprint4 node16 (#3119) * chore(fe): upgrade to nextjs12 blueprint4 node16 * upgrade packages to resolve vulns * fix(lint): lint stuff * fix(lint): lint stuff * restore css usage * update Dockerfile * clean up css * fix bp4 css change * update docsite image css * fix: remove access_type from curation API (#3080) * remove access_type form curation API * remove is_allowed check from reshape_for_curation_api * update openapi * Fix the error message when curator is used by not a super curator * fix errors * Move all reshaping collection code into reshape_for_curation_api. * fix: change the datasets response shape (#3178) change name to title in dataset change is_primary_data to list of boolean in dataset * fix(curation api):Remove h5ad suffix requirements (#3151) - remove .h5ad suffix from uploads and curator tags - check for embedded UUID in curator tag * fix: backend/Makefile local db improvements, migration README (#3029) * fix: backend/Makefile local db improvements, migration README - Rename the targets for loading data and loading schema into local test db - Adapt the commands for the above two scripts to actually work (??) * doc updates * additional doc update * style: remove unused regex and consolidate curator tag logic (#3200) Co-authored-by: Trent Smith <1429913+Bento007@users.noreply.github.com> Co-authored-by: Nayib Gloria <55710092+nayib-jose-gloria@users.noreply.github.com> Co-authored-by: ashin-czi <109984998+ashin-czi@users.noreply.github.com> Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com> Co-authored-by: Trent Smith <1429913+Bento007@users.noreply.github.com> Co-authored-by: Nayib Gloria <55710092+nayib-jose-gloria@users.noreply.github.com> Co-authored-by: ashin-czi <109984998+ashin-czi@users.noreply.github.com> Co-authored-by: Timmy Huang <tihuan@users.noreply.github.com>
- Loading branch information
1 parent
6881de9
commit b05fde4
Showing
128 changed files
with
22,339 additions
and
4,912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,3 +141,6 @@ dmypy.json | |
.envrc | ||
.env.ecr | ||
*.sqlc | ||
|
||
# Typescript | ||
tsconfig.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
import re | ||
|
||
USERNAME_REGEX = r"(?P<username>[\w\-\|]+)" | ||
ID_REGEX = r"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" | ||
EXTENSION_REGEX = r"(?P<extension>h5ad)" | ||
DATASET_ID_REGEX = f"(?P<dataset_id>{ID_REGEX})" | ||
COLLECTION_ID_REGEX = f"(?P<collection_id>{ID_REGEX})" | ||
CURATOR_TAG_PREFIX_REGEX = r"(?P<tag_prefix>.*)" | ||
CONTROL_CHARS = r"[\x00-\x1f\x7f-\xa0]" | ||
CURATOR_TAG_REGEX = r"(?P<tag>.+)" | ||
|
||
|
||
def validate_curator_tag(curator_tag: str) -> bool: | ||
""" | ||
Verify the correct curator tag format is obeyed (i.e., it is not a UUID) | ||
:param curator_tag: the tag name to validate. | ||
:return: True if CURATOR_TAG_REGEX is matched. | ||
""" | ||
regex = f"^({DATASET_ID_REGEX}|{CURATOR_TAG_REGEX})$" | ||
matched = re.match(regex, curator_tag) | ||
if matched: | ||
matches = matched.groupdict() | ||
if matches.get("tag"): | ||
return True | ||
elif matches.get("dataset_id"): | ||
raise ValueError("Curator tag cannot assume UUID format.") | ||
raise ValueError("Curator tag cannot be empty.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.