Re: [proxy] and impl

2013-07-31 Thread Romain Manni-Bucau
ok, here it is: https://gist.github.com/rmannibucau/6128964 btw I have some question and notes about what i saw in proxy2: 1) i didn't fully get the goal of stub module, any pointers? 2) in ProxyFactory methods have this kind of signature T createDelegatorProxy( ClassLoader classLoader, Object

[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 m

[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

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 4:38 PM, Mark Fortner 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 differen

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, c

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 3:44 PM, Mark Fortner 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 that have > the sam

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 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 > wrote: > >> Any chance

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 wrote: > 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

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 th

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 wrot

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 wrote: > Hi > > here is the asm4-shaded impl: https://gist.github.com/rmannibucau/6125125 > > *Romain Manni-Bucau* > *Twitt

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 wrote: > 2013/7/31 Gary Gregory > > > On Wed, Jul 31, 2013 at 10:42 AM, Benedikt Ritter > >wrote: > > > > > > > > > > > >> 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 t

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 * *Blog: **http://rmannibucau.wordpress.com/* *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: h

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 > On Wed, Jul 31, 2013 at 10:42 AM, Benedikt Ritter >wrote: > > > > > > > >> 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 t

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: > > commons/proper/csv/trunk

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 10:48 AM, Gary Gregory wrote: > On Wed, Jul 31, 2013 at 9:34 AM, Emmanuel Bourg 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. >> >> So

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 11:14 AM, Mark Fortner 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 > conditions".

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 ex

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 wrote: > > > >> 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

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Wed, Jul 31, 2013 at 9:34 AM, Emmanuel Bourg 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 to

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

2013-07-31 Thread Benedikt Ritter
>> 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 8:58 AM, Gary Gregory wrote: > On Jul 31, 2013, at 3:38, Benedikt Ritter wrote: > > > 2013/7/31 Gary Gregory > > > >> On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg > wrote: > >> > >>> Le 30/07/2013 23:26, Gary Gregory a écrit : > And another thing: internally, the

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 wit

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Tue, Jul 30, 2013 at 5:47 PM, Emmanuel Bourg 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 I designe

Re: [CSV] Headers and the first record

2013-07-31 Thread Gary Gregory
On Jul 31, 2013, at 3:38, Benedikt Ritter wrote: > 2013/7/31 Gary Gregory > >> On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg wrote: >> >>> Le 30/07/2013 23:26, Gary Gregory a écrit : And another thing: internally, the header should be a Set, not >> a String[]. I plan on fixing that

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 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 a paramete

Re: [CSV] Headers and the first record

2013-07-31 Thread sebb
On 31 July 2013 08:38, Benedikt Ritter wrote: > 2013/7/31 Gary Gregory > >> On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg wrote: >> >> > Le 30/07/2013 23:26, Gary Gregory a écrit : >> > > And another thing: internally, the header should be a Set, not >> a >> > > String[]. I plan on fixing that

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() meth

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

2013-07-31 Thread Benedikt Ritter
2013/7/31 Benedikt Ritter > > > 2013/7/30 Gary Gregory > >> On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter >> 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. >> > > T

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

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

2013-07-31 Thread Benedikt Ritter
2013/7/30 Gary Gregory > On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter > 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. I'm still not sure what's

Re: [CSV] Headers and the first record

2013-07-31 Thread Benedikt Ritter
2013/7/31 Gary Gregory > On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg wrote: > > > Le 30/07/2013 23:26, Gary Gregory a écrit : > > > And another thing: internally, the header should be a Set, not > a > > > String[]. I plan on fixing that later too. > > > > Why should it be a set? Is there an