How to share code across components within a task
scottgigante-immunai opened this issue · comments
Scott Gigante commented
scvi_scarches_xgboost
and xgboost
aren't variants of the same method, but they do share a good chunk of code. In v1 we only have to implement this once. Is there a way to share code across distinct components in v2?
Robrecht Cannoodt commented
I'm not a big fan of sharing code between individual components across tasks, to not have any interdependencies between tasks.
However it's definitely possible to store helper functions in separate resource files as shown here and include these in multiple components.
Scott Gigante commented
Agreed on cross-task. How to do this within a task should be discussed in
the individual component docs.
…On Tue, Apr 25, 2023 at 7:24 AM Robrecht Cannoodt ***@***.***> wrote:
I'm not a big fan of sharing code between individual components across
tasks.
Within the same task, however, it's possible to store helper functions in
separate resource files as shown here
<https://checkpoint.url-protection.com/v1/url?o=https%3A//viash.io/guide/component/use-helper-functions.html&g=ZmRlNTRkMjM5YzFhY2QyYg==&h=ZjRmMzU4MmFlMjhjOGI5ZWZlNjUzMTZlZGJiZDc5OGIwZGI1Njc2Yjg5NGZlNmIwZjk5YjQxOTI5MjBiODJiZg==&p=YzJlOmltbXVuYWk6YzpnOjk1OWY4YzU2ZGNkMTI2MjZhYjIwYWYxNmMyZWJjN2E0OnYxOmg6VA==>
.
—
Reply to this email directly, view it on GitHub
<https://checkpoint.url-protection.com/v1/url?o=https%3A//github.com/openproblems-bio/openproblems-v2/issues/123%23issuecomment-1521624397&g=NzBlZGIzNWMyOGJmY2I1Yg==&h=MTU2YjM0ODJiNjM3MmE2NGViNTA0MDJkZDUyODhhNjM4ODllOWE3NDkxMWVmZjk4YjgxZmZiNTVhZTQxMTM1Yw==&p=YzJlOmltbXVuYWk6YzpnOjk1OWY4YzU2ZGNkMTI2MjZhYjIwYWYxNmMyZWJjN2E0OnYxOmg6VA==>,
or unsubscribe
<https://checkpoint.url-protection.com/v1/url?o=https%3A//github.com/notifications/unsubscribe-auth/AUHCMAS7ZQ5SKWNJVMEWCIDXC6X6BANCNFSM6AAAAAAW6TC6EY&g=NTIxNzdlZTZlY2Q3YjJmNg==&h=M2ZkM2ViOWYzOWQyM2NlZmMwOTI4OGM5MWVhNDZiMGNlYmJiMjg4MjkyNjA2MWJhOWQyZmYwYTRkZTZhYjczNA==&p=YzJlOmltbXVuYWk6YzpnOjk1OWY4YzU2ZGNkMTI2MjZhYjIwYWYxNmMyZWJjN2E0OnYxOmg6VA==>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
PLEASE NOTE: The information contained in this message is privileged and
confidential, and is intended only for the use of the individual to whom it
is addressed and others who have been specifically authorized to receive
it. If you are not the intended recipient, you are hereby notified that any
dissemination, distribution, or copying of this communication is strictly
prohibited. If you have received this communication in error, or if any
problems occur with the transmission, please contact the sender.