Skip to content

Commit e4b72ed

Browse files
author
Christian Herrera
committed
Add lessons course
0 parents  commit e4b72ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2432
-0
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.scala]
13+
indent_size = 2
14+
indent_style = space
15+
16+
[*.md]
17+
trim_trailing_whitespace = false

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
schedule:
3+
- cron: '0 6 * * 1-5'
4+
5+
name: 🍄 Check dependencies updates
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
scala-steward:
13+
runs-on: ubuntu-22.04
14+
name: Check Scala project dependencies updates with Scala Steward
15+
steps:
16+
- uses: scala-steward-org/scala-steward-action@v2

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-java@v4
18+
with:
19+
distribution: 'zulu'
20+
java-version: '21'
21+
cache: 'sbt'
22+
- name: 👌 Run "pre-push" tasks (compile and style-check)
23+
run: sbt prep
24+
- name: ✅ Run test
25+
run: sbt test
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update GitHub Dependency Graph
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: scalacenter/sbt-dependency-submission@v3

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
target/
2+
boot/
3+
lib_managed/
4+
src_managed/
5+
project/plugins/project/
6+
7+
#docker-compose
8+
volume/

.scalafmt.conf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version = 3.8.2
2+
runner.dialect = scala213
3+
style = default
4+
maxColumn = 120
5+
continuationIndent.callSite = 2
6+
align.preset = more
7+
runner.optimizer.forceConfigStyleMinArgCount = 1
8+
rewrite.rules = [SortImports]
9+
importSelectors = singleLine
10+
project.excludeFilters = ["target/"]
11+
project.git = true # Only format files tracked by git

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2024 com.codely, Inc. https://com.codely
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# ✨ spark-kafka_rabbitmq_sqs-course
2+
3+
[![License](https://img.shields.io/github/license/com.codely/spark-kafka_rabbitmq_sqs-course?style=flat-square)](/LICENSE)
4+
5+
[![GitHub Repo stars](https://img.shields.io/github/stars/com.codely/spark-kafka_rabbitmq_sqs-course?style=flat-square)](https://github.com/com.codely/spark-kafka_rabbitmq_sqs-course/stargazers)
6+
7+
[![Continuous Integration status](https://img.shields.io/github/actions/workflow/status/com.codely/spark-kafka_rabbitmq_sqs-course/ci.yml?style=flat-square)](https://github.com/com.codely/spark-kafka_rabbitmq_sqs-course/actions/workflows/ci.yml)
8+
9+
## 🚀 Environment setup
10+
11+
You only need the common tooling used for developing Scala applications:
12+
13+
- [JDK](https://www.oracle.com/java/technologies/downloads/)
14+
- [SBT](https://www.scala-sbt.org/download)
15+
16+
<details>
17+
<summary>Installing instructions for macOS with SDKMAN!</summary>
18+
19+
If you use macOS, we would recommend using SDKMAN! to manage different JDK versions and tooling:
20+
21+
1. [Install SDKMAN with homebrew](https://github.com/sdkman/homebrew-tap?tab=readme-ov-file#installation)
22+
2. Install the JDK you prefer. If you ask us, we will opt for:
23+
1. [Check the latest Java LTS JDK version](https://endoflife.date/oracle-jdk)
24+
2. Check the latest Zulu distribution version for that LTS with:
25+
```shell
26+
sdk list java
27+
```
28+
3. Install it:
29+
```shell
30+
sdk install java XX.YY.ZZ-zulu
31+
```
32+
3. Install the latest SBT:
33+
```shell
34+
sdk install sbt
35+
```
36+
</details>
37+
38+
## ✅ Tests
39+
40+
Just run:
41+
42+
```shell
43+
sbt test
44+
```
45+
46+
There is also the `sbt t` alias 😊
47+
48+
## 🤽‍ Pre-push Git hook
49+
50+
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.
51+
52+
This `prep` task is intended to run all the checks you consider before pushing.
53+
At this very moment, it tries to compile and check the code style rules with ScalaFmt.
54+
55+
You can define what this task does by modifying the `prep` task in the `build.sbt` file.
56+
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.
57+
58+
If you want to install this hook, just `cd doc/hooks` and run `./install-hooks.sh`.
59+
60+
## ⚖️ License
61+
62+
See [`LICENSE`](LICENSE).
63+
64+
## 🤔 About
65+
66+
Project developed by [com.codely, Inc.](https://com.codely) and bootstrapped with the [Codely Scala Spark Skeleton (powered by Giter 8)](https://github.com/CodelyTV/scala-spark-skeleton.g8).

build.sbt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Settings.settings
2+
3+
libraryDependencies := Dependencies.all
4+
5+
SbtAliases.aliases.flatMap { case (alias, command) =>
6+
addCommandAlias(alias, command)
7+
}
8+
9+
assembly / assemblyMergeStrategy := {
10+
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
11+
case PathList("org", "apache", "spark", "unused", "UnusedStubClass.class") =>
12+
MergeStrategy.first
13+
case _ => MergeStrategy.first
14+
}

0 commit comments

Comments
 (0)