Contents

Developing Julia packages

Notes about developing Julia packages.

Source

  1. Developing Julia packages by Chris
  1. Developing your Julia package (Medium post)

Package structure

PkgTemplates.jl is recommended to generate package structures with unit tests and CI/CD integrations.

Unit testing

Tip: you can have local dependencies for running tests in test/Project.toml without the need of extra and targets sections in the main project’s Project.toml.

Though the build-in unit-test framework is good, but Jive.jl provides more flexibilities.

  • Discover unit testing jl files automatically.
  • Skip or select which test(s) to run.
  • Multiprocessing for faster runs.

See TestJive for code examples.

Documentation

Youtube video on Documenter.jl, the documentation generator for Julia packages.

Tip: you may need to generate an SSH key for deploying docs to GitHub pages.

1
2
using DocumenterTools
DocumenterTools.genkeys(user="you", repo="YourPackage.jl")

Continuous integration / delivery

PkgTemplates.jl should set up the appropriate code structure for you. I would recommend to use GitHub to host Julia packages because

  • Running GH actions is unlimited for public repositories, with multiple operating systems running concurrently (matrix build).
  • Julia github actions are convenient.
  • Automation bots integrate better with GitHub. e.g. TagBot, Registerbot, and Compat Helper.