nodestream-proj / nodestream

A Declarative framework for Building, Maintaining, and Analyzing Graph Data
https://nodestream-proj.github.io/docs/
Apache License 2.0
36 stars 10 forks source link

ValueProvider errors to have helpful error messages #321

Closed yasonk closed 2 months ago

yasonk commented 2 months ago

Currently errors in value provider of a pipeline do not contain sufficient information. Need to show value provider expression and document in the error log message.

Introducing __str__ method allows for a more readable string representation of ValueProviders Try and except blocks are added in single_value and many_values methods updated tests

Cole-Greer commented 2 months ago

It's always nice to see additional context in the errors. Looks good to me!

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 96.10390% with 3 lines in your changes missing coverage. Please review.

Project coverage is 97.75%. Comparing base (3ffc662) to head (61034c2).

Files Patch % Lines
...pipeline/value_providers/mapping_value_provider.py 92.85% 1 Missing :warning:
...ne/value_providers/string_format_value_provider.py 91.66% 1 Missing :warning:
...ipeline/value_providers/variable_value_provider.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #321 +/- ## ======================================= Coverage 97.74% 97.75% ======================================= Files 142 142 Lines 4754 4802 +48 ======================================= + Hits 4647 4694 +47 - Misses 107 108 +1 ``` | [Flag](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | Coverage Δ | | |---|---|---| | [3.10-macos-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.75% <96.10%> (+<0.01%)` | :arrow_up: | | [3.10-ubuntu-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.75% <96.10%> (+<0.01%)` | :arrow_up: | | [3.10-windows-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.70% <96.10%> (+<0.01%)` | :arrow_up: | | [3.11-macos-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.75% <96.10%> (+<0.01%)` | :arrow_up: | | [3.11-ubuntu-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.75% <96.10%> (+<0.01%)` | :arrow_up: | | [3.11-windows-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.70% <96.10%> (+<0.01%)` | :arrow_up: | | [3.12-macos-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.75% <96.10%> (+<0.01%)` | :arrow_up: | | [3.12-ubuntu-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.75% <96.10%> (+<0.01%)` | :arrow_up: | | [3.12-windows-latest](https://app.codecov.io/gh/nodestream-proj/nodestream/pull/321/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj) | `97.70% <96.10%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nodestream-proj#carryforward-flags-in-the-pull-request-comment) to find out more.

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