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

Refactoring of Instrument list and Parameters creation #90

Merged
merged 25 commits into from
Feb 27, 2024

Conversation

dsavchenko
Copy link
Member

@dsavchenko dsavchenko commented Feb 21, 2024

Refactoring in Instruments/Parameters creation. For optimisation and bug-fixing. This will really reduce the overhead and there will be no more gateway timeouts, I hope.

  • Reduce the number of requests for the backend description.
  • No need to reload the plugin to update the information from KG about available instruments (it gets updated before an iteration of the instrument factory "list").
  • instr_name and instrument_query are attached as attributes to the instrument_factory. This allows to avoid the creation of every Instrument in each request.
  • Fixed issue with changing default values, still keeping lru_cache for parameter lists.
  • Fixed issue with "token" parameter name masking.
  • Pass Ontology instance to Parameter.from_owl_uri in order to not recreate it.

NOTE: one breaking change is introduced. The default KG url is removed, as the info in kg is really deployment-specific.

@dsavchenko dsavchenko changed the title Otimise-instruments-params Refactoring of Instrument list and Parameters creation Feb 25, 2024
@dsavchenko dsavchenko linked an issue Feb 25, 2024 that may be closed by this pull request
@dsavchenko dsavchenko marked this pull request as ready for review February 25, 2024 23:25
Copy link
Contributor

@burnout87 burnout87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question

dispatcher_plugin_nb2workflow/queries.py Show resolved Hide resolved
Copy link
Member

@volodymyrss volodymyrss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks. Though this performance-driven variation in factory may add some confusion. I could imagine other solutions, but it makes sense to do this for now.

@dsavchenko dsavchenko merged commit 448b860 into master Feb 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants