Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 99 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
c684c27
Setting up GitHub Classroom Feedback
github-classroom[bot] Mar 23, 2023
2440aca
chore: Add .gitignore
nemakin Mar 27, 2023
3a6e826
chore: Set up project structure
nemakin Mar 27, 2023
551bf1b
fix(repo): Delete .idea dir and add proper .gitignore
nemakin Mar 27, 2023
4a156c0
feat(repo): add general project structure
ancavar Mar 27, 2023
d64f79b
Create linter action
SurfaceYellowDuck Mar 28, 2023
f77fa40
feat: add BalancingTree class
ancavar Mar 28, 2023
04961ce
add insert method and private recursiveInsert method to BinarySearchT…
SurfaceYellowDuck Mar 28, 2023
1c09271
add find method and private search method is BinarySearchTree class
SurfaceYellowDuck Mar 28, 2023
1c58d50
feat: implement rotations in BalancingTree
ancavar Mar 28, 2023
095a1f3
feat: implement insert method
ancavar Mar 28, 2023
4ce4b0b
refactor: remove overriding find and clear method as we are inheritin…
ancavar Mar 29, 2023
4e46238
Merge pull request #2 from spbu-coding-2022/BST
ancavar Mar 29, 2023
81095ba
fix: remove redundant value parameter from remove method
ancavar Mar 29, 2023
5779c31
feat: test template for RBT
ancavar Mar 29, 2023
18d2f20
refactor: major refactoring according to linter
ancavar Mar 29, 2023
bec9900
refactor: minor refactoring
ancavar Mar 29, 2023
6f0866a
Merge pull request #3 from spbu-coding-2022/red-black
ancavar Mar 29, 2023
d70caab
Revert "Red black"
ancavar Mar 29, 2023
fb4350f
Merge pull request #4 from spbu-coding-2022/revert-3-red-black
ancavar Mar 29, 2023
eb6ba6e
Merge branch 'dev' into red-black
ancavar Mar 29, 2023
1d6ea04
Merge pull request #5 from spbu-coding-2022/red-black
ancavar Mar 29, 2023
5314ceb
fix: remove value parameter from Tree interface
ancavar Mar 29, 2023
2006ec6
fix: change search function to protected and so that it can be used f…
ancavar Mar 29, 2023
391e531
Create README.md
SurfaceYellowDuck Mar 31, 2023
cf8e545
Implement AVL tree (#6)
nemakin Apr 4, 2023
ac0da2c
feat: implement better red-black tree methods and tests for it
ancavar Apr 4, 2023
54913ce
fix: band-aid fix for removal
ancavar Apr 4, 2023
ab4e10d
Delete .idea directory
SurfaceYellowDuck Apr 6, 2023
c95cf57
add readme from main
SurfaceYellowDuck Apr 6, 2023
926994c
Merge remote-tracking branch 'origin/dev' into dev
SurfaceYellowDuck Apr 6, 2023
860f2c4
resolve conflict main and dev branches
SurfaceYellowDuck Apr 6, 2023
18fcb15
resolve merge conflict(added missing files)
SurfaceYellowDuck Apr 6, 2023
9b79a9f
feat: Add test on tree creation and write auxiliary methods for futhe…
nemakin Apr 7, 2023
2da358f
feat: Add basic tests on insertions
nemakin Apr 7, 2023
29fd243
feat: Add tests on insertions causing rotations
nemakin Apr 7, 2023
0bb9a28
feat: Add tests on finding elements
nemakin Apr 7, 2023
97f5e9c
feat: Add some tests on deletions
nemakin Apr 7, 2023
de7d352
fix: incorrect deletion by not copying node key and value
ancavar Apr 15, 2023
a9cd189
feat: more quality tests
ancavar Apr 15, 2023
40c6bf0
ci: implement JaCoCo
ancavar Apr 15, 2023
eb5bd20
feat: add tests for BST
ancavar Apr 15, 2023
840d256
Merge pull request #9 from spbu-coding-2022/dev
ancavar Apr 16, 2023
67f1beb
fix: change assertion calls to safe
ancavar Apr 17, 2023
209197e
fix: new faster linter, remove gradle test
ancavar Apr 18, 2023
b811a9d
refaсtor: general refactoring
ancavar Apr 18, 2023
36b408e
repo: add basic README.md
ancavar Apr 19, 2023
2dd00ac
db: initial commit for neo4j
ancavar Apr 17, 2023
439eff7
db: change name to property of a tree
ancavar Apr 19, 2023
8504510
fix: change assertion calls to safe
ancavar Apr 17, 2023
49235b4
fix: new faster linter, remove gradle test
ancavar Apr 18, 2023
85c0f1a
refaсtor: general refactoring
ancavar Apr 18, 2023
bcc69b3
repo: add basic README.md
ancavar Apr 19, 2023
dca9235
Merge branch 'main' into neo4j
ancavar Apr 19, 2023
5decda6
Merge pull request #12 from spbu-coding-2022/neo4j
ancavar Apr 19, 2023
9edffc9
Add x, y coordinates to nodes
SurfaceYellowDuck Apr 19, 2023
8965444
Merge pull request #13 from spbu-coding-2022/BST
SurfaceYellowDuck Apr 19, 2023
8c7a31c
Merge branch 'main' into dev
SurfaceYellowDuck Apr 19, 2023
62a655e
db: initial commit for neo4j
ancavar Apr 17, 2023
4a973be
db: change name to property of a tree
ancavar Apr 19, 2023
6f2f97d
Add x, y coordinates to nodes
SurfaceYellowDuck Apr 19, 2023
06e414b
resolving conflicts
SurfaceYellowDuck Apr 19, 2023
54d2d1e
fix after resolve in BST
SurfaceYellowDuck Apr 19, 2023
8499471
Merge branch 'dev' into BST
SurfaceYellowDuck Apr 19, 2023
733bdc0
Merge pull request #15 from spbu-coding-2022/BST
SurfaceYellowDuck Apr 19, 2023
893ff31
Merge pull request #14 from spbu-coding-2022/dev
SurfaceYellowDuck Apr 19, 2023
6ee14b3
ci: build on multiple os, remove redundant cache
ancavar Apr 21, 2023
42d906a
refactor: better build.gradle.kts code style
ancavar Apr 21, 2023
f85d29a
ci: Add dependabot
ancavar Apr 21, 2023
d613138
fix: remove debugging tools
ancavar Apr 22, 2023
e4c8de2
fix: change color of RBT node to enum type
ancavar Apr 22, 2023
b102436
fix: Make methods for rotation abstract, fix flaky AVL test with shuf…
nemakin Apr 22, 2023
9df571c
implemented saving data to sqlite db
SurfaceYellowDuck Apr 23, 2023
6f47c8e
feat: implemented reading tree object from sqlite database
SurfaceYellowDuck Apr 24, 2023
6e769bf
feat:add docker compose for lift postgresql db and small fixes
SurfaceYellowDuck Apr 24, 2023
cf5d1f3
fix: Rework tree deserialization logic
SurfaceYellowDuck Apr 25, 2023
6ba1546
add bat, sh files to up docker container
SurfaceYellowDuck Apr 25, 2023
dab9995
add .gitignore
SurfaceYellowDuck Apr 25, 2023
25a6fb2
fix: rework neo4j interaction
ancavar Apr 25, 2023
4df2204
fix: null safety
ancavar Apr 25, 2023
0ee304e
fix:remove the db files in folders
SurfaceYellowDuck Apr 25, 2023
737623c
fix warning associated with sf4j
SurfaceYellowDuck Apr 25, 2023
ad89890
refactor: better test names, remove debugging info
ancavar Apr 25, 2023
10ad5bb
feat: add logger to neo4j
ancavar Apr 25, 2023
4a940a4
refactor: ctrl+shift+alt+l all files
ancavar Apr 25, 2023
fc1ba27
fix readme and add setName method to all trees
SurfaceYellowDuck Apr 26, 2023
05bc89f
refactor: better README.md
ancavar Apr 26, 2023
fa8124e
feat: bring back markdown linter
ancavar Apr 26, 2023
d764fe0
feat: add neo4j to docker-compose.yml
ancavar Apr 26, 2023
b44b5d7
feat: add test coverage reports back
ancavar Apr 26, 2023
6d0f73b
fix: typos in README.md
ancavar Apr 27, 2023
1438bcd
fix: better names, remove unnecessary cast
ancavar Apr 28, 2023
cb8506b
feat: implement Controller interface, add removal to JSON
ancavar Apr 28, 2023
f8c9dfd
fix: improve linter
ancavar Apr 28, 2023
50f9f7c
fix: remove setName usage
ancavar Apr 28, 2023
e270336
feat: add close session method
ancavar Apr 30, 2023
2d4ec8b
refactor
ancavar Apr 30, 2023
dcc1a30
refactor: more
ancavar Apr 30, 2023
d7668de
Implement user interface in application for drawing tree. (#22)
ancavar May 2, 2023
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
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
34 changes: 34 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint Code Base

on:
push:
branches: main
pull_request:
branches: main

jobs:
build:
name: Lint Code Base

runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter/slim@v5
env:
VALIDATE_JSCPD: false
VALIDATE_KOTLIN_ANDROID: false
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: "main"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: test with coverage
on:
push:
pull_request:
jobs:
build:
name: Build and Run Tests
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Build with Gradle
run: ./gradlew build

- name: JaCoCo Coverage Report
if: runner.os != 'Windows'
env:
report_path: trees/build/jacoco/report.csv
run: |
awk -F"," '{ instructions += $4 + $5; covered += $5; branches += $6 + $7; branches_covered +=$7 } END { print "Instructions covered:", covered"/"instructions, "--", 100*covered/instructions"%"; print "Branches covered:", branches_covered"/"branches, "--", 100*branches_covered/branches"%" }' "$report_path"

- uses: actions/upload-artifact@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
name: test-and-coverage-reports
path: trees/build/reports
retention-days: 365
184 changes: 184 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
# Created by https://www.toptal.com/developers/gitignore/api/kotlin,java,gradle,intellij
# Edit at https://www.toptal.com/developers/gitignore?templates=kotlin,java,gradle,intellij

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Kotlin ###
# Compiled class file

# Log file

# BlueJ files

# Mobile Tools for Java (J2ME)

# Package Files #

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml

### Gradle ###
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Gradle Patch ###
# Java heap dump
*.hprof
### mac gabage files
.DS_Store
# End of https://www.toptal.com/developers/gitignore/api/kotlin,java,gradle,intellij
Loading