biolab / orange-canvas-core

Orange Canvas core workflow editor
GNU General Public License v3.0
36 stars 62 forks source link

Refer to channels by ids, not their visible names when saving/loading #257

Closed janezd closed 1 year ago

janezd commented 1 year ago

Channels have names (for humans) and ids (for machines).

A workflow created in English version of Orange cannot be loaded in Slovenian Orange because channel names are translated. This change fixes that by using id's, which are not translated. This change will have effect after https://github.com/biolab/orange-widget-base/pull/229 is merged.

I think using id's in .ows is also better in principle.

For backward compatibility, input_channel and output_channel match by id and, as a fallback, by name. This will fail if id is the same as the name of another signal, which is unlikely. Besides, https://github.com/biolab/orange-widget-base/pull/229 shows a warning in such cases.

codecov-commenter commented 1 year ago

Codecov Report

Base: 74.73% // Head: 74.76% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (2c9209d) compared to base (2eab65f). Patch coverage: 94.59% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #257 +/- ## ========================================== + Coverage 74.73% 74.76% +0.03% ========================================== Files 96 96 Lines 20619 20654 +35 ========================================== + Hits 15409 15442 +33 - Misses 5210 5212 +2 ``` | [Impacted Files](https://codecov.io/gh/biolab/orange-canvas-core/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab) | Coverage Δ | | |---|---|---| | [orangecanvas/scheme/readwrite.py](https://codecov.io/gh/biolab/orange-canvas-core/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3NjaGVtZS9yZWFkd3JpdGUucHk=) | `73.21% <92.85%> (+1.24%)` | :arrow_up: | | [orangecanvas/registry/base.py](https://codecov.io/gh/biolab/orange-canvas-core/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3JlZ2lzdHJ5L2Jhc2UucHk=) | `89.15% <100.00%> (ø)` | | | [orangecanvas/scheme/node.py](https://codecov.io/gh/biolab/orange-canvas-core/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL3NjaGVtZS9ub2RlLnB5) | `84.76% <100.00%> (+0.63%)` | :arrow_up: | | [orangecanvas/canvas/view.py](https://codecov.io/gh/biolab/orange-canvas-core/pull/257?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab#diff-b3JhbmdlY2FudmFzL2NhbnZhcy92aWV3LnB5) | `48.08% <0.00%> (+0.57%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

janezd commented 1 year ago

@ales-erjavec, thank you. Is it done? Can I review and merge?

ales-erjavec commented 1 year ago

Yes