Re: [CSV] Headers and the first record

2013-07-31 Thread Benedikt Ritter
2013/7/31 Gary Gregory garydgreg...@gmail.com On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg ebo...@apache.org wrote: Le 30/07/2013 23:26, Gary Gregory a écrit : And another thing: internally, the header should be a SetString, not a String[]. I plan on fixing that later too. Why

[CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

2013-07-31 Thread Benedikt Ritter
2013/7/30 Gary Gregory garydgreg...@gmail.com On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter brit...@apache.org wrote: Hi, I've attached a patch to CSV-99 [1]. Feedback is welcome! If nobody objects, I'll apply this patch on sunday. This one is done. Thanks for fixing this.

Re: commons-monitoring?

2013-07-31 Thread Luc Maisonobe
Le 28/07/2013 18:30, Mark Struberg a écrit : Hi folks! Romain is a great guy, I've now added him to commons-sandbox. Thanks Mark. I am really sorry for the delay. I have just read today the mail Benedikt sent me 5 days ago :-( sorry Luc LieGrue, strub - Original Message

Re: [CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

2013-07-31 Thread Benedikt Ritter
2013/7/31 Benedikt Ritter brit...@apache.org 2013/7/30 Gary Gregory garydgreg...@gmail.com On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter brit...@apache.org wrote: Hi, I've attached a patch to CSV-99 [1]. Feedback is welcome! If nobody objects, I'll apply this patch on sunday.

Re: [CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

2013-07-31 Thread Emmanuel Bourg
Le 31/07/2013 10:15, Benedikt Ritter a écrit : Now that I'm thinking about it I don't understand what we need the copy method at all. CSVFormats are immutable and can therefore be shared. If I want a copy of a format but with a parameter set differently I can simply call the withXxx() method

Re: [CSV] Headers and the first record

2013-07-31 Thread sebb
On 31 July 2013 08:38, Benedikt Ritter brit...@apache.org wrote: 2013/7/31 Gary Gregory garydgreg...@gmail.com On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg ebo...@apache.org wrote: Le 30/07/2013 23:26, Gary Gregory a écrit : And another thing: internally, the header should be a

Re: [CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

2013-07-31 Thread Gary Gregory
On Jul 31, 2013, at 4:40, Emmanuel Bourg ebo...@apache.org wrote: Le 31/07/2013 10:15, Benedikt Ritter a écrit : Now that I'm thinking about it I don't understand what we need the copy method at all. CSVFormats are immutable and can therefore be shared. If I want a copy of a format but with

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Jul 31, 2013, at 3:38, Benedikt Ritter brit...@apache.org wrote: 2013/7/31 Gary Gregory garydgreg...@gmail.com On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg ebo...@apache.org wrote: Le 30/07/2013 23:26, Gary Gregory a écrit : And another thing: internally, the header should be a

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Tue, Jul 30, 2013 at 5:47 PM, Emmanuel Bourg ebo...@apache.org wrote: Le 30/07/2013 23:24, Gary Gregory a écrit : Yeah, that's too clever IMO. I expected the same behavior WRT record reading with the only difference being if I let the parser guess or not. Too clever? I didn't feel like

Re: [CSV] Headers and the first record

2013-07-31 Thread Emmanuel Bourg
Le 31/07/2013 15:08, Gary Gregory a écrit : But that is exactly what _was_ happening! ;) If I called withHeader(A, B, C) the header was not skipped. Sounds good. The header is defined in the code, we don't expect to see the header in the file so nothing is skipped. If I called

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 8:58 AM, Gary Gregory garydgreg...@gmail.comwrote: On Jul 31, 2013, at 3:38, Benedikt Ritter brit...@apache.org wrote: 2013/7/31 Gary Gregory garydgreg...@gmail.com On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg ebo...@apache.org wrote: Le 30/07/2013 23:26,

[CSV] Accessing a subset of the available headers (Was: Re: [CSV] Headers and the first record)

2013-07-31 Thread Benedikt Ritter
snip A use case I have now is a CSV file with a lot of columns (~90) but I only care about a small subset of the columns (~10). I'd like to be able to say withHeader(Set) where the Set may be a subset of the actual column names in the header line. This is different from withHeader(String[])

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 9:34 AM, Emmanuel Bourg ebo...@apache.org wrote: Le 31/07/2013 15:08, Gary Gregory a écrit : But that is exactly what _was_ happening! ;) If I called withHeader(A, B, C) the header was not skipped. Sounds good. The header is defined in the code, we don't expect

Re: [CSV] Accessing a subset of the available headers (Was: Re: [CSV] Headers and the first record)

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 10:42 AM, Benedikt Ritter brit...@apache.orgwrote: snip A use case I have now is a CSV file with a lot of columns (~90) but I only care about a small subset of the columns (~10). I'd like to be able to say withHeader(Set) where the Set may be a subset of the

Re: [CSV] Headers and the first record

2013-07-31 Thread Mark Fortner
I took a brief look at the API for CSV, and thought I would share a typical use case from the biotech industry. We deal with a lot of instruments that produce a multiline header. The header usually contains experiment conditions. You can think of this as metadata for the columnar data. The

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 11:14 AM, Mark Fortner phidia...@gmail.com wrote: I took a brief look at the API for CSV, and thought I would share a typical use case from the biotech industry. We deal with a lot of instruments that produce a multiline header. The header usually contains experiment

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 10:48 AM, Gary Gregory garydgreg...@gmail.comwrote: On Wed, Jul 31, 2013 at 9:34 AM, Emmanuel Bourg ebo...@apache.org wrote: Le 31/07/2013 15:08, Gary Gregory a écrit : But that is exactly what _was_ happening! ;) If I called withHeader(A, B, C) the header was

Re: svn commit: r1508938 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVPrinter.java

2013-07-31 Thread Benedikt Ritter
Whoops that's my one… thanks for fixing :) Am 31.07.2013 um 17:48 schrieb ggreg...@apache.org: Author: ggregory Date: Wed Jul 31 15:48:54 2013 New Revision: 1508938 URL: http://svn.apache.org/r1508938 Log: Fix NPE when format is null. Modified:

Re: [CSV] Accessing a subset of the available headers (Was: Re: [CSV] Headers and the first record)

2013-07-31 Thread Benedikt Ritter
2013/7/31 Gary Gregory garydgreg...@gmail.com On Wed, Jul 31, 2013 at 10:42 AM, Benedikt Ritter brit...@apache.org wrote: snip A use case I have now is a CSV file with a lot of columns (~90) but I only care about a small subset of the columns (~10). I'd like to be able to say

Re: [proxy] and impl

2013-07-31 Thread Romain Manni-Bucau
Hi here is the asm4-shaded impl: https://gist.github.com/rmannibucau/6125125 *Romain Manni-Bucau* *Twitter: @rmannibucau https://twitter.com/rmannibucau* *Blog: **http://rmannibucau.wordpress.com/*http://rmannibucau.wordpress.com/ *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github:

Re: [CSV] Accessing a subset of the available headers (Was: Re: [CSV] Headers and the first record)

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 2:38 PM, Benedikt Ritter brit...@apache.org wrote: 2013/7/31 Gary Gregory garydgreg...@gmail.com On Wed, Jul 31, 2013 at 10:42 AM, Benedikt Ritter brit...@apache.org wrote: snip A use case I have now is a CSV file with a lot of columns (~90) but I

Re: [proxy] and impl

2013-07-31 Thread Matt Benson
Nice... this would probably be enough, dependency-wise, IMO, until someone actually has a need for something else. Matt On Wed, Jul 31, 2013 at 2:07 PM, Romain Manni-Bucau rmannibu...@gmail.comwrote: Hi here is the asm4-shaded impl: https://gist.github.com/rmannibucau/6125125 *Romain

Re: [proxy] and impl

2013-07-31 Thread James Carman
Any chance you could hook that into our existing test suite? We have a base class for all ProxyFactory tests. Also, could you apply your fix to the 2.0 branch? We're not upgrading proxy-1.x to Java 6. That's happening in the 2.x release. On Wed, Jul 31, 2013 at 3:07 PM, Romain Manni-Bucau

Re: [CSV] Headers and the first record

2013-07-31 Thread Mark Fortner
Hi Gary, One other complication I forgot to mention. Compounds are usually run multiple times. So the same compound will appear with the same set of concentrations. In practice you would end up with column headers that have the same text in them, so this issue with using a Set vs String[] for

Re: [proxy] and impl

2013-07-31 Thread Matt Benson
Since [proxy] is in proper, Romain probably doesn't (yet) have access to commit this himself. Matt On Wed, Jul 31, 2013 at 2:31 PM, James Carman ja...@carmanconsulting.comwrote: Any chance you could hook that into our existing test suite? We have a base class for all ProxyFactory tests.

Re: [proxy] and impl

2013-07-31 Thread James Carman
I know. I mean can we get a patch against the 2.x branch. On Wed, Jul 31, 2013 at 3:44 PM, Matt Benson gudnabr...@gmail.com wrote: Since [proxy] is in proper, Romain probably doesn't (yet) have access to commit this himself. Matt On Wed, Jul 31, 2013 at 2:31 PM, James Carman

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 3:44 PM, Mark Fortner phidia...@gmail.com wrote: Hi Gary, One other complication I forgot to mention. Compounds are usually run multiple times. So the same compound will appear with the same set of concentrations. In practice you would end up with column headers

Re: [CSV] Headers and the first record

2013-07-31 Thread Mark Fortner
Hi Gary, This does not look like a classic CSV file. I guess it depends on what your definition of classic is. :-) This is pretty typical for most drug discovery companies. It sounds like your files contain different sections in different formats. True. In its current state,

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 4:38 PM, Mark Fortner phidia...@gmail.com wrote: Hi Gary, This does not look like a classic CSV file. I guess it depends on what your definition of classic is. :-) This is pretty typical for most drug discovery companies. It sounds like your files contain

[Math] Reduce code duplication in RandomDataGenerator (MATH-1012)

2013-07-31 Thread Gilles
Hi. Please have a look at https://issues.apache.org/jira/browse/MATH-1012 Regards, Gilles - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org

[csv] the plot thinkens: multi-record headers

2013-07-31 Thread Gary Gregory
Hi All, I found an interesting set of sample CSV files [1] on the IBM Tivoli web site. Each file seems to have a, for lack of a better term, pre-header. For example, the simplest file [2] looks like this (3 lines): SRM_SaaS_ES,MXASSETInterface,AddChange,EN ASSETNUM,AS_SITEID mesa01,SDASITE A