Modern Julia Workflows ep. 2 - creating packages

A while back, some friends (@jacobusmmsmit @hill) and I started a blog called Modern Julia Workflows, to reveal the hidden secrets of Julia development. I am pleased to announce that this blog is making progress, and that the second tutorial is now complete!
It will take you from a dirty script to a fully functional and reproducible Julia package, featuring all the niceties we love: GitHub actions, tests, documentation, good style, quality checks, compatibility bounds and much more. I honestly think every Julia user can learn something there, no matter how advanced they are.

https://modernjuliaworkflows.github.io/sharing/

Now we want your ruthless feedback, either here or directly on the GitHub repo. Did you find this useful? What do you think is missing?

Original announcement:

47 Likes

Thanks for this tutorial, I used it already, very useful!

One small thing at the beginning is confusing: you rightly remind packages should end with “.jl” extension, but immediately after that you show example in the terminal “MyAwesomePackage” with no “.jl” at the end.

1 Like

Maybe this is a misunderstanding. The package name should not include .jl but it is a common convention to append .jl to the repository name.

7 Likes

This is great starting advice! Today I was updating my newproj.jl script that has all my PkgTemplates defaults:


#! /usr/bin/env julia --compile=min 

using Pkg
Pkg.activate(dirname(@__FILE__); io = devnull)
Pkg.instantiate()
using PkgTemplates

function newproj(projname, orgname = "sjkelly")
    tpl = Template(;
        user = orgname,
        plugins = [
            Git(; manifest = false, ssh = true),
            Documenter{GitHubActions}(),
            TagBot(),
            CompatHelper(),
            Dependabot(),
            Codecov(),
            Coveralls(),
            GitHubActions(; linux = true, osx = true),
            Tests(;
                project = true,
                aqua = true,
                aqua_kwargs = NamedTuple(),
                jet = true
            ),
            Formatter(;
                file = "./.JuliaFormatter.toml"
            )
        ]
    )

    return tpl(projname)
end

if !isempty(ARGS)
    newproj(ARGS[1])
else
    println("Usage: newproj <project name> <orgname>")
end
2 Likes