Skip to content

Latest commit

 

History

History
165 lines (115 loc) · 4.58 KB

CONTRIBUTING.md

File metadata and controls

165 lines (115 loc) · 4.58 KB

Contributor Guide

Git

We use the dev branch for development. All feature branches should be based off dev.

The master branch corresponds to the latest release. We deploy to Julia General Registry and git tag -a off master.

Running the unit tests (aka Julia tests)

git clone git@github.com:plotly/Dash.jl.git
cd Dash.jl
julia
julia> import Pkg
julia> Pkg.activate(".")
julia> Pkg.instantiate()
julia> Pkg.update()
julia> Pkg.test()

To run the unit tests for multiple versions of Julia, we recommend using juliaup.

Running the integration tests

The integration tests make use of the dash.testing module part of the Python version of dash.

Instructions on how to install the required system dependencies can be found in the dash Contributor Guide.

Then,

cd Dash.jl
git clone --depth 1 https://github.com/plotly/dash.git -b dev dash-main
python3 -m venv venv
pip install --upgrade pip wheel
cd dash-main && pip install -e .[ci,dev,testing] && cd ..
cd test/integration
julia --project -e 'import Pkg; Pkg.develop(path="../../"); Pkg.instantiate(); Pkg.update();'
pytest --headless --nopercyfinalize --percy-assets=../assets/ .

Alternatively, one can run the integration tests using the same Docker image as for our CircleCI test runs. See the Docker image guide for the details.

Updating the resources

See the Generate Dash.jl artifacts.

Updating the CircleCI Docker image

See the Docker image guide.

Code Style

  • indent with 4 spaces (no tabs),
  • no whitespaces at EOLs,
  • add a single newline at EOFs.

See the lint.yml workflow for the details.

Making a release

Please follow the steps in order! For example, running git tag -a before @JuliaRegistrator register will lead to a failed release!

In the following steps, note that "X.Y.Z" refers to the new version we are releasing.

step 1

Make sure the unit tests and CircleCI integration tests are passing off the dev branch.

step 2

Make a PR with master as the base branch and dev as compare branch.

For consistency, name the PR: "Release X.Y.Z"

step 3

Bump the version field in the Project.toml (following semver) and then

git checkout dev
git pull origin dev
git commit -m "X.Y.Z"
git push

N.B. use X.Y.Z not vX.Y.Z in the commit message, the leading v is reserved for git tags.

step 4

Wait for approval and then merge the PR onto master.

step 5

Navigate on GitHub to the merge commit from the master branch e.g. this one and then add the following comment:

@JuliaRegistrator register branch=master

which tells the Julia Registrator to create a PR to the General Registry e.g. this one.

step 6

Wait for the Julia Registry PR to be merged. If things go well, this should be automatic!

step 7

Off master, create and push a new git tag with:

git checkout master
git tag -a vX.Y.Z   # N.B. leading `v`
git push --tags

step 8

Go the release page and create a new release, name it "Version X.Y.Z" for consistency and fill out sections:

  • (usually) Added, Changed, Fixed while including links to the PRs merged since the last release
  • New Contributor, which should include mentions for all the first-time contributors

finally, place a GitHub compare link between the last release and X.Y.Z e.g. this one.

step 9

you are done 🎉