Re: Noob guidelines for writing a new package?

161 views
Skip to first unread message

Jacob Quinn

unread,
Mar 21, 2013, 12:59:37 PM3/21/13
to juli...@googlegroups.com
I would check out the documentation on modules (as they play a big part in managing namespace): http://docs.julialang.org/en/latest/manual/modules/

Then check out the Metadata.jl repo to see how other packages are put together: https://github.com/JuliaLang/METADATA.jl

The readme on Metadata.jl has the main bulk of information on putting together packages. 

You can also check out the 'Example' package which was put together for this exact purpose: https://github.com/JuliaLang/METADATA.jl/tree/master/Example

There's also more info by searching this group:



On Thursday, March 21, 2013 10:49:32 AM UTC-5, Jiahao Chen wrote:
Hi all,

I am new to Julia and trying to put together some functions into a new package. However, I am having trouble finding documentation on how packages are formatted and submitted to the master package repo.

Would appreciate pointers to up-to-date documentation or step-by-step instructions in how to write the necessary METADATA, etc.

Thanks,

Jiahao Chen
MIT Chemistry

Viral Shah

unread,
Mar 21, 2013, 1:10:33 PM3/21/13
to juli...@googlegroups.com
It would be really great if someone can submit a pull request adding package creation steps to CONTRIBUTING.md. 

-viral

Patrick O'Leary

unread,
Mar 21, 2013, 1:16:46 PM3/21/13
to juli...@googlegroups.com
Also take a look at Pkg.new(), which creates a skeleton. Correct METADATA can be written with functions available in Pkg as well (pkg_origin() and major()/minor()/patch()).

Jacob Quinn

unread,
Mar 21, 2013, 2:32:32 PM3/21/13
to juli...@googlegroups.com
What about a 'Packages' page in the documentation manual? That's probably the most central, most-viewed location. It could cover Pkg basics, adding, updating, and then have a later section that covers basic package creations steps and includes a few relevant links.

-Jacob

Viral Shah

unread,
Mar 21, 2013, 4:33:35 PM3/21/13
to juli...@googlegroups.com
The Packages page in the manual would be for users to use packages, which is also needed. We do not really have documentation for developers yet, which is why I suggested adding it to CONTRIBUTING.md for now.

-viral

John Myles White

unread,
Mar 22, 2013, 7:30:31 PM3/22/13
to juli...@googlegroups.com
I think writing a package is somewhere in between being a user of Julia and being a developer, so I'd support putting a Package Writing section in the manual.

-- John

Gustavo Lacerda

unread,
Apr 3, 2013, 2:31:51 PM4/3/13
to juli...@googlegroups.com
So I'm writing my first package.
Are there guidelines on where to put example code? Can it go on the
same .jl file as the essential code?

Gustavo

Gustavo Lacerda

unread,
Apr 3, 2013, 2:36:32 PM4/3/13
to juli...@googlegroups.com
I now see that http://docs.julialang.org/en/latest/manual/packages/
answers my question!
Thanks!

Gustavo
Reply all
Reply to author
Forward
0 new messages