Developer Guide

If you are planning significant changes, open an issue first. The ColPrac guidelines is recommended.

One-Time Local Setup

Clone the repository and install development tools, Revise.jl and Runic.jl.

# Clone the repository
git clone https://github.com/ohno/MyPkg50.jl.git
cd MyPkg50.jl

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

# Instantiate dependencies
julia --project=. --startup-file=no -e 'using Pkg; Pkg.instantiate()'

For Julia package development basics, see:

Daily Development Flow

  1. Start an interactive session with Revise.jl:
  2. Change code.
  3. Format code with Runic.jl.
  4. Run tests.
  5. Build documentation locally.
# Start with Revise.jl
cd MyPkg50.jl
julia --startup-file=no -i -E 'using Revise; import Pkg; Pkg.activate("."); using MyPkg50'

# Run Formatter
julia --project=@runic --startup-file=no -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace .

# 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")'

To update the source code:

  • When make new functions and update docstrings, refer to Documenter: Adding docstrings.
  • If you need a new dependency, use julia --project=. --startup-file=no -e 'import Pkg; Pkg.add("SomePackage"); Pkg.resolve(); Pkg.instantiate()'. Change SomePackage to the package name.

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.