-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from cedricdcc/cedric_injest_attempt
Cedric injest attempt
- Loading branch information
Showing
33 changed files
with
1,729 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker/**/*.sh text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Python Linting | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
paths: | ||
- 'docker/lwua-ingest/**/*.py' | ||
- 'docker/lwua-dereferencer/**/*.py' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10.6 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install black autopep8 | ||
- name: Run Black | ||
run: | | ||
black docker/lwua-ingest/ | ||
black docker/lwua-dereferencer/ | ||
- name: Run autopep8 | ||
run: | | ||
autopep8 --in-place --aggressive --aggressive --max-line-length 79 --recursive docker/lwua-ingest/ | ||
autopep8 --in-place --aggressive --aggressive --max-line-length 79 --recursive docker/lwua-dereferencer/ | ||
- name: Commit and push changes | ||
run: | | ||
git config --global user.name 'cedricdcc' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add -A | ||
git commit -m "Automated python code formatting" || exit 0 | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Python Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'docker/lwua-ingest/lwua-py/**/*.py' | ||
pull_request: | ||
paths: | ||
- 'docker/lwua-ingest/lwua-py/**/*.py' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out source repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10.6 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
cd docker/lwua-ingest/lwua-py | ||
poetry install | ||
- name: Run pytest | ||
run: | | ||
cd docker/lwua-ingest/lwua-py | ||
poetry run pytest ./tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,4 @@ | ||
#!/bin/bash -ex | ||
|
||
GDBPIDF="/tmp/init-graphdb-serv.pid" | ||
GDBOUTF="/tmp/init-graphdb-out.txt" | ||
|
||
start_graphdb(){ | ||
rm -f ${GDBPIDF} | ||
graphdb -s -p ${GDBPIDF} >${GDBOUTF} 2>&1 & | ||
sleep 1 | ||
} | ||
|
||
wait_graphdb(){ | ||
count=0 | ||
while ! nc -z localhost 7200; do | ||
count=$((count+1)) | ||
if [ $count -gt 1000 ]; then | ||
return | ||
fi | ||
# else | ||
sleep 0.1 # wait for 1/10 of the second before check again | ||
done | ||
} | ||
|
||
stop_graphdb(){ | ||
kill -9 $(cat ${GDBPIDF}) | ||
sleep 1 | ||
rm -f ${GDBPIDF} | ||
rm -f ${GDBOUTF} | ||
} | ||
|
||
createdb() { | ||
curl -X POST http://localhost:7200/rest/repositories -H 'Content-Type: multipart/form-data' -F [email protected] | ||
} | ||
|
||
|
||
# one could do it like this | ||
#start_graphdb | ||
#wait_graphdb | ||
#createdb | ||
#wait_configdb | ||
#stop_graphdb | ||
#!/bin/bash | ||
|
||
# but actually this just works too: | ||
REPODIR="/opt/graphdb/home/data/repositories/lwua23" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM jupyter/base-notebook | ||
|
||
RUN pip install pykg2tbl | ||
|
||
VOLUME /notebooks | ||
WORKDIR /notebooks | ||
WORKDIR /notebooks | ||
|
||
COPY ./requirements.txt /requirements.txt | ||
RUN pip install -r /requirements.txt |
Oops, something went wrong.