Skip to content

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
wants to merge 125 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
16d61cf
Setting up GitHub Classroom Feedback
github-classroom[bot] Mar 20, 2023
b353bfd
struct: Add MIT licence
toadharvard Mar 22, 2023
8b49e81
struct: Remove useless .keep file
toadharvard Mar 22, 2023
cbd0f4f
struct: Add .gitignore for garbage from java, idea and gradle
toadharvard Mar 22, 2023
c7f0b7a
struct: Init default gradle structure
toadharvard Mar 23, 2023
7fd60bc
struct: Add module for future BST implementations
toadharvard Mar 23, 2023
ade6a9c
feat: Add contributing guidelines for newcomers
toadharvard Mar 23, 2023
091365f
feat: Add contributing header to README
toadharvard Mar 23, 2023
1f0bf4f
feat: Add header about used license
toadharvard Mar 23, 2023
8663dcd
fix: Fix several typos and beautify structure of the text
YazoonDinalt Mar 24, 2023
e24f59d
feat: Add template as reminder for contributors
toadharvard Mar 24, 2023
56d338e
feat: Add mergeable as contrib guidlines checker
toadharvard Mar 25, 2023
f12030b
refactor: Replace template with mergable config
toadharvard Mar 25, 2023
4dd15fb
feat: Add comment with contributing guidlines
toadharvard Mar 25, 2023
71fb6ef
fix: Fix invalid tabs/spaces mixture
toadharvard Mar 25, 2023
ae06618
feat: Add abstract binary search tree
toadharvard Mar 25, 2023
dff298d
feat: Add node wrappers for easy access to root property
toadharvard Mar 25, 2023
e5d78cf
feat: Add binary search tree facade pattern implementation
toadharvard Mar 25, 2023
1b502cc
fix: Bump kotlin version to fix grandle run task
toadharvard Mar 25, 2023
90b5330
ci: Add actions on push and PRs
toadharvard Mar 25, 2023
16770f0
fix: Add executable permission to gradlew script
toadharvard Mar 25, 2023
54da724
refactor: Allow gradlew-wrapper.jar in project
toadharvard Mar 25, 2023
919ddeb
fix: Add missing gradlew-wrapper.jar
toadharvard Mar 25, 2023
53aaa1b
feat: Add AVL tree balancer implementation
Urtix Mar 26, 2023
9b44ff4
fix: Add Main-Class to app.jar manifest
toadharvard Mar 26, 2023
6e6b4c1
ci: Change artifact folder location
toadharvard Mar 26, 2023
762199c
ci: Fix runnig same actions on push to main
toadharvard Mar 26, 2023
5151478
feat: Add ktor for fat jar building
toadharvard Mar 26, 2023
ae2b382
ci: Upload artifacts separately
toadharvard Mar 26, 2023
fea817d
ci: Bump checkout version
toadharvard Mar 30, 2023
866e988
ci: Add filter for Feedback PR
toadharvard Mar 30, 2023
240b427
test: Add junit5 dependency
toadharvard Apr 3, 2023
982e7d8
feat: Add balancer for common binary search tree
toadharvard Apr 3, 2023
be022fe
test: Add invariant checks for BSTree
toadharvard Apr 3, 2023
9ed7e6e
test: Add test implementation for avl tree
Urtix Apr 2, 2023
96b3116
refactor: Add comments with a drawn tree structure
Urtix Apr 4, 2023
1c1b259
test: Add tree invariant validation tests
Urtix Apr 4, 2023
a8494c2
test: Add height check after removing elements
Urtix Apr 4, 2023
4ccc489
feat: Add red black tree balancer
YazoonDinalt Apr 2, 2023
cf69428
fix: Remove `data` in nodes because of comparation stackoverflow
toadharvard Apr 3, 2023
dfc6119
feat: Add parent property to wrapped red black node
toadharvard Apr 3, 2023
2142110
test: Add invariant checks for RBTree
toadharvard Apr 5, 2023
589d20d
fix: Update rotations and fix wrong root recoloring
toadharvard Apr 5, 2023
cc54c3e
fix: Fix remove in red black tree balancer. Finally works!
YazoonDinalt Apr 8, 2023
d789c11
test: Remove false negative test
YazoonDinalt Apr 8, 2023
151c7df
refactor: Make root set and some properties internal
toadharvard Apr 8, 2023
3858220
refactor: Remove useless and buggy wrappers
toadharvard Apr 8, 2023
242456c
test: Fix tests because of new root access
toadharvard Apr 8, 2023
26d153c
struct: Move all from binary-search-tree lib to app
toadharvard Apr 16, 2023
f7cf2d9
feat: Add serialization deps
toadharvard Apr 16, 2023
66a9023
feat: Add template for repositories
toadharvard Apr 16, 2023
be9581f
ci: Add dependabot for dependecy tracking
toadharvard Apr 16, 2023
1cfb44b
build(deps): Bump jvm from 1.8.10 to 1.8.20
dependabot[bot] Apr 16, 2023
551ed22
build(deps): Bump plugin.serialization from 1.8.10 to 1.8.20
dependabot[bot] Apr 16, 2023
4b4ff05
ci: Add coverage report using jacoco
toadharvard Apr 16, 2023
cadc5c5
ci: Fix ci.yml structure
toadharvard Apr 16, 2023
d3d0c73
feat: Add information about binary trees and features
toadharvard Apr 16, 2023
c33775a
fix: Update exception names and remove !! (boom)
toadharvard Apr 17, 2023
5e177ce
feat: Implement strategies for all trees
toadharvard Apr 17, 2023
61a9afc
test: Fix the problem with the immutable root in AVLBalancerTest
Urtix Apr 17, 2023
d9434b3
test: Fix a bug with a non-changing root when remove
Urtix Apr 18, 2023
a6965e0
test: Remove '!!' from test
Urtix Apr 18, 2023
1b55a67
feat: Add docker compose with postgres and neo4j for devs
toadharvard Apr 18, 2023
f0a1c6e
feat: Add neo4j saver and update signatures
toadharvard Apr 18, 2023
556b3ba
feat: Add OGM for neo4j
toadharvard Apr 18, 2023
b37efef
fix: Remove useless quotes
toadharvard Apr 18, 2023
66c1d74
fix: Delete now works with trees without root
toadharvard Apr 18, 2023
4a847cc
fix: Remove default configuration property
toadharvard Apr 18, 2023
c6afb41
test: Fix a problem with warnings related to the type of root
Urtix Apr 18, 2023
c771c3c
fix: Fix parent restoration process for RedBlackTree
toadharvard Apr 18, 2023
890117a
test: Add test to check the add and remove methods of rb and avl trees
YazoonDinalt Apr 17, 2023
dcecdcb
test: Add test balance rb and bs tree
YazoonDinalt Apr 18, 2023
535e7b8
test: Remove the 'boom', correct the name, correct the ugly brackets
YazoonDinalt Apr 18, 2023
d941b24
docs: Add docs for any freaking classes, methods etc
toadharvard Apr 18, 2023
7d42ff1
refactor: Reformat all code with default idea formatter
toadharvard Apr 18, 2023
d86d9a5
ci: Fix awk string
toadharvard Apr 18, 2023
32b5697
ci: Remove buggy awk script
toadharvard Apr 19, 2023
d241f94
feat: Add information about saving to the README
YazoonDinalt Apr 19, 2023
cb12f73
feat: Change example
YazoonDinalt Apr 19, 2023
21caccb
feat: Add postgresql saver
toadharvard Apr 19, 2023
59f5e5c
test: Add a check for left and right turns with the 'add' method
Urtix Apr 23, 2023
531ba90
build(deps): Bump org.postgresql:postgresql from 42.5.4 to 42.6.0
dependabot[bot] Apr 19, 2023
78f0234
fix: Change README
YazoonDinalt Apr 21, 2023
801a1f8
fix: Add html report in jacoco
YazoonDinalt Apr 21, 2023
c92ff0a
fix: Add a description to the isParentLinkedRight(), change the minVa…
YazoonDinalt Apr 22, 2023
bfa3491
add: Add more granular tests for rb balancer
YazoonDinalt Apr 23, 2023
55e7e91
fix: Add the use of repo to the README, to clarify for docker
YazoonDinalt Apr 23, 2023
4f2769f
feat: Update README
toadharvard Apr 23, 2023
b2c22f4
feat: Make BinarySearchTree iterable
toadharvard Apr 23, 2023
72fb6b7
fix: Make function description better
toadharvard Apr 23, 2023
e43b8e1
test: Add a test for LevelOrderIterator
Urtix Apr 23, 2023
cde4644
test: Add a test for InOrderIteratot
Urtix Apr 23, 2023
b8f06cd
test: Add a test for PreOrderIteratot
Urtix Apr 23, 2023
278d2d7
struct: Move iterator tests to the desired folder
Urtix Apr 23, 2023
9e80c8f
refactor: Change the package for bst
Urtix Apr 23, 2023
b7f364b
struct: Remove duplicate tests for iterators
Urtix Apr 23, 2023
03fbfe5
fix: Rename file name
toadharvard Apr 23, 2023
ba5a58c
feat: Add save, load and delete for json
Urtix Apr 19, 2023
619df6a
fix: Remove unnecessary gson dependecy
toadharvard Apr 29, 2023
6390eec
fix: Add iterable interface
toadharvard Apr 25, 2023
caf7161
ci: Remove ktor task
toadharvard Apr 25, 2023
d5ec647
feat: Add graph drawing ui with scale, dragging etc.
toadharvard Apr 25, 2023
a5b6be2
struct: Move all graph things to one folder
toadharvard Apr 30, 2023
b8c09e5
feat: Add dropdown menu for tree operations
toadharvard Apr 30, 2023
5b95a05
feat: Add `add`, `remove` oprations for trees
toadharvard May 2, 2023
51879cb
feat: Add `search` to visualizer
toadharvard May 2, 2023
38cc8e4
fix: Fix `search` visualization
toadharvard May 2, 2023
a1fb999
fix: Fix text in input fields and nodes
toadharvard May 2, 2023
7bf09d1
fix: Add a tree selection
YazoonDinalt May 2, 2023
3786191
fix: Fix dialog window drawing
toadharvard May 2, 2023
4a6d2e0
fix: Fix reset view align
toadharvard May 2, 2023
add147e
refactor: Move out components from App
toadharvard May 2, 2023
a985741
fix: Fix balancer remove method
toadharvard May 2, 2023
d36a1ee
feat: Add saving to json
toadharvard May 2, 2023
1e92fd4
fix: Remove invalid Main.kt
toadharvard May 2, 2023
6076d5b
feat: Add loading from file with same typeOfTree
toadharvard May 2, 2023
71737ae
refactor: Make full code refactor
toadharvard May 2, 2023
f4d7cc9
feat: Add icons and title for dialog
toadharvard May 2, 2023
421955b
fix: Remove macos from builds because of old version of JDK in gradle…
toadharvard May 2, 2023
654756b
fix: Remove windows from builds because of old version of JDK in grad…
toadharvard May 2, 2023
e93237b
feat: Update README.md
Urtix May 2, 2023
068b53d
feat: Add macos and windows latest
Urtix May 5, 2023
11a6b6e
fix: Add distribution in ci
Urtix May 5, 2023
c4ec1d9
fix: Fix ui crash when load witch invalid name
Urtix May 6, 2023
97b26ac
fix: Add in ci:os macos and windows
Urtix May 6, 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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

