2.9 KiB
Contributing to the BinanceJ Project
Welcome to BinanceJ!
The goal of this project is to provide the de-facto standard Binance API in Java.
Sections
Getting Started
Overall Requirements
- Java 8
- Gradle
- Sonarlint
It is highly suggested you use something like Intellij IDEA when developing this project though there is no strict enforcement on that.
To get started with the project, do as follows:
git clone git@github.com:angrygoats/binancej.git
cd binancej
gradle clean && gradle build
Testing
We operate a strict TDD shop here. As a result, any PR submitted without tests for anything but the most trivial of features will be rejected immediately. 100% code coverage is not necessary (but desirable where possible). You should aim to cover all major conditions your code can go through thoroughly.
The tools we primarily use are Junit4 and Mockito. Since the API is so simple this all we really need.
To run the tests, simple run:
gradle test
from the root of the project.
Code Standards
Clean Java is good Java. As all of us know Java can get unnecessarily verbose at times, and in order to keep readability in view at all times good code standards should be followed:
- Run Sonarlint and follow it's suggestions
- 4 spaces (not tabs)
- Keep a space between each member of a class for readability
- Javadoc every function you write with the exception of already documented functions you are
@Override
'ing - Javadoc classes that are not obvious from their name
- Absolutely no wild card importing
- Clean up your imports - do not leave unused imports in any code you write
- You should make an effort to clean up all code you touch if the clean up will not take too long
- Any thing that will take long should be made into an issue
- Make use of Lombok wherever you can to reduce boilerplate as much as possible
- Take advantage of Java 8 features such as streams to simplify your code where possible
- If you are using IntelliJ, take advantage of code formatting under
Code -> Reformat Code
Versioning
The BinanceJ project uses Semantic Versioning. In the build.gradle
you will find a line
to adjust the semantic versioning of the library.
Submitting Pull Requests
Please be sure to follow the supplied pull request template. PRs will be rejected if they lack tests or the test coverage isn't sufficient.
Submitting Issues
Please be sure to follow the supplied issue template. If the template does not contain fields you need, feel free to add them if they provide more context to the issue you are experiencing.