Developer Guide

Open an issue before starting significant work. The ColPrac guidelines is recommended.

Local Setup

This procedure is required only once. Install Revise.jl and Runic.jl, and clone this repository.

# Install Tools
julia --startup-file=no -e 'import Pkg; Pkg.add("Revise")'
julia --project=@runic --startup-file=no -e 'using Pkg; Pkg.add("Runic")'

# Clone Repo
git clone https://github.com/ohno/MyPkg49.jl.git
cd MyPkg49.jl

# Start Session
julia --startup-file=no -i -E 'using Revise; import Pkg; Pkg.activate("."); using MyPkg49' 

You're ready to start with the Step 3 of How to develop a Julia package.

https://pkgdocs.julialang.org/v1/creating-packages/

Development Flow

  1. Start an interactive session with Revise.jl.
  2. Change codes.
  • DocString https://documenter.juliadocs.org/stable/man/guide/#Adding-Some-Docstrings
  • Use julia --project=. --startup-file=no -e 'import Pkg; Pkg.add("Something"); Pkg.resolve(); Pkg.instantiate()' to add Something.jl as a dependency. Project.toml will be updated.
  1. Run formatter. This project uses Runic, a code formatter with rules set in stone. Runic have no configuration.
  2. Run the local test suite before pushing commits. Aqua.jl and JET.jl
  3. Build the documentation locally. Run the first command once to set up the docs environment, and run the second command to rebuild the documentation.
# Start with Revise.jl
cd MyPkg49.jl
julia --startup-file=no -i -E 'using Revise; import Pkg; Pkg.activate("."); using MyPkg49'

# Run Formatter
julia --project=@runic --startup-file=no -e 'using Runic; Runic.main(["--inplace", "src/"])'

# Run Test
julia --project=. --startup-file=no -e 'using Pkg; Pkg.test()'

# Generate Documentation
julia --project=docs --startup-file=no -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate();'
julia --project=docs --startup-file=no -e 'include("docs/make.jl")'

Versioning and Registering (for Maintainers)

This project follows Semantic Versioning. When bumping the version, update the version number in:

For registering this package to the General registry, install Registrator and use via the GitHub App.