Contributing to java.data?

35 views
Skip to first unread message

Cosmin Stejerean

unread,
Apr 22, 2011, 6:20:37 AM4/22/11
to cloju...@googlegroups.com
I just noticed the java.data contrib repository in the other thread about records. 

I have a project I wrote for dealing with nested java beans as part of using Clojure to interoperate with some Java APIs at work. It can recursively turn a Java object into a clojure property map, and it can turn a nested Clojure property map into a Java object hierarchy. It uses multimethods at the moment to allow one to extend it for specific use cases (like turning an XMLGregorianCalendar into something useful), etc. I have used this in production for close to a year and it has eliminated large amounts of duplication for dealing with Java APIs at work.

This code currently lives at https://github.com/offbytwo/beanhelpers and I would like to propose transferring it into java.data in contrib. I have a CA in place so there no problems from an IP point of view and there are no dependencies outside of Clojure. What is the proper way to discuss contributing this to java.data?


--
Cosmin Stejerean
http://offbytwo.com

Stuart Halloway

unread,
Apr 22, 2011, 9:52:04 AM4/22/11
to cloju...@googlegroups.com
That's awesome. I have added you ("cosmin") to the contrib group on github, so you should have commit access to java.data.  Organize the project to match the naming and common maven conventions for new contrib (take a look at e.g. tools.logging for an example). Let us know if you need any help with this.

Cheers,
Stu

Stuart Halloway
Clojure/core
http://clojure.com

Sean Corfield

unread,
Apr 22, 2011, 12:54:55 PM4/22/11
to cloju...@googlegroups.com
On Fri, Apr 22, 2011 at 6:52 AM, Stuart Halloway
<stuart....@gmail.com> wrote:
> That's awesome. I have added you ("cosmin") to the contrib group on github,
> so you should have commit access to java.data.

Can I get commit access (seancorfield) to so I can work on java.jdbc?
I've been working on my own fork so far because I had no commit access
to the clojure/java.jdbc repo. I talked with Steve (Gilardi) off-list
and he doesn't seem to mind which one of us is the official
maintainer: he said "I'd like to be involved, but would be happy to
pass being the maintainer on to you or someone else if I continue to
be a frustrating bottleneck."

Also, how do I get a build job set up on Hudson for java.jdbc?

Thanx in advance!
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Stuart Halloway

unread,
Apr 22, 2011, 1:05:49 PM4/22/11
to cloju...@googlegroups.com
>> That's awesome. I have added you ("cosmin") to the contrib group on github,
>> so you should have commit access to java.data.
>
> Can I get commit access (seancorfield) to so I can work on java.jdbc?
> I've been working on my own fork so far because I had no commit access
> to the clojure/java.jdbc repo. I talked with Steve (Gilardi) off-list
> and he doesn't seem to mind which one of us is the official
> maintainer: he said "I'd like to be involved, but would be happy to
> pass being the maintainer on to you or someone else if I continue to
> be a frustrating bottleneck."
>
> Also, how do I get a build job set up on Hudson for java.jdbc?
>
> Thanx in advance!

Added. Lots of people care about this one, so please keep us in the loop here on the dev list.

Aaron or Stuart can do the Hudson setup.

Stu

Aaron Bedra

unread,
Apr 22, 2011, 1:31:01 PM4/22/11
to cloju...@googlegroups.com
I will take care of the build setup as soon as the code is pushed. Just
let me know.

--
Cheers,

Aaron Bedra
--
Clojure/core
http://clojure.com

Sean Corfield

unread,
Apr 22, 2011, 2:54:42 PM4/22/11
to cloju...@googlegroups.com
On Fri, Apr 22, 2011 at 10:05 AM, Stuart Halloway
<stuart....@gmail.com> wrote:
> Added.

Thanx. My fork is all merged back to clojure/java.jdbc with the commit
history intact (thanx to ebneter on SO - merging across repos and
retaining history was new territory to me!).

> Lots of people care about this one, so please keep us in the loop here on the dev list.

So far the only stuff I've done is:
* setup pom.xml for maven
* remove dependencies on old c.c.* stuff
* replaced indexed with map-indexed per your advice (thanx Stu!)
* updated file header comments to match new namespaces and add migrating date
* mark *db* as ^:dynamic to satisfy latest 1.3.0 snapshot

And the only potentially controversial one (which is a
work-in-progress right now):
* have the PreparedStatement return generated keys so insert
operations return those keys

I need to clean that up so a) it only tries to return generated keys
for inserts (possibly only single inserts) and b) it returns just the
generated key value (not a data structure containing it). I'll need to
spend a while testing it against different databases to be sure I've
got that right.

I plan to move all the print-related stuff out of internal.clj into a
separate namespace, just for maintainability. And I'd love to get as
much input as possible on what folks want / need in java.jdbc!

The other big thing that needs doing - and here I need input from the
group - is that the 'tests' are currently just example code showing
how to use the library and they depend on Apache Derby. What are best
practices for library tests and what do folks suggest I do for
database access / support here so that the tests can be self-contained
yet relatively exhaustive?

Also, given that the current test file is really examples, should that
move to the README.md as documentation instead?

> Aaron or Stuart can do the Hudson setup.

Thanx.

Cosmin Stejerean

unread,
Apr 24, 2011, 12:42:18 AM4/24/11
to cloju...@googlegroups.com
On Fri, Apr 22, 2011 at 8:52 AM, Stuart Halloway <stuart....@gmail.com> wrote:
That's awesome. I have added you ("cosmin") to the contrib group on github, so you should have commit access to java.data.  Organize the project to match the naming and common maven conventions for new contrib (take a look at e.g. tools.logging for an example). Let us know if you need any help with this.

Thanks, I moved the old beanhelpers code to the new repo. Can someone please take a look at the new code at https://github.com/clojure/java.data and see if the POM, naming, etc follows the proper convention. I tried basing this it on the other contrib repos as suggested.

I imagine the next step is to create a Hudson project to build this?

Stuart Sierra

unread,
Apr 24, 2011, 1:27:58 PM4/24/11
to cloju...@googlegroups.com
Hi Cosmin,

I've created a Hudson job, first snapshot build is successful.

I'll create a Hudson account for you and grant you release permissions.

-Stuart Sierra
clojure.com

pmbauer

unread,
Apr 25, 2011, 3:14:51 PM4/25/11
to Clojure Dev
(no jira, so replying here)
https://github.com/clojure/java.data/issues/1

On Apr 23, 9:42 pm, Cosmin Stejerean <cos...@offbytwo.com> wrote:
> Thanks, I moved the old beanhelpers code to the new repo. Can someone please
> take a look at the new code athttps://github.com/clojure/java.dataand see
Reply all
Reply to author
Forward
0 new messages