Skip to content

Commit

Permalink
Refactor repository & add iso639-1
Browse files Browse the repository at this point in the history
  • Loading branch information
LesterLyu committed Sep 14, 2023
1 parent 7427ebf commit 1471830
Show file tree
Hide file tree
Showing 18 changed files with 2,811 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test and Deploy

on:
push:
branches: [ main ]

jobs:
build-frontend:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
architecture: x64

- name: Install owlready2
run: pip3 install git+https://github.com/csse-uoft/owlready2.git

- name: Test ontologies
run: python -m src.main

- name: Deploy Ontologies to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ontologies
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
| dct version 2 | http://purl.org/dc/terms/ | https://csse-uoft.github.io/ontologies/dct.rdf | cannot download directly from owlready2 due to potential websites protection |
| rdfs | http://www.w3.org/2000/01/rdf-schema# | https://csse-uoft.github.io/ontologies/rdfs.owl | resaved from Protege to fix compatibility issue with owlready2 |
| void | http://rdfs.org/ns/void# | https://csse-uoft.github.io/ontologies/void.rdf | Dowloaded to ensure persistent access |
| iso639-1 | http://id.loc.gov/vocabulary/iso639-1/ | https://csse-uoft.github.io/ontologies/iso639-1.rdf | Dowloaded to ensure persistent access |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2,767 changes: 2,767 additions & 0 deletions ontologies/iso639-1.rdf

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions tests/test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from owlready2 import default_world
import os

dir_path = 'ontologies'
def try_load():
for file_path in os.listdir(dir_path):
if os.path.isfile(os.path.join(dir_path, file_path)):
try:
default_world.get_ontology(os.path.join(dir_path, file_path)).load()
except:
raise ValueError("Unable to load " + os.path.join(dir_path, file_path))

try_load()

0 comments on commit 1471830

Please sign in to comment.