CLARIAH / grlc

grlc builds Web APIs using shared SPARQL queries
http://grlc.io
MIT License
137 stars 32 forks source link

Manually incorporatig Gitlab support #390

Closed c-martinez closed 1 year ago

c-martinez commented 1 year ago

Continuing here from #387

A few issues that remain:

c-martinez commented 1 year ago

I've added gitlab tests, but am not familiar enough with Gitlab library to write these tests. @GenEars, do you think you might be able to help there?

GenEars commented 1 year ago

I've added gitlab tests, but am not familiar enough with Gitlab library to write these tests. @GenEars, do you think you might be able to help there?

Hello @c-martinez. I browsed over your https://github.com/CLARIAH/grlc/pull/390/commits/7bbcdcc1982eea8440405cee290e6f0f75e30643 commit where I understand we need to simulate a GitLab endpoint.

I am currently digging into references and code to see how we can do this, or whether we can simply substitute GitHub for these tests. Indeed the git_access_token config parameter exists in both grlc's GitHub and GitLab context, and gitlab_url is the only new thing.

Will keep you informed ...

c-martinez commented 1 year ago

Great, thanks @GenEars -- indeed for the tests we should simulate (mock) the responses from GitLab endpoint. Let me know if you get stuck and feel you need a hand.

c-martinez commented 1 year ago

Hey @GenEars, just wondering if you managed to make any progress in adding tests for GitLab endpoint. I think we have two possibilities, depending on how long it might take to develop these test:

a) Leave as draft until tests are ready b) Merge without tests, and open a new issue for adding tests

What do you think?

GenEars commented 1 year ago

Hello @c-martinez, I had to postpone my work on this project, so I have no updates to provide at the moment. I think option b) "Merge without tests, and open a new issue for adding tests" is quite safe. Did you tried to run a local version of the code with a configuration targetting your office/university GitLab instance? By the way, this makes me think that a providing a test repo on https://gitlab.com may help on this task as this would avoid the need to create temporary instances of GitLab during tests.

c-martinez commented 1 year ago

No worries, perfectly understand having to postpone projects.

Ok, will go ahead with option b). I've created issues #394 and #395 to follow up later.

I think a GitLab test repo is a very good idea, but I think that unit tests should still work with temporary (mock) GitLab instances. The reason being that then tests can run even if you do not have an internet connection at the time of testing.

I think a GitLab test repo is a very good idea, but I think that unit tests should still work with temporary (mock) GitLab instances. The reason being that then tests can run even if you do not have an internet connection at the time of testing.