Skip to content
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

Tox is failing 2 out of 4 tests..(??) #3

Open
riccardoAlbertoni opened this issue Oct 16, 2020 · 10 comments
Open

Tox is failing 2 out of 4 tests..(??) #3

riccardoAlbertoni opened this issue Oct 16, 2020 · 10 comments

Comments

@riccardoAlbertoni
Copy link
Collaborator

Tox seems to fail 2 out of 4 tests, though I think I have tested the same things manually via http://localhost:8080/v1.3.0/ui/ and I am quite confident that everything is working... instructions I used and the related screenshots in the last sections of the notebook ([1] or [2]).
@dgarijo and @mosoriob: Any chance that the tests get misconfigured? Or have I misunderstood the instructions?

[1]https://colab.research.google.com/drive/1XKk_feh4Eb-fC3FGQ9kGwfiP7KieswT3?usp=sharing
[2]https://github.com/riccardoAlbertoni/ISWC_reproducibility607/blob/master/Reproducing607.ipynb

@dgarijo
Copy link
Collaborator

dgarijo commented Oct 16, 2020

Thanks, I will have a look. Maybe there is something wrong with the tests. @mosoriob do you have time to look at this?

Otherwise I'll have a look during the weekend. In any case, @riccardoAlbertoni the important thing is that you got the API working (even though I would like to have this working for you as well)

@mosoriob
Copy link
Collaborator

You need to modify the tests because they use a dummy id.
For example, the GET test is trying to get the resource with the id id_example. However, the resource doesn't exist in dbpedia.

        response = self.client.open(
            '/v1.3.0/bands/{id}'.format(id='id_example'),

You can found good examples in the model catalog api

@dgarijo
Copy link
Collaborator

dgarijo commented Oct 16, 2020

Thanks @mosoriob I will review and update the documentation in case it's necessary to reflect this.
It makes sense, because it's impossible for to know a priori what are the sample resources in the endpoint, unless we do a query to retrieve them.

@dgarijo
Copy link
Collaborator

dgarijo commented Oct 16, 2020

@riccardoAlbertoni if you want to make sure the tests run, I would select an example of a band and an example of a genre and give it a try. Just making sure you complete the notebook :)

@riccardoAlbertoni
Copy link
Collaborator Author

riccardoAlbertoni commented Oct 16, 2020

@riccardoAlbertoni, if you want to make sure the tests run, I would select an example of a band and an example of a genre and give it a try. Just making sure you complete the notebook :)

I have updated the notebook. Thanks a lot. In the notebook, you can find some suggestions on how you could improve the documentation on that specific point if you want.

@fbvinid
Copy link
Collaborator

fbvinid commented Oct 17, 2020

Hi everyone,

Not sure if this is just related to my system, but I had some problem running the experiments with tox.

The error I got was: py.error.EACCES: [Permission denied]: mkdir('/home/vinid/Downloads/replicate_review/OBA/outputs/dbpedia_music/servers/python/server/.tox',) . This might just be my docker installation that has created the folder with a different permission setting.

I solved the problem by quickly changing the permissions setting of the server folder. Eventually, I also tried running the experiments with pytest installed in a local virtualenv, just to try something different (see here)

Everything else seems to run/to build correctly: I could run the first part flawlessly (see here and here), for the second one I have to thank @riccardoAlbertoni and the authors for the great work, I was a bit lost when I had to run the server, but the commands in @riccardoAlbertoni notebook colab notebook were super helpful to put the server up.

My configuration:

OS: Ubuntu 20.04
JAVA Version: 11.0.8
Docker Version: 19.03.8

@dgarijo
Copy link
Collaborator

dgarijo commented Oct 17, 2020

Thanks @riccardoAlbertoni , @fbvinid
glad you could all reproduce everything in the end. I will try to use your feedback to improve the documentation. This was very helpful.

@dgarijo
Copy link
Collaborator

dgarijo commented Oct 18, 2020

I updated the documentation for the testing part: https://oba.readthedocs.io/en/latest/test/
@fbvinid what do you think was confusing in the instructions for running the server? Is there anything else we should add to the documentation?

@fbvinid
Copy link
Collaborator

fbvinid commented Oct 18, 2020

Hi @dgarijo :),

I think the most difficult part for me was running docker. I used it in the past, but not at a level that allows me to mess too much with the commands I find on the README files... I was able to get everything in place thanks to @riccardoAlbertoni's notebook.

It might be worth adding a visual example here on how to use the APIs, but I don't think that is a big issue.

Apart from the fact that it is impossible to run docker in the notebook, I think that having something like that and link it in the README could be useful for the users (something along the lines of Running APIs for DBpedia Music). For example, a step by step tutorial, all in one page, that describe how to set up everthing from start to end with some pictures (essentially, what's already in the notebook).

@dgarijo
Copy link
Collaborator

dgarijo commented Oct 18, 2020

Got it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants