Tips for developers - SunnySuite/Sunny.jl GitHub Wiki
Before you start working on something, please send a message to #developers
channel on the Sunny Slack server.
We mostly follow the BlueStyle guidelines: https://github.com/invenia/BlueStyle, but with flexibility in spaces around binary operations (e.g. a*x + b
).
Github actions will build and host docs for each PR in progress. To find the link, navigate to "Checks passed" on a PR, go to "details", and click on the "deployed" action.
We're using TagBot, so the steps are simple:
- Review changes and mark the release date in
docs/src/versions.md
. - Open the latest commit on github and add a comment,
@JuliaRegistrator register
. TagBot will respond with a comment on that same commit.
New version should appear on JuliaHub in 15 minutes.
For this to work, you must be a public member or owner of the SunnySuite org. See Github instructions to change user visibility.
Afterwards, remember to increment the version = "X.X.X"
line in the Project.toml
file and update versions.md
.
Click on the green check on the line with the last commit info. This brings up a dropdown, one line of which is "Documentation." Click the "details" link on that line, which brings up details about the build. There's a button to rerun the job on the upper right.
For testing, it can be convenient to have an environment with different package versions, e.g. release versions,
activate @release
add Sunny, GLMakie
To create an environment with development Makie:
activate @makie-dev
dev Makie
then go to ~/.julia/dev/Makie
and switch to desired branch git checkout <branch>
, then back in Julia package manager,
dev MakieCore GLMakie WGLMakie
It is possible to add co-authors to a Github PR by adding a trailing line to the squashed commit message. Figuring out the precise line to add is tricky. This blog post provides a script, which you might call gcoauthored:
#!/bin/bash
account=$1
data=$(curl -s https://api.github.com/users/$account)
id=$(echo $data | jq .id)
name=$(echo $data | jq --raw-output '.name // .login')
printf "Co-authored-by: %s <%d+%[email protected]>\n" "$name" $id $account
Or copy-paste from here:
Co-authored-by: David A. Dahlbom <[email protected]>
Co-authored-by: Sam Quinn <[email protected]>
Co-authored-by: Harry Lane <[email protected]>
Co-authored-by: Hao Zhang (张浩) <[email protected]>
Co-authored-by: Xiaojian Bai <[email protected]>
Co-authored-by: AlinNiraula <[email protected]>
Co-authored-by: BhushanThipe <[email protected]>
- Rename "Versions" to "Changelog"
- https://github.com/SunnySuite/Sunny.jl/issues/362
- https://github.com/SunnySuite/Sunny.jl/issues/384
- https://github.com/SunnySuite/Sunny.jl/issues/402
- (Maybe) rescale LL damping
$\lambda \to \lambda / S$ for consistency with SU(N).
Github hosts docs for Sunny v0.5 and later. Earlier docs can be built manually,
] add [email protected]
# From Julia
using Sunny
pkgdir(Sunny) # find location SUNNYPATH
# From terminal
cd SUNNYPATH/docs
julia --project=@. # load Julia with 'docs' activated
] instantiate # find packages for old Sunny version
include("make.jl") # build the docs
# open SUNNYPATH/docs/build/index.html in browser
Add a remote, e.g.,
git remote add lzr https://github.com/Lazersmoke/Sunny.jl.git
git remote add haophys https://github.com/Hao-Phys/Sunny.jl.git
git remote add qntstv https://github.com/quantumsteve/Sunny.jl.git
Remove a remote, e.g.,
git remote rm lzr