Home

Awesome

<p align="center"> <a href="https://codely.com"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://codely.com/logo/codely_logo-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://codely.com/logo/codely_logo-light.svg"> <img alt="Codely logo" src="https://codely.com/logo/codely_logo.svg"> </picture> </a> </p> <h1 align="center"> 🧬🌟 Codely Scala Spark Skeleton (powered by Giter 8) </h1> <p align="center"> <a href="https://github.com/CodelyTV"><img src="https://img.shields.io/badge/Codely-OS-green.svg?style=flat-square" alt="Codely Open Source"/></a> <a href="https://pro.codely.com"><img src="https://img.shields.io/badge/Codely-Pro-black.svg?style=flat-square" alt="Codely Pro Courses"/></a> <a href="/LICENSE"><img src="https://img.shields.io/github/license/CodelyTV/scala-spark-skeleton.g8?style=flat-square" alt="License"/></a> <a href="https://github.com/CodelyTV/scala-spark-skeleton.g8/stargazers"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/CodelyTV/scala-spark-skeleton.g8?style=flat-square"></a> <a href="https://github.com/CodelyTV/scala-spark-skeleton.g8/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/CodelyTV/scala-spark-skeleton.g8/ci.yml?style=flat-square" alt="Continuous Integration status" /></a> </p> <p align="center"> Template for bootstrapping your new Scala project following idiomatic best practices powered by Giter 8. <br /> <br /> <a href="#-related-resources">πŸ’‘ Related resources</a> | <a href="https://github.com/CodelyTV/scala-spark-skeleton.g8/stargazers">🌟 Repository Stargazers</a> </p>

πŸš€ How to use

Run the following command and you're ready to go:

sbt new codelytv/scala-spark-skeleton.g8

You can now move to your project's directory, enter the SBT shell with the sbt command, and run the tests with test or t.

Project creation wizard

It will ask for some parameters like your desired project name or the organization to customize the generated project package name.

It will also ask for the version of some dependencies such as Scala (the language itself), SBT, or ScalaTest. If you do not know which version to choose for any of these dependencies, just go with the default one. These suggestions are dynamically generated based on the latest stable version available in Maven at the moment of creating your project 😊🀟

Pre-requisites

You only need the common tooling used for developing Scala applications:

<details> <summary>Installing instructions for macOS with SDKMAN!</summary>

If you use macOS, we would recommend using SDKMAN! to manage different JDK versions and tooling:

  1. Install SDKMAN with homebrew
  2. Install the JDK you prefer. If you ask us, we will opt for:
    1. Check the latest Java LTS JDK version
    2. Check the latest Zulu distribution version for that LTS with:
      sdk list java
      
    3. Install it:
      sdk install java XX.YY.ZZ-zulu
      
  3. Install the latest SBT:
    sdk install sbt
    
</details>

πŸ’Ž Features

πŸ€½β€ Pre-push Git hook

There's one Git hook included. It's inside the doc/hooks folder, and it will run the prep SBT task before pushing to any remote.

This prep task is intended to run all the checks you consider before pushing. At this very moment, it tries to compile and check the code style rules with ScalaFmt.

You can define what this task does by modifying the prep task in the build.sbt file. We like the approach of just having to run 1 single SBT task instead of multiple tasks because it's more efficient (the hook doesn't have to create multiple SBT sessions), and also because this way we can control the pre push tasks with the SBT alias defined at the build.sbt without altering the hooks.

If you want to install this hook, just cd doc/hooks and run ./install-hooks.sh.

πŸ’‘ Related resources

πŸ§‘β€πŸŽ“ Related learning resources

πŸ§‘β€πŸ’» Related skeleton repositories

🧬 Scala repositories

♨️ Java

πŸŸͺ Kotlin

🦈 C#

🟨 JavaScript

πŸ”· TypeScript

🐘 PHP

βš–οΈ License

See LICENSE.

🀝 Contributing

See CONTRIBUTING.md.

πŸ€” About

This hopefully helpful resource has been developed by Codely and contributors.

If you appreciate this contribution and want to show some support to our Open Source contributions, you have several options: