Skip to content

How to register a julia package

Alberto F. Martin edited this page Sep 17, 2020 · 10 revisions

Registration process

The process of registering a Julia package is very easy thanks to the JuliaRegistrator bot.

  1. Install the JuliaRegistrator bot in your github repo/organization. Note: the bot is already installed in the gridap organization.

  2. (Optional). Install the Julia TagBot to automatically generate a release tag in your repo, once a new version is registered. Note: this bot is also already installed in the gridap organization.

  3. Prepare your release (see instructions below). At least, edit the version number in the Project.toml file with the version you want to register (usually version 0.1.0 for new packages). Commit the changes.

  4. Trigger the JuliaRegistrator bot: Open the github page of the commit corresponding the version you want to register. Make a comment to this commit mentioning the JuliaRegistrator bot as follows: @JuliaRegistrator register(). See an example here. This will automatically create a PR in the Julia registry with an entry corresponding to the version you register.

  5. Wait a couple of days until the PR is merged. Be patient.

Preparing your release

Things to be done before triggering a release.

  1. Make sure that all tests in your package are passing.

  2. Make sure that the documentation is compiled without warnings.

  3. Make sure that the version number in the Project.toml is the one you want to register (usually version 0.1.0 for new packages).

  4. Make sure that your package depends only on registered versions of other packages. For example, it is not recommended to register a package that depends on the "master" version of other package.

  5. Make sure that the Project.toml has a [compat] section. See an example here. Add, in this section, the minimum version of Julia supported by your package. Add also version constraints for the dependencies of your package. Make sure that these versions are consistent with the Manifest.toml file.

  6. You are ready to register!

Specific steps to registering Gridap

  1. Create a branch release-x.y (if it is not already created), where x,y match the major and minor version of your release. Use this branch to prepare the release. If your release is the highest in the repository, merge this branch to master (via a PR) before registering the package. Otherwise, do not merge and register from this branch.

  2. Before releasing, make sure that the NEWS.md file contains the right date and version number and that Project.toml has the right version number.

  3. After a large refactoring, it is convenient to check that the tests in the Tutorials package pass for the Gridap version you want to register. For breaking releases, you sometimes need to create a new branch in the Tutorial repo to update the tutorials to the new syntax introduced in your release (if it is the case).