fox-it / flow.record

Recordization library
GNU Affero General Public License v3.0
7 stars 9 forks source link

Add support for empty value in path fieldtype #122

Closed yunzheng closed 3 months ago

yunzheng commented 4 months ago

Normally an empty path would be normalized to a "." (dot) character. This change allows you to initialize a path field with an empty string. This is useful to represent a path that is empty.

Fixes DIS-2557

yunzheng commented 4 months ago

Currently flow.record.fieldtypes.path() (without any arguments) will also be considered an empty path. Not sure if this is preferred or to only consider an empty path if it's initialized with an empty string "".

yunzheng commented 4 months ago

No idea why Python 3.12 fails, will look into it later

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.72%. Comparing base (43a5656) to head (d5f8264).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #122 +/- ## ========================================== + Coverage 83.67% 83.72% +0.04% ========================================== Files 34 34 Lines 3394 3403 +9 ========================================== + Hits 2840 2849 +9 Misses 554 554 ``` | [Flag](https://app.codecov.io/gh/fox-it/flow.record/pull/122/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fox-it) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/fox-it/flow.record/pull/122/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fox-it) | `83.72% <100.00%> (+0.04%)` | :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=fox-it#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.