-
Notifications
You must be signed in to change notification settings - Fork 0
Feedback #1
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
Open
github-classroom
wants to merge
89
commits into
feedback
Choose a base branch
from
main
base: feedback
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feedback #1
Changes from all commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
8772eb9
Setting up GitHub Classroom Feedback
github-classroom[bot] 41eff22
docs: Added license file.
gryaznovasoffshore c0550ad
docs: Changed copyright contributors.
gryaznovasoffshore 3c3a394
docs: Added README file.
gryaznovasoffshore f0d0ee2
docs: Added CONTRIBUTING file.
gryaznovasoffshore 5865654
docs: Deleted JUnit-Installation block in README.
gryaznovasoffshore 395f5be
struct: Added .gitignore for filtering files.
Arsene-Baitenov 993bd8c
feat: Inited build tool Gradle.
Arsene-Baitenov a87b195
ci: Added script for GitHub Actions.
Arsene-Baitenov 484844a
feat: Added forgotten gradle-wrapper.jar
Arsene-Baitenov 6f3764b
feat: Added interface describing bst functions.
Arsene-Baitenov 7ec522c
feat: Added class that implements bst interface.
Arsene-Baitenov 3d96795
feat: Added search operation.
Arsene-Baitenov 4721843
feat: Added delete and add operations.
Arsene-Baitenov 079c25f
feat: Added initializing and extension functions for BST.
Arsene-Baitenov f97bb39
test: Added tests for put function.
Arsene-Baitenov 6a93179
feat: Added iterator and set operation.
Arsene-Baitenov 2a06776
fix: Deleted extension functions for BST.
Arsene-Baitenov 4572a67
test: Changed test for put function.
Arsene-Baitenov ee8c6d7
test: Added test for iterator exceptions.
Arsene-Baitenov 914e6ce
test: Added tests for get, remove and clear functions.
Arsene-Baitenov 6cc95a4
fix: Added increment/decrement of size in put/remove functions, chang…
Arsene-Baitenov af174f6
test: Added size checks.
Arsene-Baitenov ce87a54
test: Added another test for remove operation.
Arsene-Baitenov 6f79357
feat: Added interface describing rbt functions.
Arsene-Baitenov c0c9cbb
feat: Added abstract class that implements bst interface and iterator.
Arsene-Baitenov 717a4db
feat: Added search(get), delete(remove) and add(set, put) operations.
Arsene-Baitenov 09bf28d
feat: Added initializing functions for RBT.
Arsene-Baitenov 847918f
fix: Changed receiving of leaf for deletion.
Arsene-Baitenov fbeee00
test: Added tests for RBT.
Arsene-Baitenov c87f546
fix: Fixed orientation bug in leaf removal function.
Arsene-Baitenov a0f69fa
test: Added another test for remove operation.
Arsene-Baitenov c9fbb63
test: Changed invariant checker in root removal test.
Arsene-Baitenov 6ad0691
struct: Files removed due to architecture change.
Arsene-Baitenov d1e71ad
fix: Vertex interfaces moved to a separate file.
Arsene-Baitenov 06f1e41
feat: Added simple BST implementation.
Arsene-Baitenov 4c9845b
test: Added tests for simple BST.
Arsene-Baitenov fc0b804
feat: Added RBT implementation.
Arsene-Baitenov e426e79
test: Added tests for RBT.
Arsene-Baitenov 780e9d4
feat: Added initializing functions for BST interface.
Arsene-Baitenov 1a9855c
fix: Changed RBT size getter visibility modifier to protected.
Arsene-Baitenov 5872711
feat: Added a dependencies to use org.neo4j.ogm.
Arsene-Baitenov 919c1b1
feat: Added a dependency for SLF4J providers.
Arsene-Baitenov e7ce16f
feat: Added Compose file with neo4j for Docker Compose.
Arsene-Baitenov 04cdd65
feat: Added RBT repository to save RBT to neo4j database.
Arsene-Baitenov 2bb8908
refactor: Renamed RBT repository class.
Arsene-Baitenov 3c03266
fix: Changed BST size getter visibility modifier to protected.
Arsene-Baitenov 066be9a
feat: Added a dependency to use kotlinx.serialization.
Arsene-Baitenov 34af52d
feat: Added BST repository to save BST to flat files.
Arsene-Baitenov 5aa174c
Merge branch 'main' into feat/rbt-database
Arsene-Baitenov 0e5c53b
Merge pull request #9 from spbu-coding-2022/feat/rbt-database
Arsene-Baitenov e9f1750
refactor: Renamed RBT repository implementation file.
Arsene-Baitenov 78096b1
refactor: Renamed RBT and BST checkers implementation files.
Arsene-Baitenov 6fa3828
test: Added exclusion from Jacoco Report
Arsene-Baitenov 6394415
ci: Added mergeable.yml file for pull requests.
gryaznovasoffshore 169a585
fix: Deleted invalid rule for title.
gryaznovasoffshore 7f51195
fix: Added ignore rule for feedback.
gryaznovasoffshore 21b226a
Updated logo in README.md file.
gryaznovasoffshore aa97ab0
docs: Updated -Getting Started- block.
gryaznovasoffshore b904f48
docs: Updated -App Usage- block.
gryaznovasoffshore c4deb82
docs: Added start window to -App Usage- block.
gryaznovasoffshore a1947e5
docs: Changed start window size in -App Usage- block.
gryaznovasoffshore af1c202
docs: Added main draw window to -App Usage- block.
gryaznovasoffshore 3e5996c
feat: Added AVL-Vertex class.
gryaznovasoffshore df26d30
feat: Developed tests for AVL-Tree.
gryaznovasoffshore 7dc6ca4
feat: Developed AVL-Tree model.
gryaznovasoffshore 636887d
feat: Added AVL-InvariantChecker for tests.
gryaznovasoffshore c7f5ece
fix: Refactored AVL-Tree & tests.
gryaznovasoffshore 680419b
fix: Fixed avl-tree architecture.
gryaznovasoffshore c324664
fix: Fixed AVLTreeTest issue.
gryaznovasoffshore 2f6fba5
feat: Added dependencies for using Jetpack Compose.
Arsene-Baitenov 07614b8
feat: Added function for drawing main window.
Arsene-Baitenov a34329b
feat: Added edge view.
Arsene-Baitenov 212f353
feat: Added vertex view.
Arsene-Baitenov 84dfb14
feat: Added ScrollDelta for detecting scroll.
Arsene-Baitenov 9332f3b
feat: Added Position that stores the coordinates of the vertex.
Arsene-Baitenov 83d03f7
feat: Added file with the constants.
Arsene-Baitenov 1db2235
feat: Added tree view.
Arsene-Baitenov 8dd3aa4
fix: Changed app logo.
Arsene-Baitenov e8b4e83
feat: Added MainWindow that draws editor.
Arsene-Baitenov 1adc59b
feat: Added logotype-zone in main-draw window.
gryaznovasoffshore 8c7fc6f
feat: Changed default text styles.
Arsene-Baitenov 543bb93
fix: Removed debug output to console.
Arsene-Baitenov cce7ef5
feat: Added Position and ScrollDelta serialization and deserializatio…
Arsene-Baitenov a64df3c
feat: Added wrapper on the tree repositories for working with the db.
Arsene-Baitenov 5affca4
fix: Fixed minor flaws.
gryaznovasoffshore 156de3b
fix: Centralized required vertex.
gryaznovasoffshore 8cf2191
feat: Added tree selection window.
Arsene-Baitenov 005a826
fix: Fixed bug with drag of vertex and mistake of vertex text output.
Arsene-Baitenov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# 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 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: 2 | ||
mergeable: | ||
- when: pull_request.*, pull_request_review.* | ||
filter: | ||
- do: payload | ||
pull_request: | ||
title: | ||
must_exclude: | ||
regex: ^Feedback$ | ||
regex_flag: none | ||
validate: | ||
- do: title | ||
no_empty: | ||
enabled: true | ||
message: "The title should not be empty." | ||
begins_with: | ||
match: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] | ||
message: "The name must begin with a capital letter." | ||
|
||
- do: description | ||
no_empty: | ||
enabled: true | ||
message: "The description should not be empty." | ||
|
||
- do: approvals | ||
min: | ||
count: 1 | ||
required: | ||
assignees: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test with coverage | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout project sources | ||
uses: actions/checkout@v2 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-version: current | ||
gradle-home-cache-cleanup: true | ||
- name: Run test | ||
run: | | ||
./gradlew clean | ||
./gradlew test | ||
- name: JaCoCo Coverage Report | ||
env: | ||
report_path: BinarySearchTrees/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 | ||
with: | ||
name: binarysearchtree-test-and-coverage-reports | ||
path: | | ||
BinarySearchTrees/build/reports |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
**/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 | ||
|
||
# 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 | ||
|
||
# Out Package # | ||
/out/ | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
.idea |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
plugins { | ||
id("org.jetbrains.kotlin.jvm") version "1.8.10" | ||
jacoco | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// Use the Kotlin JDK 8 standard library. | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
|
||
testImplementation(platform("org.junit:junit-bom:5.9.2")) | ||
testImplementation("org.junit.jupiter:junit-jupiter") | ||
} | ||
|
||
tasks.test { | ||
finalizedBy("jacocoTestReport") | ||
useJUnitPlatform() | ||
maxHeapSize = "2G" | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
reports.html.outputLocation.set(file("${buildDir}/reports/test")) | ||
} | ||
|
||
tasks.named<JacocoReport>("jacocoTestReport") { | ||
dependsOn(tasks.test) | ||
|
||
classDirectories.setFrom(files(classDirectories.files.map { | ||
fileTree(it) { | ||
exclude("**/binarysearchtrees/TreesKt.*") | ||
} | ||
})) | ||
|
||
reports { | ||
xml.required.set(false) | ||
html.required.set(true) | ||
html.outputLocation.set(file("${buildDir}/reports/jacoco")) | ||
csv.required.set(true) | ||
csv.outputLocation.set(file("${buildDir}/jacoco/report.csv")) | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
BinarySearchTrees/src/main/kotlin/binarysearchtrees/BinarySearchTree.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package binarysearchtrees | ||
|
||
interface BinarySearchTree<K : Comparable<K>, V> { | ||
val size: Int | ||
|
||
fun isEmpty(): Boolean | ||
|
||
fun clear() | ||
|
||
fun getRoot(): MutableVertex<K, V>? | ||
|
||
operator fun get(key: K): V? | ||
|
||
fun put(key: K, value: V): V? | ||
|
||
operator fun set(key: K, value: V) | ||
|
||
fun remove(key: K): V? | ||
|
||
fun remove(key: K, value: V): Boolean | ||
|
||
operator fun iterator(): Iterator<MutableVertex<K, V>> | ||
} |
19 changes: 19 additions & 0 deletions
19
BinarySearchTrees/src/main/kotlin/binarysearchtrees/Trees.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package binarysearchtrees | ||
|
||
import binarysearchtrees.redblacktree.RedBlackTree | ||
|
||
// initializing functions | ||
|
||
fun <K : Comparable<K>, V> binarySearchTreeOf(): BinarySearchTree<K, V> { | ||
return RedBlackTree<K, V>() | ||
} | ||
|
||
fun <K : Comparable<K>, V> binarySearchTreeOf( | ||
vararg args: Pair<K, V> | ||
): BinarySearchTree<K, V> { | ||
val tree = RedBlackTree<K, V>() | ||
for (it in args) { | ||
tree.put(it.first, it.second) | ||
} | ||
return tree | ||
} | ||
16 changes: 16 additions & 0 deletions
16
BinarySearchTrees/src/main/kotlin/binarysearchtrees/Vertices.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package binarysearchtrees | ||
|
||
//for extension functions like all, any, ... | ||
interface Vertex<K, V> { | ||
val key: K | ||
val value: V | ||
val left: Vertex<K, V>? | ||
val right: Vertex<K, V>? | ||
} | ||
|
||
interface MutableVertex<K, V> : Vertex<K, V> { | ||
override val left: MutableVertex<K, V>? | ||
override val right: MutableVertex<K, V>? | ||
|
||
fun setValue(newValue: V): V | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему при вызове
binarySearchTreeOf()
возвращается экземплярRedBlackTree
?