Skip to content

Commit

Permalink
✨ Add Build and Deploy method
Browse files Browse the repository at this point in the history
  • Loading branch information
hayesall committed Jul 12, 2021
1 parent bf2d760 commit f9af187
Show file tree
Hide file tree
Showing 20 changed files with 189 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and Release Datasets
on:
release:
types: [created]

jobs:
generate:
name: Build Dataset Archives
runs-on: ubuntu-latest
steps:
- name: 👀 Checkout
users: actions/checkout@v2
- name: 🏗️ Generate Artifacts
run: |
bash zip_artifacts.sh
- name: 📤 Upload Artifacts
uses: skx/github-action-publish-binaries@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'build/*.zip'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
Empty file added srlearn/README.md
Empty file.
1 change: 1 addition & 0 deletions srlearn/toy_cancer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Toy Cancer Dataset
4 changes: 4 additions & 0 deletions srlearn/toy_cancer/toy_cancer/background.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
friends(+person,-person).
friends(-person,+person).
smokes(+person).
cancer(+person).
13 changes: 13 additions & 0 deletions srlearn/toy_cancer/toy_cancer/test/test_facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
friends(zod,xena).
friends(xena,watson).
friends(watson,voldemort).
friends(voldemort,yoda).
friends(yoda,zod).
friends(xena,zod).
friends(watson,xena).
friends(voldemort,watson).
friends(yoda,voldemort).
friends(zod,yoda).
smokes(zod).
smokes(xena).
smokes(yoda).
2 changes: 2 additions & 0 deletions srlearn/toy_cancer/toy_cancer/test/test_neg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cancer(voldemort).
cancer(watson).
3 changes: 3 additions & 0 deletions srlearn/toy_cancer/toy_cancer/test/test_pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cancer(zod).
cancer(xena).
cancer(yoda).
15 changes: 15 additions & 0 deletions srlearn/toy_cancer/toy_cancer/train/train_facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
friends(alice,bob).
friends(alice,fred).
friends(chuck,bob).
friends(chuck,fred).
friends(dan,bob).
friends(earl,bob).
friends(bob,alice).
friends(fred,alice).
friends(bob,chuck).
friends(fred,chuck).
friends(bob,dan).
friends(bob,earl).
smokes(alice).
smokes(chuck).
smokes(bob).
2 changes: 2 additions & 0 deletions srlearn/toy_cancer/toy_cancer/train/train_neg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cancer(dan).
cancer(earl).
4 changes: 4 additions & 0 deletions srlearn/toy_cancer/toy_cancer/train/train_pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cancer(alice).
cancer(bob).
cancer(chuck).
cancer(fred).
1 change: 1 addition & 0 deletions srlearn/toy_father/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Toy Father Dataset
4 changes: 4 additions & 0 deletions srlearn/toy_father/toy_father/background.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
male(+name).
childof(+name,+name).
siblingof(+name,-name).
father(+name,+name).
11 changes: 11 additions & 0 deletions srlearn/toy_father/toy_father/test/test_facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
male(mrbennet).
male(mrlucas).
male(darcy).
childof(mrbennet,elizabeth).
childof(mrsbennet,elizabeth).
childof(mrbennet,jane).
childof(mrsbennet,jane).
childof(mrlucas,charlotte).
childof(mrslucas,charlotte).
siblingof(jane,elizabeth).
siblingof(elizabeth,jane).
4 changes: 4 additions & 0 deletions srlearn/toy_father/toy_father/test/test_neg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
father(charlotte,mrsbennet).
father(jane,mrlucas).
father(mrsbennet,mrbennet).
father(jane,elizabeth).
3 changes: 3 additions & 0 deletions srlearn/toy_father/toy_father/test/test_pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
father(elizabeth,mrbennet).
father(jane,mrbennet).
father(charlotte,mrlucas).
41 changes: 41 additions & 0 deletions srlearn/toy_father/toy_father/train/train_facts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
male(mrgranger).
male(jamespotter).
male(harrypotter).
male(luciusmalfoy).
male(dracomalfoy).
male(arthurweasley).
male(ronweasley).
male(fredweasley).
male(georgeweasley).
male(hagrid).
male(dumbledore).
male(xenophiliuslovegood).
male(cygnusblack).
siblingof(ronweasley,fredweasley).
siblingof(ronweasley,georgeweasley).
siblingof(ronweasley,ginnyweasley).
siblingof(fredweasley,ronweasley).
siblingof(fredweasley,georgeweasley).
siblingof(fredweasley,ginnyweasley).
siblingof(georgeweasley,ronweasley).
siblingof(georgeweasley,fredweasley).
siblingof(georgeweasley,ginnyweasley).
siblingof(ginnyweasley,ronweasley).
siblingof(ginnyweasley,fredweasley).
siblingof(ginnyweasley,georgeweasley).
childof(mrgranger,hermione).
childof(mrsgranger,hermione).
childof(jamespotter,harrypotter).
childof(lilypotter,harrypotter).
childof(luciusmalfoy,dracomalfoy).
childof(narcissamalfoy,dracomalfoy).
childof(arthurweasley,ronweasley).
childof(mollyweasley,ronweasley).
childof(arthurweasley,fredweasley).
childof(mollyweasley,fredweasley).
childof(arthurweasley,georgeweasley).
childof(mollyweasley,georgeweasley).
childof(arthurweasley,ginnyweasley).
childof(mollyweasley,ginnyweasley).
childof(xenophiliuslovegood,lunalovegood).
childof(cygnusblack,narcissamalfoy).
21 changes: 21 additions & 0 deletions srlearn/toy_father/toy_father/train/train_neg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
father(harrypotter,mrgranger).
father(harrypotter,mrsgranger).
father(georgeweasley,xenophiliuslovegood).
father(luciusmalfoy,xenophiliuslovegood).
father(harrypotter,hagrid).
father(ginnyweasley,dracomalfoy).
father(hagrid,dracomalfoy).
father(hagrid,dumbledore).
father(lunalovegood,dumbledore).
father(hedwig,narcissamalfoy).
father(hedwig,lunalovegood).
father(ronweasley,hedwig).
father(mollyweasley,cygnusblack).
father(arthurweasley,mollyweasley).
father(georgeweasley,fredweasley).
father(fredweasley,georgeweasley).
father(ronweasley,georgeweasley).
father(ronweasley,hermione).
father(dracomalfoy,narcissamalfoy).
father(hermione,mrsgranger).
father(ginnyweasley,mollyweasley).
5 changes: 5 additions & 0 deletions srlearn/toy_father/toy_father/train/train_pos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
father(harrypotter,jamespotter).
father(dracomalfoy,luciusmalfoy).
father(ginnyweasley,arthurweasley).
father(ronweasley,arthurweasley).
father(fredweasley,arthurweasley).
33 changes: 33 additions & 0 deletions zip_artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# Copyright © Alexander L. Hayes
# MIT License

# SYNOPSIS: Create zip artifacts of datasets for distribution.

# OVERVIEW: This assumes that data sets follow the pattern:
# `srlearn/name/name/`
#
# All zipped copies will be placed in the `build/` directory at the
# base of the repository.

echo "Creating build directory"
rm -rf build
mkdir build

(
cd srlearn/

for ds in *; do

if [[ $ds != "README.md" ]]; then

(
echo "Zipping $ds"
cd $ds
zip -r ../../build/$ds.zip $ds
)

fi
done
)

0 comments on commit f9af187

Please sign in to comment.