Welcome! There are many ways to contribute, including submitting bug reports, improving documentation, submitting feature requests, reviewing new submissions, or contributing code that can be incorporated into the project.
For any significant changes please create a new GitHub issue and enhancements that you wish to make. Describe the feature you would like to see, why you need it, and how it will work. Discuss your ideas transparently and get community feedback before proceeding.
Small changes can directly be crafted and submitted to the GitHub Repository as a Pull Request. This requires creating a repo fork using instruction.
Please follow instruction.
Open terminal and run these commands:
git clone git@github.com:myuser/spark-dialect-extension.git
cd spark-dialect-extensionBefore you start, ensure you have the following installed:
- Java: Java 8 or higher. Java Installation Guide
- Gradle: Gradle Installation Guide
To compile the project and generate a JAR file, run the following command in the project's root directory:
./gradlew crossBuildV212Jar crossBuildV213JarThis command compiles the source code and packages it into a .jar files located in the build/libs directory.
This section describes how to run Scala tests for the Spark Dialect Extension.
Before running the tests, you need to start the necessary database services using Docker Compose:
docker-compose -f docker-compose.test.yml up -dTo run the Scala tests, execute:
./gradlew testAfter the tests, you can view the coverage report by opening the build/reports/tests/test/index.html file in your web browser.
After completing the tests, you can stop the Docker containers with:
docker-compose -f docker-compose.test.yml downTo format all Scala source files in the project, execute the following command from the project's root directory:
./gradlew scalafmtAllTo lint and refactor the code, run Scalafix using the following command:
./gradlew scalafixThis command checks the code against various rules specified in the .scalafix.conf file and applies fixes where possible.
Commit your changes:
git commit -m "Commit message"
git pushThen open Github interface and create pull request. Please follow guide from PR body template.
After pull request is created, it get a corresponding number, e.g. 123
(pr_number).
Note: this is only for repo maintainers
- Checkout to
developbranch and update it to the actual state
git checkout develop
git pull -p- Copy version (it must start with v, e.g. v1.0.0)
VERSION=$(./gradlew -q printVersion)- Commit and push changes to
developbranch
git add .
git commit -m "Prepare for release ${VERSION}"
git push- Merge
developbranch tomaster, WITHOUT squashing
git checkout master
git pull
git merge develop
git push- Add git tag to the latest commit in
masterbranch
git tag "$VERSION"
git push origin "$VERSION"- Update version in
developbranch after release:
git checkout develop
NEXT_VERSION=$(echo "$VERSION" | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.)
sed -i "s/version = \".*\"/version = \"$NEXT_VERSION\"/" build.gradle
git add .
git commit -m "Bump version"
git push