-
Notifications
You must be signed in to change notification settings - Fork 133
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
OutStreams as RAVEN entity #1329
Changes from 14 commits
bf91499
8d9b1e3
b8517a5
a1dfc84
a0e0516
40e2840
853d6d3
8246ad4
343e304
059c81b
1ccc6d8
eed47d4
fb774bf
62e6453
0b9bb5c
475ba9b
f2b45a8
942ffe4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,29 +22,22 @@ | |
|
||
################################################################################ | ||
from utils import utils | ||
from .OutStreamManager import OutStreamManager | ||
from .OutStreamPlot import OutStreamPlot | ||
from .OutStreamPrint import OutStreamPrint | ||
## [ Add new class here ] | ||
################################################################################ | ||
## Alternatively, to fully automate this file: | ||
# from OutStreamManagers import * | ||
################################################################################ | ||
|
||
""" | ||
Interface Dictionary (factory) (private) | ||
""" | ||
# This machinery will automatically populate the "knownTypes" given the | ||
# imports defined above. | ||
__base = 'OutStreamManager' | ||
__interFaceDict = {} | ||
from .OutStreamBase import OutStreamBase | ||
|
||
from .FilePrint import FilePrint | ||
from .GeneralPlot import GeneralPlot | ||
# from .DataMining import DataMining | ||
# from .VDCComparison import VDCComparison | ||
|
||
for classObj in utils.getAllSubclasses(eval(__base)): | ||
## As long as these subclasses follow the pattern of starting with OutStream | ||
## this will appropriately key them to a more user-friendly name without the | ||
## need for them to redudantly prepend "X" as "OutStreamX" | ||
key = classObj.__name__.replace('OutStream','') | ||
__interFaceDict[key] = classObj | ||
# Interface Dictionary (factory) (private) | ||
__base = 'OutStreamBase' | ||
__interFaceDict = { | ||
'Print': FilePrint, | ||
'Plot': GeneralPlot, | ||
# 'DataMining': DataMining, | ||
# 'VDCComparison': VDCComparison, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my opinion the specializations of the Plots/Prints should be under Plot/Print (similarly to External Model/type or Code, CodeInterfaces) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. placeholder for discussion There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm noticing immediately that there would be a big benefit for a base class for <OutStreams>
<Print>
<MyCustomPrint>
<... options ...>
</MyCustomPrint>
</Print>
</OutStreams> although there's a couple things I don't love about this:
The other two options I see are the way I hinted at here <OutStreams>
<MyCustomPrint>
<... options ...>
</MyCustomPrint>
</OutStreams> or using the Definitely a good discussion to have when we start designing the first new entries. |
||
} | ||
|
||
def knownTypes(): | ||
""" | ||
|
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.
These are placeholders for the future; they can be removed if desired. Same with later on in this file.