Developer Guide
If you are planning significant changes, open an issue first. The ColPrac guidelines are recommended. For Julia package development basics, see:
One-Time Local Setup
This procedure is required only once. Install Git and Julia on your local machine before starting.
- Fork the repository on GitHub.
- Clone the forked repository. Replace
xxxxxxwith your GitHub username.git clone https://github.com/xxxxxx/FewBody.jl.git cd FewBody.jl - Install development tools: Revise.jl and Runic.jl.
julia --startup-file=no -e 'import Pkg; Pkg.add("Revise")' julia --project=@runic --startup-file=no -e 'using Pkg; Pkg.add("Runic")'
Daily Development Flow
This is the typical workflow for making changes.
- Create a branch for your changes. Replace
xxxwith the issue number (e.g.issue/123).cd FewBody.jl git switch -c issue/xxx - Start an interactive session with Revise.jl.
julia --startup-file=no -i -e 'using Revise; import Pkg; Pkg.activate("."); using FewBody' - 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.
- Format the source code with Runic.jl.
julia --project=@runic --startup-file=no -e 'using Runic; exit(Runic.main(ARGS))' -- --inplace . - Run the tests. It will take a few minutes.
julia --project=. --startup-file=no -e 'using Pkg; Pkg.test()' - Build the documentation locally. HTML files (
docs/build/*.html) will be generated. Check them with Chrome or any other web browsers.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")' - Commit and push the changes (after steps 4–6 succeed).
git add "path/to/changed/file" git commit -m "commit message" git push origin issue/xxx - Submit a pull request on GitHub.
Versioning and Registering (for Maintainers)
This project follows Semantic Versioning and the ColPrac version increment guidelines. When bumping the version, update:
- the version in Project.toml
- the version, year, and month in CITATION.bib
Keep the version values synchronized, and set the citation date to the release date.
To register this package in the General registry, install Registrator and use it via the GitHub App.