-
Notifications
You must be signed in to change notification settings - Fork 71
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
Service Provider for applying enhancements #1369
Merged
haileyajohnson
merged 15 commits into
Unidata:maint-5.x
from
matakleo:ClassifierServiceProvider
Jul 18, 2024
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
82fdbe9
the best version so far
matakleo 20d02d5
matche python mostly
matakleo dfdfbd0
before major change, kinda works
matakleo d0f67e2
long one, all numpy stuff
matakleo c44eddc
added apache.commons.math3
matakleo 0a17feb
delete unused files
matakleo 773e442
Reach the class and do something
matakleo ecb551f
Service provider deep in VariableDS
matakleo 1717675
ok some things work here
matakleo 5324639
looks like all works??
matakleo bfbc4ff
style application
matakleo 74f6a03
Make it shorter and nicer
matakleo 7ee573e
Fix the comments
matakleo 642b9f2
final version
matakleo 7892b2d
one case sensitive letter update
matakleo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
cdm/core/src/main/java/ucar/nc2/filter/EnhancementProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright (c) 2021 University Corporation for Atmospheric Research/Unidata | ||
* See LICENSE for license information. | ||
*/ | ||
|
||
package ucar.nc2.filter; | ||
|
||
import ucar.ma2.*; | ||
import ucar.nc2.*; | ||
import ucar.nc2.dataset.NetcdfDataset.Enhance; | ||
import ucar.nc2.dataset.VariableDS; | ||
|
||
|
||
/** | ||
* A Service Provider of {@link Enhancement}. | ||
*/ | ||
public interface EnhancementProvider { | ||
|
||
boolean appliesTo(Enhance enhance, AttributeContainer attributes, DataType dt); | ||
|
||
Enhancement create(VariableDS var); | ||
|
||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
cdm/core/src/main/resources/META-INF/services/ucar.nc2.filter.EnhancementProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ucar.nc2.filter.Classifier$Provider | ||
ucar.nc2.filter.Standardizer$Provider | ||
ucar.nc2.filter.Normalizer$Provider | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to commit changes to this file at all it seems :)