Empty file removed .github/.keep
Empty file.
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"
30 changes: 30 additions & 0 deletions .github/mergeable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2
mergeable:
- when: pull_request.*, pull_request_review.*
filter:
# ignore 'Feedback' PR
- do: payload
pull_request:
title:
must_exclude:
regex: ^Feedback$
regex_flag: none
validate:
- do: description
no_empty:
enabled: true
message: "Description matter and should not be empty. Provide detail with **what** was changed, **why** it was changed, and **how** it was changed."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message: "Description matter and should not be empty. Provide detail with **what** was changed, **why** it was changed, and **how** it was changed."
message: "Description matters and should not be empty. Provide details about **what** was changed, **why** it was changed, and **how** it was changed."

- do: approvals
min:
count: 1
required:
assignees: true

- when: pull_request.opened
name: "Remind about contributing guidelines"
validate: [ ]
pass:
- do: comment
payload:
body: >
Thanks for creating a pull request! Please, check that your pull request meets the [CONTRIBUTING](./CONTRIBUTING.md) requirements.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Плохое название файла для actions, imho. Я и так знаю, что это CI. Может лучше что-то по типу "gradle build"

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run full build

on:
push:
jobs:
build-gradle-project:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
- name: Checkout project sources
uses: actions/checkout@v3
- name: Setup Java 11
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle Wrapper
run: ./gradlew build

- uses: actions/upload-artifact@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
name: Upload coverage report
path: app/build/coverage/test/*
85 changes: 85 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# 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

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

.idea

# 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

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

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

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Внесение правок

## Основные советы

1. Никогда не используйте merge, только rebase для сохранения линейной истории коммитов
2. **Осторожно** с изменениями в чужих ветках. Придется больно и мучительно делать rebase. Лучше не трогайте чужие
ветки
3. Перепроверьте историю коммитов перед созданием пулл реквеста
4. Каждый коммит должен быть осознанным и быть одним логическим элементом
5. Каждый пулл реквест должен быть осознанным и быть одним логическим элементом
6. **Перепроверьте, что вы в правильной ветке**, никогда не коммитьте напрямую в main

## Правила добавления коммитов

Коммиты добавляются в соответствии с conventional commits. Т.е
`<type>(<scope>): <body>`.

Поле `<type>` должно принимать одно из этих значений:

* `feat` для добавления новой функциональности
* `fix` для исправления бага в программе
* `refactor` для рефакторинга кода, например, переименования переменной
* `test` для добавления тестов, их рефакторинга
* `struct` для изменений связанных с изменением структуры проекта (НО НЕ КОДА), например изменение
расположения папок
* `ci` для различных задач ci/cd

Поле `<scope>` опционально и показывает к какому модулю, классу, методу функции и т.п применены изменения.

Поле `<body>` содержит суть изменений в повелительном наклонении настоящего времени на английском языке без точки в
конце, первое слово - глагол с большой буквы. Текст сообщения должен включать мотивацию к изменению и контрасты с
предыдущим поведением.

Примеры:

* Хорошо: "Add module for future BST implementations"
* Плохо: "Added module for future BST implementations."
* Плохо: "Adds module".
* Очень плохо: "new bug."

## Правила именования и создания веток

Ветка под одно (большое) логическое изменение. Формат для веток `<type>/<short-body>`. Тип аналогичен тому же в
коммитах,
а `<short-body>` представляет собой короткое описание назначения ветки в kebab-case стиле.

Примеры хороших названий:

* `feat/add-avl-tree`
* `ci/add-klint`

После одобрения пулл реквеста, ветка удаляется. А новая функциональность разрабатывается в новой ветке.

## Правила для пулл реквестов

Пулл реквесты оформляются на любом удобном языке. Но должны четко отвечать на 3 вопроса:

1. Что?
2. Зачем?
3. Почему?

Ответ на вопрос что должен содержаться в заголовке пулл реквеста. На остальные вопросы ответ должен быть в описании.

**НЕ ТЫКАТЬ НА ЗЕЛЕНУЮ КНОПОЧКУ `REBASE AND MERGE` БЕЗ РЕВЬЮ**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А вы не просили добавить настройку, чтобы нельзя было смержить без обязательного ревью хотя бы одного?


**Запрещено** сливать свой пулл реквест в ветку самостоятельно.

Если тыкаете на зеленую кнопочку, то **убедитесь**, что на ней написано `REBASE AND MERGE`

Ревью происходит в виде комметариев к пулл реквестам, обсуждения в чате команды и личном общении.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-present Yakshigulov Vadim, Dyachkov Vitaliy, Perevalov Efim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading