Skip to content

Commit

Permalink
feature/add icon identifiers to models.yaml and ModelConfig (#219)
Browse files Browse the repository at this point in the history
# Added
- add icon identifiers to models.yaml and ModelConfig
  • Loading branch information
cutoffthetop authored Dec 18, 2024
1 parent 3c456cb commit bd04729
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
python: python3.11
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
rev: v0.8.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -25,7 +25,7 @@ repos:
- id: fix-byte-order-marker
name: byte-order
- repo: https://github.com/pdm-project/pdm
rev: 2.20.1
rev: 2.22.0
hooks:
- id: pdm-lock-check
name: pdm
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added

- redirect to original URL after login
- add icon identifiers to models.yaml and ModelConfig

### Changes

Expand Down
3 changes: 2 additions & 1 deletion mex/editor/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class NavItem(rx.Base):

title: str
href: str = "/"
href_template: str
href_template: str = "/"
underline: str = "none"


Expand All @@ -39,6 +39,7 @@ class ModelConfig(BaseModel):

title: str
preview: list[str] = []
icon: str


MODEL_CONFIG_BY_STEM_TYPE = TypeAdapter(dict[str, ModelConfig]).validate_python(
Expand Down
18 changes: 18 additions & 0 deletions mex/editor/models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ AccessPlatform:
- unitInCharge
- endpointType
- technicalAccessibility
icon: app-window
Activity:
title: title
preview:
Expand All @@ -13,31 +14,43 @@ Activity:
- responsibleUnit
- start
- end
icon: circle-gauge
BibliographicResource:
title: title
preview:
- bibliographicResourceType
- publicationYear
- creator
- accessRestriction
icon: book-marked
Consent:
title: hasDataSubject
preview:
- hasConsentStatus
- isIndicatedAtTime
icon: badge-check
ContactPoint:
title: email
icon: inbox
Distribution:
title: title
preview:
- mediaType
- issued
- accessRestriction
icon: container
Organization:
title: officialName
preview:
- shortName
- alternativeName
- wikidataId
icon: building
OrganizationalUnit:
title: shortName
preview:
- name
icon: door-open
Person:
title: fullName
preview:
Expand All @@ -46,25 +59,30 @@ Person:
- memberOf
- email
- orcidId
icon: circle-user-round
PrimarySource:
title: title
preview:
- contact
- unitInCharge
icon: hard-drive
Resource:
title: title
preview:
- unitInCharge
- theme
- resourceCreationMethod
- accessRestriction
icon: archive
Variable:
title: label
preview:
- dataType
- belongsTo
- usedIn
icon: box
VariableGroup:
title: label
preview:
- containedBy
icon: boxes

0 comments on commit bd04729

Please sign in to comment.