-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cedric injest attempt #9
Merged
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
3ce6908
Merge pull request #5 from lifewatch/fix/docker-names
laurianvm 08ab97c
Merge pull request #7 from lifewatch/fix/jupyter-token
laurianvm af750b2
Merge branch 'main' of github.com:lifewatch/user-analysis-2023 into t…
marc-portier 3afba5d
realized we need the data for the ingest
marc-portier 342d63e
docker image builds python using poetry
marc-portier 3a3c169
apply image names
marc-portier 8d6bc1a
getting the graphdb to work together with the sparqlwrapper
marc-portier d39c314
minor cleanup
marc-portier 1215308
Merge branch 'fix/docker-names' of github.com:lifewatch/user-analysis…
marc-portier c2d53c5
create a local graphd-db image that initializes the database
marc-portier 97586d3
introduce the notebooks so they become available in the jupyter
marc-portier e0eefa2
use the new feaures of the jupyter and graphdb images
marc-portier 30bd04f
cleanup not needed test script
marc-portier a9b85af
ingest of file succeeded
marc-portier 417766c
prefer https for schema.org
marc-portier c71976b
rename docker/info script, introducing jq and some enhancements
marc-portier d9f8ce1
fix error in copy statement (2nd arg required)
marc-portier edeb104
introduce external shared logging volume
marc-portier b897e68
updated deps
marc-portier 2f90b6b
updated deps
marc-portier 0983c1d
ensure the log folder exists
marc-portier 846ec54
fix path to data - as it is distinct to the location inside the grpah…
marc-portier c31846c
use the new external logging/ folder
marc-portier 892abd6
extended readme
marc-portier 907d87d
room for more dependencies in ipynb context
marc-portier 523df6e
as is current dump of progress towards autodetection
marc-portier 7eb3d96
normalise dos2unix for /docker/**/*.sh files
cedricdcc 8b93eb1
added watcher to injest
cedricdcc 4378715
deleted non essential code fr starting graphdb-database
cedricdcc e41d322
watcher works, iri injest error on graph modifications though
cedricdcc e66d915
working injest , no auto
cedricdcc 6a83d3e
auto injest complete
cedricdcc 4731fe7
small refactoring
cedricdcc 866c1b8
added rdf2j and refactoring of the graph functions
cedricdcc 36d73e4
Update graph_functions.py
cedricdcc 8fa637b
deleted / commented out non used imports
cedricdcc ee74345
performed autopep8 and black on all python files
cedricdcc fd4879d
refactoring of watcher.py , editied templates and graphdb.py function…
cedricdcc 9f8cfdc
beginning of tests
cedricdcc c916ec5
changed const variables and reverted changes on update context lastmod
cedricdcc 5f67142
done refactoring + tests made + workflows for autopep8 and black made
cedricdcc f486db3
changed version for workflows
cedricdcc 103b51c
renaming workflow file + change in python test file to check if actio…
cedricdcc 3eed9b7
changed python workflow versions to work with arch x64
cedricdcc a2c6cf8
attempt 4 at working linting
cedricdcc c1af6c7
Automated code formatting
github-actions[bot] d982426
last reforctoring mods
cedricdcc c6246c8
Automated code formatting
github-actions[bot] 9375895
added beginning of dereferencer
cedricdcc 3fa7ada
added dereferencing config and memory
cedricdcc ccc7e87
Automated python code formatting
github-actions[bot] 04803d5
small updates lwua-ingest and added deref entity runs for orcid and mr
cedricdcc b4fcec9
Automated python code formatting
github-actions[bot] 29417c6
deleted metadata management for now in search for more favorable system
cedricdcc f070d16
Automated python code formatting
github-actions[bot] 1b5963d
working dereferencer
cedricdcc 9188dcc
fixed linting workflow
cedricdcc 0f5714a
Update derefEntity.py
cedricdcc dec05f6
wf-update
cedricdcc cc35c2b
Automated python code formatting
github-actions[bot] bbf25ef
Revert "Automated code formatting"
cedricdcc 7cac5e2
Automated python code formatting
github-actions[bot] 19f5a97
no deref
cedricdcc 21d6243
Merge branch 'cedric_injest_attempt' of https://github.com/cedricdcc/…
cedricdcc 5e939aa
Update linting-python-files.yml
cedricdcc 1e44ddd
Merge branch 'main' into cedric_injest_attempt
cedricdcc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better to run this kind of stuff via Makefile --> again pykg2tbl shows how to set it up There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment still applies |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? this auto-lint at server side is odd -- pls check how things were setup in pykg2tbl as part of the client-side commit (so no need for user in config)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather remove this one and add some todo to have the linting on the client - possibly with git-hook