Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Gradle Build

on: [push, pull_request]
on: [workflow_dispatch]

jobs:
build:
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Docker Image CI

on:
push:
branches: [ "daniel-koala", "adam", "bisha" ]
pull_request:
branches: [ "daniel-koala", "adam", "bisha" ]

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v5

- name: Set image name from branch
id: image-name
run: |
declare -A BRANCH_MAP
BRANCH_MAP[daniel-koala]="code-tracking-qa"
BRANCH_MAP[adam]="code-tracking-emote"
BRANCH_MAP[bisha]="code-tracking-ai"

BRANCH="${GITHUB_HEAD_REF:-$GITHUB_REF_NAME}"
IMAGE_NAME="${BRANCH_MAP[$BRANCH]}"

if [ -z "$IMAGE_NAME" ]; then
echo "No image mapping for branch: $BRANCH"
exit 1
fi

REPO_OWNER="${{ github.repository_owner }}"
echo "image_name=${REPO_OWNER,,}/${IMAGE_NAME}" >> "$GITHUB_OUTPUT"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ steps.image-name.outputs.image_name }}
tags: |
type=sha
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ EXPOSE 8080
RUN mkdir /app
RUN mkdir -p /data/tt-files && chmod -R 777 /data/tt-files
COPY --from=build /home/gradle/src/ij-server/build/libs/ij-server-all.jar /app/ktor-docker-sample.jar
ENTRYPOINT ["java","-jar","/app/ktor-docker-sample.jar"]
ENTRYPOINT ["java","-jar","/app/ktor-docker-sample.jar"]
Binary file added Study Instructions.docx
Binary file not shown.
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
services:
server:
image: koala-server:latest # Create the local image: docker build --platform linux/amd64 -t koala-server .
platform: linux/amd64
image: registry.jetbrains.team/p/tasktracker-3/sharable/tasktracker-server:latest
ports:
- "8080:8080"
environment:
- DB_URL=jdbc:postgresql://host.docker.internal:5432/koala
- DB_USERNAME=
- DB_PASSWORD=
- DB_URL=jdbc:postgresql://host.docker.internal:5432/tasktracker
- DB_USERNAME=adamk4
- DB_PASSWORD=Dzieciaki2
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = org.jetBrains.research.tasktracker
pluginName = KOALA
pluginRepositoryUrl = https://github.com/JetBrains-Research/KOALA
pluginName = TaskTracker-3
pluginRepositoryUrl = https://github.com/JetBrains-Research/tasktracker-3
# SemVer format -> https://semver.org
pluginVersion = 0.1.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 243
pluginUntilBuild = 252.*
pluginUntilBuild = 254.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = PY
Expand Down
15 changes: 13 additions & 2 deletions ij-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ tasks {
}

withType<JavaCompile> {
sourceCompatibility = jdkVersion
targetCompatibility = JavaVersion.VERSION_21.toString()
sourceCompatibility = "21"
targetCompatibility = "21"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
Expand All @@ -113,3 +113,14 @@ tasks {
}

}

kotlin {
jvmToolchain(21)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ abstract class BaseLogger {
it.logFile
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Test 1: Two words not separated by WUB - they become one word
# Input: WUBWUBHELLOWORLDWUB
# Output: HELLOWORLD


# Test 1: Example from problem
# Input: WUBWUBIWUBAMWUBWUBX
# Output: I AM X

# Test 2: Leading and trailing WUBs
# Input: WUBHELLOWUBWORLDWUB
# Output: HELLO WORLD

# Test 3: Multiple WUBs only - empty output
# Input: WUBWUBWUB
# Output: (empty)

# Test 4: No WUBs at all - word printed as-is
# Input: HELLO
# Output: HELLO

# Test 5: Two words not separated by WUB - become one word (common mistake)
# Input: WUBWUBHELLOWORLDWUB
# Output: HELLOWORLD

# Test 6: Single word wrapped in WUBs
# Input: WUBHELLOWUB
# Output: HELLO

# Test 7: WUB splits two single letters
# Input: AWUBB
# Output: A B

# Test 8: Multiple single letter words
# Input: WUBAWUBBWUBCWUB
# Output: A B C
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Test 1: Invalid variable name - Y is not X
# Input: 1
# Y++
# Output: (not a valid input per problem rules)

# Test 2: Too many operators - X+++ is not a valid operation
# Input: 1
# X+++
# Output: (not a valid input per problem rules)

# Test 3: Increment then decrement (net zero)
# Input: 2
# X++
# X--
# Output: 0

# Test 4: Multiple increments
# Input: 3
# X++
# X++
# X++
# Output: 3

# Test 5: Multiple decrements
# Input: 3
# X--
# X--
# X--
# Output: -3

# Test 6: Mixed prefix and postfix (net zero)
# Input: 4
# X++
# ++X
# X--
# --X
# Output: 0

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Test 1: Normal short word - no change
# Input: word
# Output: word

# Test 2: Normal long word - abbreviate
# Input: localization
# Output: l10n

# Test 3: Exactly 10 characters - should NOT abbreviate (common off-by-one mistake)
# Input: abcdefghij
# Output: abcdefghij

# Test 4: Exactly 11 characters - should abbreviate (boundary)
# Input: abcdefghijk
# Output: a9k

# Test 5: First and last letter are the same
# Input: abcdefghija
# Output: a9a

# Test 6: All same letter (11 chars)
# Input: aaaaaaaaaaa
# Output: a9a

# Test 7: Very long word
# Input: internationalization
# Output: i18n
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Test 1: Basic - 1 digit divisible by 2
# Input: 1 2
# Output: 2

# Test 2: Basic - 3 digits divisible by 4
# Input: 3 4
# Output: 100

# Test 3: t=1, every number works - smallest n-digit number
# Input: 1 1
# Output: 1

# Test 4: t=1 with 2 digits
# Input: 2 1
# Output: 10

# Test 5: t=1 with 3 digits
# Input: 3 1
# Output: 100

# Test 6: Last single digit (9)
# Input: 1 9
# Output: 9

# Test 7: No single digit divisible by 10 - must print -1 (common mistake to skip -1 case)
# Input: 1 10
# Output: -1

# Test 8: No single digit divisible by 11
# Input: 1 11
# Output: -1

# Test 9: 2-digit number divisible by 10
# Input: 2 10
# Output: 10

# Test 10: 2-digit number, t equals the number itself
# Input: 2 99
# Output: 99

# Test 11: 2-digit prime as t
# Input: 2 97
# Output: 97

# Test 12: t larger than any n-digit number
# Input: 1 97
# Output: -1
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Test 1: Basic mixed word
# Input: tour
# Output: .t.r

# Test 2: Mixed case word
# Input: CodeForces
# Output: .c.d.f.r.c.s

# Test 3: All uppercase vowels - empty output
# Input: AEIOU
# Output: (empty)

# Test 4: All lowercase vowels - empty output
# Input: aeiou
# Output: (empty)

# Test 5: All uppercase consonants - lowercased with dots
# Input: BCDFG
# Output: .b.c.d.f.g

# Test 6: All lowercase consonants
# Input: bcdfg
# Output: .b.c.d.f.g

# Test 7: Lowercase y is a vowel - empty output
# Input: y
# Output: (empty)

# Test 8: Both y and Y are vowels - empty output
# Input: yY
# Output: (empty)

# Test 9: Y at start of word is removed as vowel (common mistake)
# Input: Yes
# Output: .s

# Test 10: Y between consonants - Y removed
# Input: zYz
# Output: .z.z

# Test 11: Single consonant
# Input: b
# Output: .b
Loading
Loading