by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
ugswork
@ugswork
I need to provide links to some of the html pages in Docs directory, in the repository. The html files are in Docs/build/_html/. I have added a view function to return the html file. I am not sure if this is how it should be done. When I use the link, I see that the styles are not applied to the html page. I would like to know how to do this correctly. Thank you.
Lars Holm Nielsen
@lnielsen
@rerowep The only thing you have available is the ?next= redirect parameter to the login page which you could combine with an intermediary view
/login/?next=/login/redirect/ -> /login/redirect/ (has full access to current user etc), and can redirect to where needed
you’ll have two redirects which is not ideal, but will hardly be noticable for an end user
Peter Weber
@rerowep
@lnielsen Thanks for the hint, maybe we have to implement it like this.
Lars Holm Nielsen
@lnielsen

Proposal for new Invenio Governance

See inveniosoftware/opensource#60
Joseph G. Pawletko
@jgpawletko_gitlab
Hello Invenio folks, I'm working with the invenio-oauthclient code, specifically the ORCID functionality. I'm getting the redirect back from ORCID, but my Invenio test app doesn't respond. What is the best way to increase the log details (e.g., DEBUG mode) / debug an Invenio application? (Apologies for the n00b question!) Thank you for your time!
Miroslav Bauer
@mirekys
Hi folks, just asking before getting my hands dirty with implementation. Has anyone tried to implement some more complicated record/deposit approvement process that would require to define a record's lifecycle state in some sort of FSM? For Django, there is a very useful django-fsm library. We found an alternative for SQLAlchemy sqlalchemy-fsm, but were unable to integrate it into Invenio (it registers some listeners, that Invenio DB drops somewhere on startup). Now we are considering to hold record state as a plain metadata field and define state transitions as methods of our custom Record api class and protecting state from being modified outside of these methods. Would be very glad if there is already some more elegant solution :) Thanks
Lars Holm Nielsen
@lnielsen
@mirekys Yes, @ntarocco has some state management in Invenio-Circulation being used in InvenioILS for loan management
Nicola
@ntarocco
@mirekys we have implemented in collaboration with RERO a state matchine for book loans workflow, you can see it here: https://github.com/inveniosoftware/invenio-circulation/blob/master/invenio_circulation/config.py#L62 At that time, we have also evaluated pytransitions library, that looks nice. We gave it a try, but personally I prefer a more Object Oriented approach and in the end we decided to go on our own since the engine of it is quite simple, see here and here
Miroslav Bauer
@mirekys
Thanks a lot, @lnielsen @ntarocco ! That looks really nice and close to what we need, I would also prefer a more object oriented approach for an Invenio module, will definitely give it a try
Do you also have some protection in place against modifying the state field on loan record directly through a REST API, e.g. by sending a PATCH request?
Nicola
@ntarocco
Right now, we have implemented our own validator in ILS, not there: you can implement your own custom validation when validating the schema, see here. We did it like this to have validation both when using REST APIs but also going programmatically. Otherwise you might go for loaders/marshmallow validation.
Miroslav Bauer
@mirekys
Got it, thanks! :)
Joseph G. Pawletko
@jgpawletko_gitlab
a quick follow up re: the ORCID integration in invenio-oauthclient. The issues I was having were resolved by the latest commit to the main branch in GitHub (inveniosoftware/invenio-oauthclient@085cf70)
Zacharias Zacharodimos
@zzacharo
@jgpawletko_gitlab thanks to @jma we refactored the access_token_url passed to the orcid OAuth application. invenio-oauthclient==1.3.2 is already out! We will release backport releases i.e 1.1.4 and 1.2.2 for the invenio versions that are currently supported. Which version of invenio do you use?
Joseph G. Pawletko
@jgpawletko_gitlab
Hi @zzacharo , thank you for your message! We're developing a proof-of-concept application using v3.3. I will update my Pipfile to use invenio-oauthclient v1.3.2. Thanks again!
Otuoma Sanya
@otuoma

@zzacharo - started over with a clean environment. made it to the build assets step. ils webpack buildall ends with the following error:

Traceback (most recent call last):
  File "C:\Users\crawley\AppData\Local\Programs\Python\Python37\Scripts\ils-script.py", line 11, in <module>
    load_entry_point('invenio-app-ils', 'console_scripts', 'ils')()
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\flask\cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 1163, in invoke
    rv.append(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\flask\cli.py", line 426, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "C:\Users\crawley\AppData\Roaming\Python\Python37\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\flask_webpackext\cli.py", line 72, in buildall
    current_webpack.project.buildall()
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\pywebpack\project.py", line 138, in buildall
    super(WebpackTemplateProject, self).buildall()
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\pywebpack\project.py", line 66, in buildall
    self.install()
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\pywebpack\project.py", line 51, in install
    return self.npmpkg.install(*args)
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\pynpm\package.py", line 76, in _run_npm
    **kwargs
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\site-packages\pynpm\utils.py", line 25, in run_npm
    cwd=pkgdir,
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "c:\users\crawley\appdata\local\programs\python\python37\lib\subprocess.py", line 1178, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

In [virtual-env-path]/Lib/site-packages/pynpm/utils.py inside run_npm function, add shell=True so that you havesubprocess.call(command, cwd=pkgdir, shell=True )

Colin Sippl
@cs-ubr

Hi, I have a question related to invenio-deposit. Action "save" in the GUI (see default actions.html template) should create a PUT request. However, I'm always getting a POST request. The reason for this seems to be in function getEndpoints() in this line as the expression angular.isUndefined(vm.invenioRecordsEndpoints.self) is true :

...
  ...
    var deferred = $q.defer();
    if (angular.isUndefined(vm.invenioRecordsEndpoints.self)) {
      // Prepare the request
      var request = InvenioRecordsAPI.prepareRequest(
        vm.invenioRecordsEndpoints.initialization,
        'POST',
        {},
        vm.invenioRecordsArgs,
        vm.invenioRecordsEndpoints
      );
      // If the action url doesnt exists request it
      InvenioRecordsAPI.request(request)
        .then(function success(response) {
        // Upadate the endpoints
        $rootScope.$broadcast(
          'invenio.records.endpoints.updated', response.data.links
        );
        deferred.resolve({});
      }
      ...
    }
    ...

Consequently, the form data is not read out either. How do I fix this error?

Colin Sippl
@cs-ubr

Fixed the issue by adding links='{"self": "{{ config.DEPOSIT_RECORDS_API.format(pid_value=pid.pid_value) }}"} attribute to invenio-records directive inside my edit.html. I'm not sure if this is the right way, but it works.

However, now I'm getting a Missing required header argument. JWTInvalidHeaderError due to an authentication(?) problem. I already assigned deposit-admin-access to the admin role. In APP_DEFAULT_SECURE_HEADERS I have 'session_cookie_secure': True, 'session_cookie_http_only': True. Any hints?

roonykhaled1
@roonykhaled1
Hi everyone, I need to ask what exactly Invenio digital library framework? and how to donwload it ?
Lars Holm Nielsen
@lnielsen
It’s a code library that helps you build digital repositories (systems that is used to host research objects - e.g. articles, data, software, …)
roonykhaled1
@roonykhaled1
@lnielsen so I need to be a developer to use this framework right?
Lars Holm Nielsen
@lnielsen
Correct……we’re working on two applications InvenioRDM and InvenioILS that are applications that you can install and run without being a developer
roonykhaled1
@roonykhaled1
Okay. Thanks a lot :)
Sinclert Pérez
@Sinclert
:wave: Is there any documentation / examples of search filters with multiple ES queries? I was following this documentation, where the desired query is placed within a list, as if other queries could be appended too.
And, as it is said in the paragraph below, that only works if the user is logged in, so I think the example should be changed to:
queries = []
if current_user.is_authenticated:
    queries.append(Q("match", owner=current_user.get_id()))
osoo
@osoo_gitlab
Hi all.
I want to use invenio to model files in a hierarchy (filesystem).
Later on I want to model "Concepts" like book, conference, person, ... .
Concepts can contain zero, one or more files e.g. the book as docx, as pdf and some mp3 with a spoken version.
Also it would be nice if we could transfer our library to invenioILS and search in one place the digital books and the physicals. For beginning how to model a file hierarchy in invenio?
Nicola
@ntarocco

:wave: Is there any documentation / examples of search filters with multiple ES queries? I was following this documentation, where the desired query is placed within a list, as if other queries could be appended too.

@Sinclert with multiple ES queries, you mean chaining them? I am not sure is very douable, what is your use case?
Abou the current_user.get_id(), if you have the time, a PR is very welcomed! :)

13 replies
mbrandao
@mbrandao11_twitter
Hello I am a portuguese librarian and I would like to participate in this project. The action I can do is a Portuguese translation of the ILS. Is it possible?
Thanks
Lars Holm Nielsen
@lnielsen
@osoo_gitlab Invenio comes with an object store API, so filenames are in fact “keys” that can contain slashes etc, that you could use to build a file hierarchy
Files are then linked to records…..
Alternatively you can model the hierarchy in the record itself
Nicola
@ntarocco

Hello I am a portuguese librarian and I would like to participate in this project. The action I can do is a Portuguese translation of the ILS. Is it possible?

@mbrandao11_twitter hi! at the moment there is no internalization support :'(

but the plan is that we will enable this in Invenio in the coming months
so probably the answer is: not at the first release...
saberthesword
@saberthesword
Hi there, I'm new here and to invenio
i'm encountering an issue when i try to install the bootstrap scripts
image.png
any pointers?
Dan Granville
@dfdan
@saberthesword try 'pip install pipenv' and running it again
saberthesword
@saberthesword
image.png
that worked, but now i get this when i try to run the command again
Nicola
@ntarocco
@saberthesword it looks like uwsgi installation problem, I see that you are on Windows. I am not sure how much it is supported, you can have a look to their documentation here