Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ef16392
Create indexer
ifndefJOSH Nov 4, 2022
8f181db
Index webpage
ifndefJOSH Nov 4, 2022
5156efd
Basic skeleton for webpage
ifndefJOSH Nov 4, 2022
e96dc76
Added some basic design for website
ifndefJOSH Nov 4, 2022
50de69b
First draft of index
ifndefJOSH Nov 4, 2022
bf1453f
Added some more css
ifndefJOSH Nov 5, 2022
562d4f0
Added footer and some better stylesheet code
ifndefJOSH Nov 6, 2022
89451d4
Added some better UI for the search function
ifndefJOSH Nov 7, 2022
50ef380
TODO: get tags
ifndefJOSH Nov 7, 2022
41fb1ea
Updated index
ifndefJOSH Nov 7, 2022
a1dfdc0
updated index
ifndefJOSH Nov 7, 2022
2d28c30
SBML files are XML
ifndefJOSH Nov 7, 2022
b00e901
Added options to advanced and added suggestions bar
ifndefJOSH Nov 7, 2022
8c0c7bd
Added search suggestions
ifndefJOSH Nov 7, 2022
0c361a8
refined search suggestions
ifndefJOSH Nov 7, 2022
5e16146
Added tag functionality
ifndefJOSH Nov 8, 2022
75fdb47
suggestions hides now when clicked away from
ifndefJOSH Nov 8, 2022
efdf34b
No longer allows duplicate tags
ifndefJOSH Nov 8, 2022
ce47ddb
More tag features
ifndefJOSH Nov 8, 2022
a5d9c65
Added dark mode, and responsive design for mobile
ifndefJOSH Nov 9, 2022
6a109b2
Better unicode handling
ifndefJOSH Nov 10, 2022
19c1bfa
Fixed mistakes Lukas pointed out
ifndefJOSH Nov 10, 2022
56a2c42
Add createLightMode()
ifndefJOSH Nov 16, 2022
733a2f4
Auto dark mode checkbox
ifndefJOSH Nov 16, 2022
d6ad028
style for links--there was a slight oversight
ifndefJOSH Nov 23, 2022
77a26d7
Merge remote-tracking branch 'origin/Restructure' into create-index
ifndefJOSH Dec 1, 2022
d2f75c8
Added load index and load tags
ifndefJOSH Dec 14, 2022
7424841
a couple changes
ifndefJOSH Dec 14, 2022
1443328
Added small comment
ifndefJOSH Dec 19, 2022
84e1330
Begin formalizing specifications
gerbs-11 Jan 13, 2023
8e89928
Simple meta.json example
gerbs-11 Jan 13, 2023
02bff73
Add MIRIAM to spec
gerbs-11 Jan 13, 2023
18ff103
Attempt adding metadata validation workflow
gerbs-11 Jan 18, 2023
ee39d33
Workflow test push
gerbs-11 Jan 18, 2023
9b0200b
Workflow syntax fix
gerbs-11 Jan 18, 2023
22d4204
Add empty downloader script
gerbs-11 Jan 18, 2023
f74c385
Fix manger script path in workflow
gerbs-11 Jan 18, 2023
464f137
More workflow debugging
gerbs-11 Jan 18, 2023
17a8b0b
Try fixing workflow again
gerbs-11 Jan 18, 2023
dbf098e
Add execute permission to scripts
gerbs-11 Jan 18, 2023
a5b3b7a
Moved indexer script to Scripts folder
ifndefJOSH Jan 24, 2023
c513111
Merge branch 'main' into spec
ifndefJOSH Jun 13, 2023
cb159b3
Use changes as affected in main branch
ifndefJOSH Jun 13, 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
36 changes: 36 additions & 0 deletions .github/workflows/validate_metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Validate all metadata

name: Validate Metadata

# Controls when the workflow will run
on:
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
check:

# For debugging. Only run from "spec" branch for now
if: github.head_ref == 'spec'

# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'

#- name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# if [ -f Scripts/requirements.txt ]; then pip install -r requirements.txt; fi

- name: Run metadata validation script
run: ./Scripts/manager.py validate
6 changes: 6 additions & 0 deletions Scripts/downloader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python3

import sys

print("This script is currently under development")
sys.exit(1)
50 changes: 50 additions & 0 deletions Scripts/indexer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env python3

import os

class Formats:
PRISM = 0
IVY = 1
SBML = 2
JANI = 3
UNKNOWN = 4
formatNames = ["Prism", "IVy", "SBML", "JANI", "Unknown"]

o = '{'
c = '}'

def getTags(fullPath):
return [] # TODO

def getFormat(fileName):
if fileName.endswith(".prism") or fileName.endswith(".sm"):
return Formats.PRISM
elif fileName.endswith(".ivy"):
return Formats.IVY
elif fileName.endswith(".sbml") or fileName.endswith(".xml"):
return Formats.SBML
elif fileName.endswith(".jani"):
return Formats.JANI
return Formats.UNKNOWN

def createJSONFromFolder(folder, indentationLevel = 0):
json = "["
tabs = "\t" * indentationLevel
tabsExtra = f"{tabs}\t"
for f in os.listdir(folder):
if os.path.isdir(folder + '/' + f) and not f.startswith('.'):
json += f"\n{tabs}{o}\n{tabsExtra}\"name\":\"{f}\"\n{tabsExtra}, \"type\":\"folder\"\n{tabsExtra}, \"contents\":{createJSONFromFolder(folder + '/' + f, indentationLevel + 1)} \n{tabs}{c}"
elif os.path.isfile(folder + '/' + f):
tags = ""
for tag in getTags(folder + '/' + f):
tags += f"\"tag\","
tags = f"[{tags[:len(tags) - 1]}]"
fileFormatName = Formats.formatNames[getFormat(f)]
json += f"\n{tabs}, {o}\n{tabsExtra}\"name\":\"{f}\"\n{tabsExtra}, \"type\":\"file\"\n{tabsExtra}, \"tags\":{tags}"
json += f"\n{tabsExtra}, \"format\":\"{fileFormatName}\"\n{tabs}{c}"
json += f"\n{tabs}]"
return json

if __name__=='__main__':
print(createJSONFromFolder(os.getcwd()))

6 changes: 6 additions & 0 deletions Scripts/manager.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python3

import sys

print("This script is currently under development")
sys.exit(1)
Loading