Skip to content

Commit

Permalink
scholar validator
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVoros committed Sep 27, 2024
1 parent 7a55e1f commit 198d48e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/scholar/builder/contexts/validators.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from enschema import Schema, Optional, Regex

from core.builder.validator import FileSystemValidator, File
from core.builder.validator import FileSystemValidator, File, FileOrLink


class ScholarValidator(FileSystemValidator):
_schema = Schema({
Optional(Regex(r'[\w-]+\.(png|jpg|svg|gp|py|dat)')): File,
Optional(Regex(r'[\w-]+\.(png|jpg|svg|gp|py|dat)')): FileOrLink,
Optional(Regex(r'[\w-]+')): {
Optional('problem.md'): File,
Optional('solution.md'): File,
Optional(Regex(r'[\w-]+\.(png|jpg|svg|gp|py|dat)')): File,
Optional(Regex(r'[\w-]+\.(png|jpg|svg|gp|py|dat)')): FileOrLink,
},
Optional('text.md'): File,
'meta.yaml': File,
Expand Down

0 comments on commit 198d48e

Please sign in to comment.