-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactor importing by adding write endpoints for all items #101
Comments
@nichtich In a private conversation, you said that you would like to remove the
I'm open for changes on all of this though. On the one hand, I would like to have a consistent behavior between different type of entities, on the other hand, we need to consider the usual use cases (in particular our own use cases) which demand slightly inconsistent behavior. |
We now have write endpoints for concept schemes and concepts, so those parts of the import script can be rewritten now. For the whole import script to be rewritten, there are a bunch more things necessary though:
And probably more that I haven't though of yet. |
As we are breaking the import script here, but not releasing a new major version, we should try to detect whether the new import script is called with old parameters and show an error with a link to the documentation. |
The POST endpoints should also support files via upload or URL. This could then be used by the rewritten import script (which would only be a simple wrapper over the internal methods) and by the future admin interface (#39). Edit: This is now implemented via json-anystream. |
Note that this is just a workaround for now. The whole import script will be rewritten for #101.
Bulk imports are now read and written to the database 5000 at a time. For non-bulk imports, the whole data is read into memory first and then written.
…101) Notes: - Currently, this is a separate file and is not tested. - Next step is to write an additional script that replaces the --reset option of the import script. - Then, the previous import script can be replaced and the tests adjusted so that they use the reset script instead of --reset. - Mappings/concordances are still imported directly in the database because the service methods do not yet offer sufficient functionality (needs #98 and #99).
So I implemented a reset script that replaces everything the
|
I have added a bunch of tests for the import and reset script, trying to test many possibilities. There's probably still potential for more, but it should be enough for now. I will finally merge |
The import script is unnecessarily complicated and only usable from the command line. There should be a way to import concepts and schemes with HTTP endpoints and the importing process should become clearer.
The text was updated successfully, but these errors were encountered: