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] Allow add-ons to register file format for the Save widget #4302

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Dec 27, 2019

Issue

Resolves #3701.

Description of changes

The first commit replaces class attribute filters of OWSaveBase with a class method get_filters to allow derived classes to create the list dynamically. Class attribute filters still exists and the provided get_filters returns it; this is to ensure the backward compatibility. Making filters a property instead of creating a method is not a good alternative: filters is used in some class methods that cannot be easily changed into ordinary methods (i.e. methods of classes that implement platform-specific dialogs). Thus filter would have to be a class property, but class properties are messy hacks (unless we want to have a meta class for OWSaveBase).

The second commit implements get_methods for OWSave.

Includes
  • Code changes
  • Tests
  • Documentation

@janezd janezd changed the title Save addon formats Allow add-ons to register file format for the Save widget Dec 27, 2019
@janezd janezd changed the title Allow add-ons to register file format for the Save widget [ENH] Allow add-ons to register file format for the Save widget Dec 27, 2019
@codecov
Copy link

codecov bot commented Dec 27, 2019

Codecov Report

Merging #4302 into master will decrease coverage by <.01%.
The diff coverage is 97.95%.

@@            Coverage Diff             @@
##           master    #4302      +/-   ##
==========================================
- Coverage   86.69%   86.69%   -0.01%     
==========================================
  Files         396      396              
  Lines       71561    71577      +16     
==========================================
+ Hits        62039    62052      +13     
- Misses       9522     9525       +3

@markotoplak markotoplak merged commit 6c9039a into biolab:master Jan 10, 2020
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.

Save widget: support other formats
2 participants