Skip to content

Conversation

@melissalinkert
Copy link
Member

See ticket #10296.

@joshmoore
Copy link
Member

/cc @mtbc

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split directly on File.separatorChar?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above is incorrect (should be "\\\\" instead of "\\"), but splitting on File.separator directly is not quite right because of:

http://findbugs.sourceforge.net/bugDescriptions.html#RE_CANT_USE_FILE_SEPARATOR_AS_REGULAR_EXPRESSION

Fixing the backslash escaping in just a second.

@ghost
Copy link

ghost commented Feb 13, 2013

Other than the minor comments above, it looks fine. I'm unsure how best to test this though--do we need a server-side usage of this first so we can test it with FS?

@mtbc
Copy link
Member

mtbc commented Feb 13, 2013

Hopefully today I could use it in my code and make a PR that uses it testably in the server and includes the commits from this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I think of this as a static method -- does reader state matter at all?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A pre-setId method, so nearly static.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be called before or after setId; the current reader state makes no difference.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to start the comment with two asterisks so that Javadoc can pick it up?

(oh, no, sorry, just as a normal comment Javadoc will pick up the doc from the interface, I think, I was just wrongfooted by the Javadoc-style "see")

@mtbc
Copy link
Member

mtbc commented Feb 14, 2013

Looks good so far but I'll actually test it a bit today and comment here again later.

@mtbc
Copy link
Member

mtbc commented Feb 14, 2013

So, if I take the MIAS data from squig's data_repo/One Plate/001-365700055641 then maxDirCount - dirCount will be 1, so the function will return 3, and we will keep all 3 directories of that common parent starting from data_repo. @melissalinkert, does that seem to match your understanding?

@mtbc
Copy link
Member

mtbc commented Feb 14, 2013

Whoops, I now notice that @melissalinkert is marked as being away in the scheduling calendar. As far as I'm concerned, this PR is good to merge: if need be, the behavior can be tweaked at a later date. It would be bad if it retained too few directories, but in testing I've seen no problems of that kind and the code looks good.

@melissalinkert
Copy link
Member Author

I don't think that's right - likely because getRequiredDirectories needs to correct for the Batchresults directory (directories?) being present. If my memory of that dataset structure is correct, the return value should be 1, not 3.

Up to you guys whether or not to merge, but either way that'll need to be fixed.
-----Original Message-----
From: Mark Carroll notifications@github.com
Date: Thu, 14 Feb 2013 04:35:58
To: openmicroscopy/bioformatsbioformats@noreply.github.com
Reply-To: openmicroscopy/bioformats reply@reply.github.com
Cc: Melissa Linkertmelissa.linkert@gmail.com
Subject: Re: [bioformats] Add method to retrieve the significant directory
count (#374)

So, if I take the MIAS data from squig's data_repo/One Plate/001-365700055641 then maxDirCount - dirCount will be 1, so the function will return 3, and we will keep all 3 directories of that common parent starting from data_repo. @melissalinkert, does that seem to match your understanding?


Reply to this email directly or view it on GitHub:
#374 (comment)

@mtbc
Copy link
Member

mtbc commented Feb 14, 2013

Too small a return value would be a blocker, but returning 3 instead of 1, affecting MIAS only, makes me vote for merging so we get this function in and format-specific improvements can follow later.

@mtbc
Copy link
Member

mtbc commented Feb 15, 2013

One way to test this is to also apply ome/openmicroscopy#751 and view the paths created server-side under ManagedRepository after uploads.

@melissalinkert
Copy link
Member Author

I was mistaken; the return value of getRequiredDirectories for the above dataset should be 2 as One Plate/001-365700055641/ is what needs to be preserved. Should be fixed now.

@mtbc
Copy link
Member

mtbc commented Feb 20, 2013

Still good to merge for me.

@joshmoore
Copy link
Member

Thanks, guys. Merging and bumping the submodule pointer.

joshmoore added a commit that referenced this pull request Feb 20, 2013
Add method to retrieve the significant directory count
@joshmoore joshmoore merged commit acfe604 into ome:develop Feb 20, 2013
hflynn pushed a commit to hflynn/bioformats that referenced this pull request Oct 11, 2013
URL of Virtual Appliance changed to release downloads page, instead of Daily Builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants