Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
38ae41e
Setting up GitHub Classroom Feedback
github-classroom[bot] Mar 13, 2024
a3c9bb9
Gradle Init
odiumuniverse Mar 15, 2024
7728300
Add Megalinter passing
odiumuniverse Mar 15, 2024
eb7cfc8
Merge pull request #2 from spbu-coding-2023/work
odiumuniverse Mar 15, 2024
3d196a5
Create LICENSE
odiumuniverse Mar 15, 2024
c83ea4a
Create LICENSE
odiumuniverse Mar 15, 2024
16da8dc
Add coverage CI test
odiumuniverse Mar 16, 2024
ddb20f4
Create README.md
odiumuniverse Mar 19, 2024
b45a77a
Merge pull request #3 from spbu-coding-2023/create_readme
odiumuniverse Mar 19, 2024
e42eebb
Set project structure, created templates
Ycyken Mar 16, 2024
0ac14b8
Change: run test after false clean build
odiumuniverse Mar 16, 2024
1b300c6
Update README.md
odiumuniverse Mar 16, 2024
b8d273e
Restructured abstract class BSTreeTemplate:
Ycyken Mar 20, 2024
d3d4fcb
Update README.md
Ycyken Mar 21, 2024
6572777
Deleted test example and renamed class SimpleBSTree to SimpleTree
Ycyken Mar 21, 2024
ce5371e
Added more public methods to BSTreeTemplate and modified documentation
Ycyken Mar 21, 2024
d9601ee
Implemented AVL methods, changed docs comments
Ycyken Mar 21, 2024
f516677
Added primitive tests for avl tree
Ycyken Mar 21, 2024
43a3973
Fixed rotations in avl tree + fixed root change after rotations
Ycyken Mar 22, 2024
990390e
Fixed get method, changed `simple array test` for easier debug
Ycyken Mar 22, 2024
abe3a97
Merge branch 'main' into work
Ycyken Mar 22, 2024
528fd61
[MegaLinter] Apply linters fixes
Ycyken Mar 22, 2024
943b340
Merge pull request #4 from spbu-coding-2023/work
Ycyken Mar 22, 2024
1fc34b2
Update README.md
Ycyken Mar 22, 2024
da34fe5
Add set method BSTree
odiumuniverse Mar 22, 2024
603576f
Added some private methods, changed key to var in vertices
Ycyken Mar 22, 2024
b201613
Merge pull request #6 from spbu-coding-2023/BSTree
odiumuniverse Mar 22, 2024
32c6a4e
Add remove method
odiumuniverse Mar 22, 2024
1eed4a1
Refactor remove method in SimpleTree
Ycyken Mar 23, 2024
88ef6a0
Implemented remove method in AVL tree
Ycyken Mar 23, 2024
97f2cb0
Added docs to AVLTree methods and tiny refactor
Ycyken Mar 23, 2024
ed08a17
Change `remove` method and add exception in `set` method
odiumuniverse Mar 23, 2024
9632af4
Fixed set bug and added remove tests for avl tree
Ycyken Mar 23, 2024
1cdd688
Merge branch 'work' into BSTreeRemove
Ycyken Mar 23, 2024
fa8a25d
Merge pull request #9 from spbu-coding-2023/BSTreeRemove
Ycyken Mar 23, 2024
a0e4a9a
Delete .github/workflows/coverage.yml
odiumuniverse Mar 23, 2024
aaaf315
Fixed bug in balanceOnce method AVLTree, added tests for avl tree
Ycyken Mar 25, 2024
2888681
Fixed visibility mofidiers for setters of vertices properties and roots
Ycyken Mar 25, 2024
4c8d45e
Added test function for avl invariant check
Ycyken Mar 25, 2024
d9c7cc4
Fix 2 bugs in rotation and remove methods in AVLTree, add tests
Ycyken Mar 26, 2024
51d137a
add: unbalanced set for RBTree
admitrievtsev Mar 26, 2024
8ae91ea
Add remove tests for avl tree
Ycyken Mar 26, 2024
1e30213
Fix bug in double rotations of avl tree
Ycyken Mar 26, 2024
3557840
Merge branch 'main' into work
Ycyken Mar 26, 2024
cefb90b
[MegaLinter] Apply linters fixes
Ycyken Mar 26, 2024
f79ede6
Merge pull request #10 from spbu-coding-2023/work
Ycyken Mar 26, 2024
1cb7bc1
add: RBTree right/left rotation
admitrievtsev Mar 26, 2024
3a06537
add: RBTree set with balance
admitrievtsev Mar 26, 2024
f24f57e
add: RBTree balanced insert
admitrievtsev Mar 27, 2024
48323b7
Merge branch 'main' into RBTree
admitrievtsev Mar 27, 2024
3f69120
[MegaLinter] Apply linters fixes
admitrievtsev Mar 27, 2024
1658aee
Merge pull request #11 from spbu-coding-2023/RBTree
admitrievtsev Mar 27, 2024
23f0f9c
Add coverage test
odiumuniverse Mar 28, 2024
511a6f8
Add coverage
odiumuniverse Mar 28, 2024
b3adb52
Add plugin in `build.gradle.kts`
odiumuniverse Mar 28, 2024
92a50c7
Add coverage action
odiumuniverse Mar 28, 2024
fc4857b
small change in coverage.yml
odiumuniverse Mar 28, 2024
47e2e84
Merge pull request #12 from spbu-coding-2023/coverage
odiumuniverse Mar 28, 2024
41d9976
Added .editorconfig
Ycyken Mar 30, 2024
56f1396
Fix .editorconfig
Ycyken Mar 30, 2024
68bd28f
Code style fixes
Ycyken Mar 30, 2024
9f9bbd7
[MegaLinter] Apply linters fixes
Ycyken Mar 30, 2024
831abf0
Merge pull request #13 from spbu-coding-2023/codeStyleEditor
Ycyken Mar 30, 2024
b2a6ddc
Merge branch 'main' into work
Ycyken Mar 30, 2024
1384a6d
Add tests for avl tree
Ycyken Mar 30, 2024
8fa50e9
Add visualisation for 1 avl tree test
Ycyken Mar 31, 2024
901c9ac
Merge branch 'main' into work
Ycyken Mar 31, 2024
f87eda7
[MegaLinter] Apply linters fixes
Ycyken Mar 31, 2024
27e7756
Merge pull request #14 from spbu-coding-2023/work
Ycyken Mar 31, 2024
994ce9d
Add tests for public methods in avl tree
Ycyken Mar 31, 2024
b33b8d7
Add avl tests, change module names
Ycyken Mar 31, 2024
b2e477b
Merge pull request #15 from spbu-coding-2023/work
Ycyken Mar 31, 2024
09aca2b
Renamed all occurrences of AVLTree to AvlTree
Ycyken Mar 31, 2024
1812704
Change package names to camelCase
Ycyken Mar 31, 2024
bb8c6c9
Change file names to camelCase
Ycyken Mar 31, 2024
aef29de
Rename AvlSpecificTest class
Ycyken Mar 31, 2024
b6a47d1
Merge pull request #16 from spbu-coding-2023/work
Ycyken Mar 31, 2024
aea3c77
Merge pull request #17 from spbu-coding-2023/main
admitrievtsev Mar 31, 2024
ab18f3c
fix: RBTree size counter bug fix
admitrievtsev Mar 31, 2024
31f1f9d
add: simple RBTree tests
admitrievtsev Mar 31, 2024
2b90d65
[MegaLinter] Apply linters fixes
admitrievtsev Mar 31, 2024
297c4a2
Merge pull request #18 from spbu-coding-2023/RBTree
odiumuniverse Mar 31, 2024
14146d1
Fix warnings
Ycyken Mar 31, 2024
0ddad80
Merge pull request #19 from spbu-coding-2023/work
Ycyken Mar 31, 2024
4f42726
Fix `set` method in SimpleTree
odiumuniverse Mar 31, 2024
d748486
Add SimpleTree tests
odiumuniverse Mar 31, 2024
ab3ca95
Fix after change the file structure
odiumuniverse Mar 31, 2024
f94402c
Add test on SimpleTree for 100% coverage
odiumuniverse Mar 31, 2024
4757da0
Add tests on RB | Increased coverage to 86%
odiumuniverse Mar 31, 2024
b4e7c4f
fix: root remove now works properly
admitrievtsev Apr 1, 2024
7c92479
add: new RBTree tests
admitrievtsev Apr 1, 2024
c9bff25
Merge pull request #20 from spbu-coding-2023/RBTree
odiumuniverse Apr 2, 2024
95f31b2
Refactor SimpleTree
odiumuniverse Apr 2, 2024
239c11a
fix: RBTree size counter bug fix
admitrievtsev Mar 31, 2024
8547b33
add: simple RBTree tests
admitrievtsev Mar 31, 2024
0c8f365
[MegaLinter] Apply linters fixes
admitrievtsev Mar 31, 2024
b8754a2
Fix `set` method in SimpleTree
odiumuniverse Mar 31, 2024
584b1e9
Add SimpleTree tests
odiumuniverse Mar 31, 2024
7eab970
Fix after change the file structure
odiumuniverse Mar 31, 2024
f8f1b76
Add test on SimpleTree for 100% coverage
odiumuniverse Mar 31, 2024
3277c7c
Add tests on RB | Increased coverage to 86%
odiumuniverse Mar 31, 2024
1b17148
fix: root remove now works properly
admitrievtsev Apr 1, 2024
7dfd733
add: new RBTree tests
admitrievtsev Apr 1, 2024
f319fa0
Refactor SimpleTree
odiumuniverse Apr 2, 2024
8ac8645
Fix remove in SimpleTree
Ycyken Apr 2, 2024
b94caef
Add test for RBTree
Ycyken Apr 2, 2024
ef8c39c
fix: tree size counter
admitrievtsev Apr 2, 2024
a0c1cda
ref: RBTest code refactoring
admitrievtsev Apr 2, 2024
9ae92ce
ref: code refactoring
admitrievtsev Apr 2, 2024
c3bea68
ref: remove dev-only features
admitrievtsev Apr 2, 2024
49def24
Merge branch 'main' into work
admitrievtsev Apr 2, 2024
17c6b81
Merge pull request #21 from spbu-coding-2023/work
odiumuniverse Apr 2, 2024
a48f9c6
Move setWithoutBalance method to abstract class
Ycyken Apr 2, 2024
dfdbb7d
ref: code refactor
Ycyken Apr 2, 2024
cb3edcd
Merge pull request #22 from spbu-coding-2023/work
Ycyken Apr 2, 2024
d81081e
Fix typos
Ycyken Apr 2, 2024
868f43c
Merge pull request #23 from spbu-coding-2023/work
Ycyken Apr 2, 2024
8b1cd35
Delete private method `maxVert`
odiumuniverse Apr 3, 2024
5311898
Change root visibility modifier to protected
Ycyken Apr 5, 2024
4766aed
Merge pull request #24 from spbu-coding-2023/work
Ycyken Apr 5, 2024
6010250
Change: add megalinter-report in .gitignore
odiumuniverse Apr 6, 2024
2efe0bf
Delete megalinter-reports directory
odiumuniverse Apr 6, 2024
e2b7369
refactor: rename tests on Simple Tree
odiumuniverse Apr 8, 2024
09af4ec
Refactor: remove redundat function reference argument
Ycyken Apr 12, 2024
c04846c
Refactor: remove redundant XTestTrees, change root visibility
Ycyken Apr 12, 2024
8ecbf95
Refactor: fix warnings
Ycyken Apr 12, 2024
b4bc994
Refactor: rename template classes and package
Ycyken Apr 12, 2024
10c45ad
[MegaLinter] Apply linters fixes
Ycyken Apr 12, 2024
513a55c
Merge pull request #26 from spbu-coding-2023/refactor-inheritance-and…
Ycyken Apr 12, 2024
0793733
Chage: Revised CI after Revoy
odiumuniverse Apr 12, 2024
0a461f4
Change: Delete run on windows(feature on future)
odiumuniverse Apr 12, 2024
6a138cd
Change: MegaLinter run only on push
odiumuniverse Apr 12, 2024
2134848
Change: Download oracle jdk instead temurin
odiumuniverse Apr 12, 2024
c982792
Refactor: rename workflows files, rename gradle build workflow
Ycyken Apr 13, 2024
04523db
Refactor: rename job in gradle-build workflow
Ycyken Apr 13, 2024
db033c4
Refactor: Delete .keep
odiumuniverse Apr 13, 2024
c740cf2
Merge pull request #28 from spbu-coding-2023/features_CI
odiumuniverse Apr 13, 2024
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
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*.{kt,kts}]
ktlint_code_style = intellij_idea
max_line_length = 120
9 changes: 9 additions & 0 deletions .gitattributes
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

Empty file removed .github/.keep
Empty file.
40 changes: 40 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Coverage Test

on:
push:
jobs:
Coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'oracle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5

- name: Run Test Coverage
run: ./gradlew jacocoTestReport

- name: Jacoco Test Coverage Report
uses: cicirello/jacoco-badge-generator@v2.8.0
with:
generate-branches-badge: true
jacoco-csv-file: lib/build/jacoco/report.csv

- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/prodNormalDebugCoverage/prodNormalDebugCoverage.xml,
${{ github.workspace }}/**/build/reports/jacoco/**/debugCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
update-comment: true
22 changes: 22 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build & Test

on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "oracle"
java-version: '17'

- name: Clean, Build and Test
run: ./gradlew clean build
89 changes: 89 additions & 0 deletions .github/workflows/megalinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
# MegaLinter GitHub Action configuration file
# More info at https://megalinter.io
name: MegaLinter

on:
# Trigger mega-linter at every push. Action will also be visible from Pull Requests to main
push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions)

env: # Comment env block if you don't want to apply fixes
# Apply linter fixes configuration
APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool)
APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all)
APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request)
ENABLE_LINTERS: KOTLIN_KTLINT
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
megalinter:
name: MegaLinter
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR
# Remove the ones you do not need
contents: write
issues: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances

# MegaLinter
- name: MegaLinter
id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/
uses: oxsecurity/megalinter@v7
env:
# All available variables are described in documentation
# https://megalinter.io/configuration/
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Override with true if you always want to lint all sources
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
# DISABLE: COPYPASTE,SPELL # Uncomment to disable copy-paste and spell checks

# Upload MegaLinter artifacts
- name: Archive production artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: MegaLinter reports
path: |
megalinter-reports
mega-linter.log

# Create pull request if applicable (for now works only on PR from same repository, not from forks)
- name: Create Pull Request with applied fixes
id: cpr
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot
- name: Create PR output
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

# Push new commit if applicable (for now works only on PR from same repository, not from forks)
- name: Prepare commit
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
run: sudo chown -Rc $UID .git/
- name: Commit and push applied linter fixes
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
commit_message: "[MegaLinter] Apply linters fixes"
commit_user_name: megalinter-bot
commit_user_email: nicolas.vuillamy@ox.security
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
/.idea/
/megalinter-reports/
Loading