Skip to content

Commit

Permalink
Merge pull request #19 from usegalaxy-au/dev
Browse files Browse the repository at this point in the history
Fix pydantic schema to include accordion item inputs
  • Loading branch information
neoformit authored Dec 16, 2024
2 parents 079b465 + 4a1ab86 commit 6947cb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/labs/lab_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def html_tags(v: str) -> str:
]


class ItemInput(BaseModel):
"""An expected dataset input for a Galaxy tool."""
datatypes: Optional[list[str]] = []
label: Optional[str] = ''


class IconEnum(str, Enum):
"""Define material icon types for buttons."""
run = 'run' # play_arrow
Expand Down Expand Up @@ -62,6 +68,7 @@ class TabItem(BaseModel):
view_md: Optional[MarkdownStr] = None
view_icon: Optional[IconEnum] = None
exclude_from: Optional[list[str]] = []
inputs: Optional[list[ItemInput]] = None

@field_validator(
'title_md', 'description_md', 'button_md', 'view_md',
Expand Down Expand Up @@ -106,7 +113,7 @@ class LabSchema(BaseModel, extra='allow'):
"""Validate Galaxy Lab content."""
site_name: str
lab_name: str
nationality: str
nationality: Optional[str] = ''
galaxy_base_url: str
subdomain: str
root_domain: str
Expand Down
4 changes: 3 additions & 1 deletion app/labs/static/labs/css/labs.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ a:hover .lab-header {
}
.table-inputs td {
padding: .5rem 1rem;
border: 1px solid #ddd;
}
.table-inputs tr:not(:last-child) {
border-bottom: 1px solid #ddd;
}
.contributor {
margin: 0 4px;
Expand Down

0 comments on commit 6947cb7

Please sign in to comment.