Developer Guide
If you are planning significant changes, open an issue first. The ColPrac guidelines are 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/MyPkg51.jl.git
cd MyPkg51.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()'Daily Development Flow
This section describes the typical workflow for making changes to the package.
- Start an interactive session with Revise.jl.
- Change the source code.
- Format the source code with Runic.jl.
- Run the tests.
- Build the documentation locally.
- Submit a pull request (after steps 3–5 succeed).
# Start
cd MyPkg51.jl
julia --startup-file=no -i -E 'using Revise; import Pkg; Pkg.activate("."); using MyPkg51'
# Format
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 change the source code:
- When making new functions or updating 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()'. ReplaceSomePackagewith the actual package name.
For Julia package development basics, see:
Versioning and Registering (for Maintainers)
This project follows Semantic Versioning. When bumping the version, update the version number in:
To register this package in the General registry, install Registrator and use via the GitHub App.