viash-io / viash

script + metadata = standalone component
https://viash.io
GNU General Public License v3.0
39 stars 2 forks source link

Feature/remove functionality level #649

Closed Grifs closed 9 months ago

Grifs commented 9 months ago

Describe your changes

Remove the functionality layer from the config and move all fields to the top layer.

Related issue(s)

Closes #500

Type of Change

Checklist

Requirements:

Tests:

Documentation:

Test Environment

codecov[bot] commented 9 months ago

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (9d9e5a7) 92.51% compared to head (dbb1237) 92.46%.

Files Patch % Lines
src/main/scala/io/viash/config/package.scala 93.75% 4 Missing :warning:
src/main/scala/io/viash/ViashTest.scala 80.00% 2 Missing :warning:
src/main/scala/io/viash/config/Config.scala 96.42% 2 Missing :warning:
src/main/scala/io/viash/Main.scala 75.00% 1 Missing :warning:
...c/main/scala/io/viash/runners/NextflowRunner.scala 92.85% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #649 +/- ## =========================================== - Coverage 92.51% 92.46% -0.06% =========================================== Files 129 127 -2 Lines 3889 3889 Branches 635 623 -12 =========================================== - Hits 3598 3596 -2 - Misses 291 293 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Grifs commented 9 months ago

The built script currently still has the meta_functionality_name variable set to refer to the component's name. Should we add a second meta_component_name together with the matching VIASH_META_COMPONENT_NAME name?

In time the meta_functionality_name could be removed if/when so wanted.

Additionally, ns exec has a functionality-name identifier. Should we also duplicate this with component-name?

rcannood commented 9 months ago

Great stuff! Before I review the PR (phew), some questions:

Grifs commented 9 months ago

Great stuff! Before I review the PR (phew), some questions:

  • Is the change still backwards compatible for now?

Yes, (limited) tests so far "just work". Functionality (no pun intended) is provided by https://github.com/viash-io/viash/pull/649/files#diff-08d6fbd855a302a8c8a679e2d4e5612616e059a9a14020da75697415e974c04cR223

  • Do we test whether this backwards compatibility still works?

Not yet explicitly (but I believe there is still an external script that is fetched and that is currently still in the old format). It's on my TODO list. (shouldn't take too much time :crossed_fingers: )

  • The built script currently still has the meta_functionality_name variable set to refer to the component's name. Should we add a second meta_component_name together with the matching VIASH_META_COMPONENT_NAME name?

    Yes! Or maybe simply meta_name and VIASH_META_NAME?

:+1:

  • In time the meta_functionality_name could be removed if/when so wanted.

    Yes but let's not rush this

:+1:

  • Additionally, ns exec has a functionality-name identifier. Should we also duplicate this with component-name?

    Or simply name?

:+1: