-
Notifications
You must be signed in to change notification settings - Fork 5
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
Move providers to independent node module #522
Comments
Configuration of providers should be very clear before this step.
|
I think
It was used to retrieve details for schemes in the past, but looking at the code and the network requests, it is not used for that anymore. The thing is that |
By the way, I would suggest having either separate modules for each provider (including the base provider which they all inherit), or decide on a set of default providers which are bundled as something like |
Then how about
I'd prefer a bundle to avoid module inflation and to simplify documentation. |
👍
Okay, that's fine with me. |
To facilitate creation of additional applications such as #497 and to add unit tests (#54), all methods that communicate with API endpoints (JSKOS-Server, Skosmos API...) should be put into a node module (#74, maybe const cdk = require('cocoda-sdk')(config)
const schemes = await cdk.getSchemes()
const concept = await cdk.getConcept({uri})
const mappings = await cdk.getMappings({from, toScheme}) |
It seems like we are going to push this forward because it could be used in other applications as well. So let's try to clarify things about the providers here:
|
We only have a limited set of providers as referenced via config file field |
The thing is: I want What you want with Do you understand what I mean?
I'm not completely sure what your point is, but I would solve this like we did before: Each provider (that is defined in
Can you specify what you mean by that? If we moved the providers out of Cocoda into a |
If someone knows how to code a provider, he/she should also be able to extend Cocoda this way. It's ok if Cocoda has a fixed set of supported providers which can be configured. |
Okay. 👌 |
@nichtich You haven't said anything about this anymore. Do you understand my reasoning? What should we do? I could imagine the following three options:
|
Thanks for the reasoning 😄 So let it be option 3! |
I'm currently thinking about what kind of interface
All in all, this is going to be a little more complicated than just moving the providers out of Cocoda. But I think it is a good and important step. |
I'm also thinking about whether |
I was just thinking: Is |
I'd prefer the first name but nevermind |
|
I think cocoda-sdk is basically ready to be integrated into Cocoda. I'm expecting significant changes though because it will require some refactoring. |
The first integration of cocoda-sdk into Cocoda is now on branch "cocoda-sdk". There are a lot more tests and cleanups I have to do though before we can merge this into dev. |
I'm going to use this issue to also do some overdue refactoring. |
Further development will happen in branch test and will (soon) automatically deploy to https://coli-conc.gbv.de/cocoda/test/ for testing. |
Testing is still necessary, but any bugs should be reported as their own issue. I would suggest merging |
For #74 a first part to be published as independent node module (
jskos-providers
?) is providers. This would allow to unit-test providers and to implement other clients. First use client could be a command line client to look up schemes, concepts, mappings, and mapping recommendations.Requires #320 and maybe #500.
The text was updated successfully, but these errors were encountered: