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

US1274: Import from BnF #1076

Merged
merged 2 commits into from
Jul 2, 2020
Merged

US1274: Import from BnF #1076

merged 2 commits into from
Jul 2, 2020

Conversation

iGormilhit
Copy link

Why are you opening this PR?

  • Which task/US does it implement?
  • Which issue does it fix?

Dependencies

My PR depends on the following rero-ils-ui's PR(s):

  • rero/rero-ils-ui#

How to test?

  • What command should I have to run to test your PR?
  • What should I test through the UI?

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

rerowep and others added 2 commits June 22, 2020 11:18
This classes helps to get records from external resources like BNF.
It is possible to search for records and transform them into rero-ils
json format without saving them to the database. The search result can
be displayed and filtered. It is also possible to display
the source data of an record and import the data into the database.

* Adds general class for imports.
* Adds BNF specific import class.
* Saves the search result in REDIS
  `RERO_IMPORT_CACHE` = 'redis://localhost:6379/4'
  for expiering time of `RERO_IMPORT_CACHE_EXPIRE` = 10 minutes.
* Adds argument `format` to the rest endpoints. Output mimetypes
  can now be spezified by argument or in the header of the request.

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
* Splits the document dumps function to be usable to the serializers.
* Renames `/api/import/bnf` to `/api/import_bnf` to be usable by the UI.
* Fixes year aggregation filter by forcing the terms to be a string.
* Returns empty result for empty query.
* Sorts aggregations by terms for year and by term counts and names for
  the other.
* Creates a post_process function in JSON serializers.
* Creates two serializers: one without extra data for the editor one
  with extra data for the document views.
* Adds a new not found result error handler.
* Makes the tests more robust to BNF changes.
* Removes useless cli command.
* Returns the number of results on the remote server.
* Fixes empty record returned by the BNF.
* Adds the number of records matching the query found on the remote
  server.

Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
@iGormilhit iGormilhit changed the title Us1274 import bnf US1274: Import from BnF Jul 2, 2020
@iGormilhit iGormilhit merged commit 38c982c into dev Jul 2, 2020
@iGormilhit iGormilhit deleted the US1274-import-bnf branch July 2, 2020 09:33
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

Successfully merging this pull request may close these issues.

None yet

5 participants