Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 4.03 KB

CONTRIBUTING.md

File metadata and controls

77 lines (54 loc) · 4.03 KB

Coding guidelines

Contributions to the CSync Server should use the good Scala coding style. The project is set up so that developers can use ScalaStyle to check for common violations of proper Scala coding style. ScalaStyle is set up to automatically run when the tests are run.

Documentation

All code changes should include comments describing the design, assumptions, dependencies, and non-obvious aspects of the implementation. Hopefully the existing code provides a good example of appropriate code comments. If necessary, make the appropriate updates in the README.md and other documentation files.

Contributing your changes

  1. If one does not exist already, open an issue that your contribution is going to resolve or fix.
    1. Make sure to give the issue a clear title and a very focused description.
  2. On the issue page, set the appropriate Pipeline, Label(s), Milestone, and assign the issue to yourself.
    1. We use Zenhub to organize our issues and plan our releases. Giving as much information as to what your changes are help us organize PRs and streamline the committing process.
  3. Make a branch from the master branch using the following naming convention:
    1. YOUR_INITIALS/ISSUE#-DESCRIPTIVE-NAME
    2. For example, kb/94-create-contributingmd was the branch that had the commit containing this tutorial.
  4. Commit your changes!
  5. When you have completed making all your changes, create a Pull Request (PR) from your git manager or our Github repo from your branch to master.
  6. Fill in the template for the PR.
  7. Contributions require sign-off. We require that any contributers agree to the Developer's Certificate of Origin 1.1 (DCO), otherwise your pull request will be rejected.
    1. When committing using the command line you can sign off using the --signoff or -s flag. This adds a Signed-off-by line by the committer at the end of the commit log message.git commit -s -m "Commit message"
  8. That's it, thanks for the contribution!

Setting up your environment

You have probably got most of these set up already, but starting from scratch you will need the following:

  • SBT
  • PostgreSQL
  • RabbitMQ
  1. First, install SBT using brew install sbt

  2. Install RabbitMQ using brew install rabbitmq

  3. Install PostGresql using brew install postgres

  4. Start up RabbitMQ by running brew services start rabbitmq

  5. Start up PostgreSQL by running brew services start postgres

  6. Run createdb to create the PostgreSQL database for csync to use

  7. You can stop RabbitMQ or PostgreSQL at any time by running brew services stop (rabbitmq or postgres)

Running the tests

From the command line, run sbt test to run the tests and ScalaStyle checks

To generate code coverage, run sbt clean coverage test

To generate a human readable report, run sbt coverageReport. This will appear in the core/target/{scalaversion}/scoverage-report folder.

Dependency Table

Name Version Author License Release Date Verification Code URL
vert.x framework
- vertx-core_3.4.1
- vertx-codegen_3.4.0
3.4.0 Apache 2.0 n/a io.vertx
scala-logging 3.4.0 Apache 2.0 n/a n/a com.typesafe.scala-logging:scala-logging
amqp-client 3.6.2 Pivotal Apache 2.0 n/a n/a com.rabbitmq:amqp-client
postgresql 9.4-1208-jdbc41 PostgreSQL License n/a n/a org.postgresql:postgresql
google-api-client 1.22.0 Google Apache 2.0 n/a n/a com.google.api-client:google-api-client
HikariCP 2.4.6 Brett Wooldridge Apache 2.0 n/a n/a com.zaxxer:HikariCP
scalaj-http 2.3.0 Jon Hoffman Apache 2.0 n/a n/a org.scalaj:scalaj-http
slf4j-api 1.7.21 MIT License n/a n/a org.slf4j:slf4j-api
slf4j-simple 1.7.21 MIT License n/a n/a org.slf4j:slf4j-simple
boopickle 1.2.5 Otto Chrons MIT License n/a n/a