Skip to content

Commit

Permalink
Merge pull request #14 from nrc-cnrc/UI_changes
Browse files Browse the repository at this point in the history
UI changes
  • Loading branch information
dlothian authored Jan 15, 2024
2 parents 324a6c9 + fc348d7 commit 23f4991
Show file tree
Hide file tree
Showing 21 changed files with 15,098 additions and 48,148 deletions.
23 changes: 23 additions & 0 deletions .github/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy Site
on:
push:
branches:
- main
jobs:
build-and-deploy:
#concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install and Build 🔧
run: |
cd VerbApp
npm install
ionic build --prod
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: VerbApp/www
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,5 @@ dmypy.json
.pyre/

DataBuilder/JSON
VerbApp/src/assets/JSON
VerbApp/src/assets/JSON/*
DataBuilder/*.csv
5 changes: 3 additions & 2 deletions DataBuilder/src/csv_to_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def cleanData(self):
f = open(self.input_file, 'r')
text = f.readlines()

lines = [line.lower() for line in text]
lines = [line for line in text]
# lines = [line.lower() for line in text]
lines = [re.sub(r" ,", ",", line) for line in lines]
lines = [re.sub(r", ", ",", line) for line in lines]
self.input_file = self.input_file[:self.input_file.find(".csv")] + "_temp.csv"
Expand Down Expand Up @@ -101,7 +102,7 @@ def assignRemoveAttributesTitles(self):
for o in primary:
if o not in headers:
print("------------------")
print("[FATAL ERROR]\n{} - Invalid column name. Check order.csv file.".format(o))
print("[FATAL ERROR]\n{} - Invalid column name. Check order file.".format(o))
mispelt = list()
for h in headers:
if textdistance.levenshtein(o, h) <=2:
Expand Down
6 changes: 3 additions & 3 deletions DataBuilder/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ def buildFiles(input_file, tree_order, conjugation_order, JSON_path):
c2d = CSVtoDict(input_file=input_file, order=tree_order)
dict_list, attr_dict_list = c2d.execute()
tb = TreeBuilder(dict_list, "category_tree.json", tree_order, JSON_path)
ob = OptionBuilder(attr_dict_list, tree_order, JSON_path, case="t")
ob = OptionBuilder(attr_dict_list, tree_order, JSON_path, case="u")

c2d = CSVtoDict(input_file=input_file, order=conjugation_order)
dict_list, attr_dict_list = c2d.execute()
tb = TreeBuilder(dict_list, "conjugation.json", conjugation_order, JSON_path, case="t")
tb = TreeBuilder(dict_list, "conjugation.json", conjugation_order, JSON_path, case="u")


def reorderJSON(conjugation_order, path):
Expand All @@ -146,7 +146,7 @@ def reorderJSON(conjugation_order, path):
l = [conjugation_order, d]
f.close()
with open(path+'conjugation.json', 'w') as f:
json.dump(l, f, indent=4)
json.dump(l, f)
f.close()


Expand Down
4 changes: 2 additions & 2 deletions DataBuilder/src/tree_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, input_dict, output_file, keys, path, case="l"):
self.output_file = output_file
self.keys = keys
self.path = path
self.case = case
self.case = "s"
self.toTree()
self.duplicates = set()

Expand All @@ -44,7 +44,7 @@ def toTree(self):

self.output_file = self.path + self.output_file
with open(self.output_file, 'w') as json_file:
json.dump(tree, json_file,indent=4, sort_keys=True)
json.dump(tree, json_file, sort_keys=True)

return

Expand Down
Loading

0 comments on commit 23f4991

Please sign in to comment.