Skip to content

Commit

Permalink
Add rdflib dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Oct 21, 2019
1 parent a9d1dd7 commit aa125b8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install:
- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
- python --version
- conda config --set always_yes yes
- conda install -y -c conda-forge peewee appdirs docopt whoosh flask pytest pytest-cov
- conda install -y -c conda-forge rdflib-jsonld peewee appdirs docopt whoosh flask pytest pytest-cov
- pip install -e .

test_script:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ before_install:
fi
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
conda create -n test-environment python=$TRAVIS_PYTHON_VERSION peewee appdirs docopt whoosh flask pytest pytest-cov coveralls;
conda create -n test-environment python=$TRAVIS_PYTHON_VERSION rdflib-jsonld peewee appdirs docopt whoosh flask pytest pytest-cov coveralls;
source activate test-environment;
pip install -e .;
else
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ While in development, install using conda:

Depends on:

* peewee
* appdirs
* docopt
* flask
* peewee
* rdflib
* rdflib-jsonld
* whoosh

## Usage
Expand Down
4 changes: 3 additions & 1 deletion ci/macos-travis.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
peewee
appdirs
docopt
flask
peewee
pytest
rdflib
rdflib-jsonld
whoosh
2 changes: 2 additions & 0 deletions ci/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ requirements:
- flask
- python
- whoosh
- rdflib
- rdflib-jsonld

test:
imports:
Expand Down
39 changes: 8 additions & 31 deletions perdu/assets/templates/file.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,37 +279,14 @@ <h4>Refine query</h4>
xhr.send(data);
}


// function exit_modal(btn){
// var match = btn.getAttribute("data");
// var item_to_search_for = btn.getAttribute("data-origin");
// var table = document.getElementById("search_results_table");

// // Iterate through rows
// for (var i = 0, row; row = table.rows[i]; i++) {
// if (row.cells[0].innerHTML == item_to_search_for){
// row.cells[2].innerHTML = match;
// // Hide modal
// // Send selection to web app
// var payload = {
// 'item to match': item_to_search_for,
// 'match': match
// };

// var data = new FormData();
// data.append( "json", JSON.stringify(payload) );

// fetch("/file/<hash>/selection",
// {
// method: "POST",
// body: data
// });


// return;
// };
// };
// };
document.getElementById("export-jsonld").onclick = function (event) {
var xhr = new XMLHttpRequest();
var url = "/export/jsonld";
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-Type", "application/json");
var data = JSON.stringify(match_data);
xhr.send(data);
}

// Populate table with search results as the search field is updated.
var table = document.getElementById('refine-search-field');
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
peewee
appdirs
docopt
flask
peewee
rdflib
rdflib-jsonld
whoosh
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ def package_files(directory):
]
},
install_requires=[
'peewee',
'appdirs',
'docopt',
'whoosh',
'flask',
'peewee',
'rdflib',
'rdflib-jsonld',
'whoosh',
],
url="https://github.com/cmutel/perdu",
long_description_content_type='text/markdown',
Expand Down

0 comments on commit aa125b8

Please sign in to comment.