-
Notifications
You must be signed in to change notification settings - Fork 16
IRSA-629 and IRSA-630: add generic way to get downloader in time series tool #421
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
Conversation
…ad processor and PTF in particular
*/ | ||
|
||
|
||
@SearchProcessorImpl(id = "PtfProcimsFileRetrieve") |
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.
+@SearchProcessorImpl(id = "PtfProcimsFileRetrieve")
this processor id is the same with the one in ife but the getBaseURL parameter is different, in ife(gwt) the host, schemaGroup, schema and table are read in from the xml configuration. In firefly the params are set in the PTFPlotRequests and ptfDownloadOptPanel, "mission" is equivalent to schemaGroup. would it be confusion, when we build TST under irsaviewer? the two processor (one in firefly, the other in ife) with the same processor id. I would suggest using PtfTSProcimsFileRetrieve
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.
Actually, none of those processor are used. IBE generic code in Firefly make use of edu.caltech.ipac.astro.ibe.datasource.PtfIbeDataSource#makeDataParam to determine the URL to download the file by single processor : IBE file retrieve processor.
I will actually remove them because there are useless. Thanks for catching that!
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.
I've actually kept them because they are identical to the ife ones and i think they can be useful in the future. I just changed the id
name to avoid confusion, but these classes are not for LC per se, they are for getting IBE PTF specifically.
BTW, if you want to run the newly test added to this branch, you will need to checkout IRSA-629-add-ptf-images branch under |
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.
Looks good, test runs well too. It is nice that the download processor can be called for specific mission now. Noted that the file download has pending issue with the background monitor, but not to be solved in this PR.
PR approved
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.
Code looks fine and it works well.
I have a couple of comments, but they are not a big deal.
However, I've just push a commit that fixed the packaging regression bug. Please review and merge when ready.
@@ -49,7 +52,7 @@ | |||
public String getTable() { return table;} | |||
} | |||
|
|||
public PtfIbeDataSource() {} | |||
public PtfIbeDataSource() { ptfResolver = new PtfIbeResolver();} |
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.
I think this assignment should be in initialize(). It awkward to see assignment in one constructor, but not in the others. After looking at it, the empty constructor and initialize() should be combined as a static creator. But, maybe next time.
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.
there is only one constructor. is fine.
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.
You are right. I will add it to setupDs() which is called by initialize anyway.
// extName = null; | ||
// } | ||
|
||
fi = new FileInfo(url, extName, 100000); |
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.
I assume 100000 is an arbitrary number. I think if you don't know what the size of the file should be, just put 0.
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.
should be '0' actually but it works seamlessly i think. Will change it.
|
||
private static String getBaseURL(ServerRequest sr) throws MalformedURLException { | ||
// build service | ||
return new PtfFileRetrieve().getBaseURL(sr); |
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.
Why is PtfFileRetrieve().getBaseURL(sr) not a static method.
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.
left from previous code introduced in different access, can be static now. Will change.
} | ||
|
||
|
||
DataGroup dataObjects = DataGroupReader.readAnyFormat(tempFile); |
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.
Since we know it's an ipac table, no need to call this method and waste the overhead.
DataGroupReader.read(tempFile)
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.
good point!
|
||
if(!convertData.downloadOptions){ | ||
downloaderOptPanel = defaultOptPanel; | ||
} |
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.
This plus the assignment at top is a bit of a mind-twister.. Don't you mean this?
const downloaderOptPanel = convertData.downloadOptions || defaultOptPanel
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.
Yep, will clean it up as i have to clean up other things too.
@ejoliet , FYI: I've just pushed another commit to fix 'Get Download Script' regression bug. |
Great! i will look at it and let you know.
THanks!
…On 7/25/17 4:26 PM, Loi Ly wrote:
@ejoliet <https://github.com/ejoliet> , FYI: I've just pushed another
commit to fix 'Get Download Script' regression bug.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#421 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvATJEAkNjegOYtnKRMoxWI63UUL43Bks5sRnmKgaJpZM4OhzBn>.
--
Emmanuel Joliet
NASA/IPAC Infrared Science Archive
MS 100-22, Caltech, Pasadena, CA 91125
Office: 168
Email: [email protected]
Phone: (626) 395-1489
|
This pull request combined 2 tickets IRSA-629 and 630.
One (IRSA-629) causes other one (IRSA-630): in order to get a different download processor (other than the current fixed one for WISE), i have introduced a function to deal with it in the UI form the converter factory.
Then i have added a specific server-side processor to package the files to be downloaded with the help of Wei's ticket (IRSA-514). Firefly has IBE for PTF included now.
There is a current issue with the background monitor (@Loi will fix it soon), once is fixed, the test should be going to the Timeseries tool and upload a LC for PTF, then select any row of the table and download the file(s) to test.