biolab / biolab/orange3

OWLoadBase widget

Open
#5,376 0 comments 0 reactions 0 assignees View on GitHub
feast
Dominant language
Python
Stars
5.7k
Forks
1.1k
Avg merge
12d 2h
Merged PRs (30d)
1

Description

We would need a common base for load widgets because:

- widgets for loading files have a lot of replicated code,
- some are implemented better, some worse,
- and as with all replicated code, improving one widget does not improve others.

When implementing this

- the code should, I suppose, be taken from the CSV widget, which is by far the most systematic load widget,
- perhaps see `OWSaveBase` for inspiration, because it seems to do the job well; when there are no special functionalities, save widgets need only two methods, like

```python
@Inputs.model
def set_model(self, model):
self.data = model
self.on_new_input()

def do_save(self):
with open(self.filename, "wb") as f:
pickle.dump(self.data, f)
```

Contributor guide

Open the contributing guide

Research direction

Compare the CSV widget's loading implementation with OWSaveBase, which the issue identifies as an example of a common base. Define the shared behavior and identify the load widgets with duplicated code; done means they use the common base without losing their specialized functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.