Contributing to this project entails submitting pull requests (PRs) to this repository.
Create a repository fork via https://github.com/Constellation-Labs/tessellation/fork.
Create a clone of your repo (origin) and add the (quasi-standard named) upstream
remote.
git clone https://github.com/<you-github-account>/tessellation
cd tessellation
git remote add upstream https://github.com/Constellation-Labs/tessellation
When developing, keep your changes as atomic as possible (e.g. a commit should not break the code/ci).
Create a Feature-Branch (example for branch '747-update-contrib')
git checkout -b 747-update-contrib
Especially for long running work, ensure that you sync from time to time your branch with the latest upstream changes.
git checkout 747-update-contrib
git fetch upstream
git rebase upstream/develop
- When you are ready to make a PR, again rebase with upstream as mentioned above. Then just push as usual:
# -u is the shtorcut for --set-upstream-to
git push -u origin 747-update-contrib
Create the PR from the github UI whilst following the instructions given there.
- Try to mimic the existent coding style within the repository.
- Use Scala's formatter, scalafmt, and ScalaFix. Before committing, run
sbt runLinter
.
- For IntelliJ, click here.
Run these commands from the base directory of this project.
sbt compile # compiles the project.
sbt test # runs the tests.
sbt runLinter # automatically formats the code according to the style guide.
After installing SBT, per the SETUP guide, you have to configure it.
- Generate a Github Personal Access Token, link.
- Set your global SBT configuration.
- Create the ~/.sbt/1.0/github.sbt file.
- Copy into it below. Replace
<TOKEN>
with the Personal Access Token you generated and<GITHUB_ID>
with your Github username.
credentials +=
Credentials(
"Github Package Registry",
"maven.pkg.github.com",
"<GITHUB_ID>",
"<TOKEN>")
githubTokenSource := TokenSource.GitConfig("github.token")
- Create the file ~/.sbt/1.0/plugins/plugin.sbt.
- Copy into it:
addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.5.3")
- Copy into it: