inveniosoftware / invenio-files-rest

REST API for uploading/downloading files for Invenio.
https://invenio-files-rest.readthedocs.io
MIT License
9 stars 67 forks source link

tests: remove dependencies on unnecessary Invenio-* packages #134

Open jirikuncar opened 7 years ago

jirikuncar commented 7 years ago

It would make package release process easier.

nharraud commented 7 years ago

I don't see any issue with that. It seems that the only change which this would require would be to change the config:

RECORDS_UI_ENDPOINTS = dict(
            recid=dict(
                # ...
                route='/records/<pid_value/files/<filename>',
                view_imp='invenio_files_rest.views.file_download_ui',
                record_class='invenio_records_files.api:Record',
            )
        )

Changed with

- view_imp='invenio_files_rest.views.file_download_ui',
+ view_imp='invenio_records_files.views.file_download_ui',

Do we need to keep record_file_factory at all? It seems that it is only used by file_download_ui.

In case somebody wants to use a different record_file_factory they can at the same time provide their own file UI endpoint as it means that there is probably not a 1 record -> 1 bucket relation anymore.

lnielsen commented 7 years ago

👍

Would make Files-REST more clean. @nharraud I would still keep record_file_factory (which is anyway already located in Records-Files).

nharraud commented 7 years ago

@lnielsen I meant removing it from the ext.py file in invenio-files-rest, not removing the function which is in invenio-records-files. If we move file_download_ui to invenio-records-files it can directly use the function instead of using a config variable.

jirikuncar commented 7 years ago
topless commented 5 years ago

@lnielsen after our discussion I believe this one can be closed, the removal of invenio-access is not easy or feasible.