Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Separate canvas and base widget #3772

Merged
merged 52 commits into from
Jun 28, 2019

Conversation

ales-erjavec
Copy link
Contributor

@ales-erjavec ales-erjavec commented Apr 25, 2019

Issue

Ref gh-3527 (Standalone canvas)

Separate canvas and base widget out of Orange3
Using:

https://github.com/biolab/orange-canvas-core/
https://github.com/biolab/orange-widget-base/

This pull request builds on top and supersedes gh-2792

Description of changes
  • Of the canvas, only the main application entry point remains.

  • The workflow model with the base widget is moved to orange-widget-base. This includes some but not all of gui.py, utilits/..., basically what is independent of Table, Variable, ... but the package structure is reconstructed here.

  • Orange.data.io.FileFormat is no longer used to registers image writers Orange.data.io.FileFormat.img_writers returns empty sequence.

  • The Orange.widgets.widget.OWWidget extends OWBaseWidget with Table,Domain,... related report methods.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Apr 26, 2019

Codecov Report

Merging #3772 into master will increase coverage by 0.4%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master   #3772     +/-   ##
========================================
+ Coverage    84.3%   84.7%   +0.4%     
========================================
  Files         384     371     -13     
  Lines       72755   64836   -7919     
========================================
- Hits        61334   54920   -6414     
+ Misses      11421    9916   -1505

@ales-erjavec ales-erjavec force-pushed the orange-widget-base-rebase branch 2 times, most recently from 35a9fe8 to 6c2702c Compare April 30, 2019 11:16
@ales-erjavec ales-erjavec force-pushed the orange-widget-base-rebase branch 3 times, most recently from 0a99bb7 to f426bd0 Compare May 24, 2019 06:46
@markotoplak
Copy link
Member

Before the final split, should we clean up https://github.com/biolab/orange-canvas-core/ and
https://github.com/biolab/orange-widget-base/ so that they take less space? Filtering paths that are not needed there anymore should be relatively straightforward.

@ales-erjavec
Copy link
Contributor Author

https://github.com/ales-erjavec/orange-widget-base/tree/master-filtered has filtered history

Using rewrite.sh
git checkout -b orange-canvas-core-rebase a41a4c4fa9d32d5d84b48aa4e1fb7984c2216cf2
git filter-branch -f --prune-empty --index-filter '
KEEP_LIST=(
    doc/development
    README.md
    .github
    setup.{py,cfg}
    MANIFEST.in
    LICENSE
    CONTRIBUTING.md
    scripts
    .github/
    .travis/
    .travis.yml
    appveyor.yml
    Orange/{__init__,util}.py
    Orange/widgets/{widget,settings,io,credentials,gui,__init__,widgetTemplate}.py
    Orange/widgets/{utils,tests,icons,report}
    Orange/canvas
    "./requirements*.txt"
    .gitignore
    .gitattributes
    pylintrc
    distribute
    .coveragerc
)

git rm --cache -r -q -- ./
git reset -q $GIT_COMMIT -- ${KEEP_LIST[@]}
' -- orange-canvas-core-rebase 

git cherry-pick a41a4c4fa9d32d5d84b48aa4e1fb7984c2216cf2..master

Another option would be https://git-scm.com/book/en/v2/Git-Tools-Replace and keep only the history from the split onward.

orange-canvas-core already has only pertinent history.

@ales-erjavec
Copy link
Contributor Author

should we clean up https://github.com/biolab/orange-canvas-core/ and
https://github.com/biolab/orange-widget-base/ so that they take less space?

The https://github.com/biolab/orange-widget-base/ is now filtered

@markotoplak markotoplak merged commit 37e7b02 into biolab:master Jun 28, 2019
JakaKokosar added a commit to biolab/orange3-bioinformatics that referenced this pull request Jun 28, 2019
As of biolab/orange3#3772 widget report is no longer in Orange.canvas.report
JakaKokosar added a commit to biolab/orange3-bioinformatics that referenced this pull request Jun 28, 2019
As of biolab/orange3#3772 widget report is no longer in Orange.canvas.report
JakaKokosar added a commit to biolab/orange3-bioinformatics that referenced this pull request Jun 28, 2019
As of biolab/orange3#3772 widget report is no longer in Orange.canvas.report
@janezd janezd mentioned this pull request Jun 30, 2019
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 3, 2019
Add back setting controls lost in the refactoring canvas (biolabgh-3772)

Bump orange-canvas-core requirement to >=0.1.3
@ales-erjavec ales-erjavec mentioned this pull request Jul 3, 2019
3 tasks
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 4, 2019
Add back setting controls lost in the refactoring canvas (biolabgh-3772)

Bump orange-canvas-core requirement to >=0.1.3
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 5, 2019
The module was removed in biolabgh-3772 without a corresponding
FutureWarning grace period.
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 5, 2019
The stub module was removed in biolabgh-3772 without a corresponding
'FutureWarning' grace period.
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 5, 2019
The module was removed in biolabgh-3772 without a corresponding
'FutureWarning' grace period.
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 5, 2019
The stub module was removed in biolabgh-3772 without a corresponding
'FutureWarning' grace period.
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 10, 2019
Since biolabgh-3772 the `environ.widget_settings_dir` is no longer the
authoritative directory path.

Change the application name to 'Orange' to preserve historical
directory layout (the application name is used as the path component
in the settings path).
ales-erjavec added a commit to ales-erjavec/orange3 that referenced this pull request Jul 19, 2019
Add back setting controls lost in the refactoring canvas (biolabgh-3772)

Bump orange-canvas-core requirement to >=0.1.3
@ales-erjavec ales-erjavec deleted the orange-widget-base-rebase branch March 16, 2020 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants