Skip to content

Update download-neo4j.yml #23

Update download-neo4j.yml

Update download-neo4j.yml #23

name: download-neo4j
on: [push]
jobs:
job_1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Download Neo4j
run: |
curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key |sudo gpg --dearmor -o /usr/share/keyrings/neo4j.gpg
echo "deb [signed-by=/usr/share/keyrings/neo4j.gpg] https://debian.neo4j.com stable 4.1" | sudo tee -a /etc/apt/sources.list.d/neo4j.list
sudo apt update
sudo apt install neo4j
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-tests.txt
- name: Download OSF files #osf -p 6jtc9 fetch Datasets/Datasets.zip Datasets.zip; unzip Datasets.zip;
run: |
echo 'Downloading OSF data...';
osf -p 6jtc9 fetch Datasets/petagraph_v5.zip petagraph_v5.zip;
unzip petagraph_v5.zip;
echo 'Finished Downloading and unzipping....';
ls;
- name: Give permissions
run: |
sudo chmod 777 -R /var/lib/neo4j/;
sudo chmod 777 -R /etc/neo4j;
sudo chmod 777 -R /var/log/neo4j/;
sudo chmod 777 -R /var/run/neo4j
- name: test mv
run: |
mv import/*.csv /var/lib/neo4j/import/;
ls /var/lib/neo4j/import/;
- name: Build Petagraph
run: |
rm -rf data/databases/*
rm -rf data/transactions/*
bin/neo4j-admin import --verbose --nodes=Semantic="import/TUIs.csv" --nodes=Concept="import/CUIs.csv" --nodes=Code="import/CODEs.csv" --nodes=Term="import/SUIs.csv" --nodes=Definition="import/DEFs.csv" --relationships=ISA_STY="import/TUIrel.csv" --relationships=STY="import/CUI-TUIs.csv" --relationships="import/CUI-CUIs.csv" --relationships=CODE="import/CUI-CODEs.csv" --relationships="import/CODE-SUIs.csv" --relationships=PREF_TERM="import/CUI-SUIs.csv" --relationships=DEF="import/DEFrel.csv" --skip-bad-relationships --skip-duplicate-nodes
neo4j start