Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
37766a1
Setting up GitHub Classroom Feedback
github-classroom[bot] May 18, 2024
b331ddc
structure: initial structure
homka122 May 18, 2024
d66e184
feat: add interfaces for graph
homka122 May 19, 2024
89ea33a
feat: add UndirectedGraph and several tests for it
homka122 May 19, 2024
1e25799
refactor: change adjacencyList type
homka122 May 20, 2024
61d0f1a
fix: change root project name
homka122 May 20, 2024
d1c8115
feat: add viewModels for Undirected Graph, Vertex and Edge
homka122 May 20, 2024
99b3228
feat: add viewModels for Canvas, VertexCanvas and EdgeCanvas
homka122 May 20, 2024
d6a62ec
feat: add views for Undirected Graph, Vertex and Edge
homka122 May 20, 2024
14ef52c
feat: add views for Canvas, VertexCanvas, EdgeCanvas
homka122 May 20, 2024
96775b6
feat: add Main with working app and MainView
homka122 May 20, 2024
083204c
Merge pull request #2 from spbu-coding-2023/feature/graphModel
Demon32123 May 20, 2024
9116d6e
feat: add animation to zoom and position transition
homka122 May 21, 2024
97473d6
refactor: change graph interface
homka122 May 21, 2024
7ac991a
feat: add Louvain library
homka122 May 24, 2024
5a2a06b
feat: add Clustering class that can group vertices
homka122 May 24, 2024
0ee0986
fix: notify gradle about dependency
homka122 May 24, 2024
5591009
fix: UndirectedGraph now can't add edge from node to same node
homka122 May 24, 2024
fa9a981
feat: add group property to UndirectedViewModel and replace placement…
homka122 May 24, 2024
5102f61
fix: edges place under vertices now
homka122 May 24, 2024
c055d20
feat: add example of clustering to main
homka122 May 24, 2024
7bc124e
Merge branch 'dev' into feature/clastering
homka122 May 24, 2024
5f37896
Merge pull request #3 from spbu-coding-2023/feature/clastering
homka122 May 24, 2024
414cb0b
fix: UndirectedGraph addEdge method now accept weight
homka122 May 24, 2024
4029a40
Created a PageRank algorithm class
Demon32123 May 25, 2024
7edf13b
feat: created a directed graph class along with modifications to the …
Demon32123 May 27, 2024
34396fb
feat: created tests for the directional graph
Demon32123 May 28, 2024
a102d71
feat: add node settings window
homka122 May 28, 2024
b7d07ae
Merge pull request #4 from spbu-coding-2023/feature/settingsUI
homka122 May 28, 2024
4329aa0
refactor: add folders for canvas and graph classes
homka122 May 28, 2024
4b1cb23
feat: disable window header
homka122 May 28, 2024
c22a9ba
feat: add config file
homka122 May 28, 2024
3d0543b
feat: optimize render nodes that user don't see
homka122 May 28, 2024
23723f0
feat: nodes' color now can be from clastering or settings
homka122 May 28, 2024
686b886
feat: node can be moved now
homka122 May 28, 2024
87a2130
refactor: update config variables' type
homka122 May 28, 2024
5e7ed8b
refactor: MyText now seperate view
homka122 May 28, 2024
1c7f54a
feat: add header
homka122 May 28, 2024
068bf67
Merge pull request #5 from spbu-coding-2023/feature/UI
homka122 May 28, 2024
c21ad27
Merge pull request #6 from spbu-coding-2023/feature/DirectedGraph
homka122 May 28, 2024
50e220d
feat: created a jacoco subreddit to track test coverage
Demon32123 May 28, 2024
63c39db
Merge pull request #7 from spbu-coding-2023/feature/jacoco
homka122 May 28, 2024
a34a698
feat: add shadow to button File
homka122 May 28, 2024
ddd9fb6
feat: add logo
homka122 May 28, 2024
b0aa248
feat: add icons for menu
homka122 May 28, 2024
7352738
fix: remove red border around canvas
homka122 May 28, 2024
4c43261
feat: now clustering button works
homka122 May 28, 2024
413d299
Merge pull request #8 from spbu-coding-2023/feature/PageRank
Demon32123 May 28, 2024
552f467
Merge pull request #9 from spbu-coding-2023/feature/UI
homka122 May 29, 2024
e7089ac
fix: move PageRank algorithm
homka122 May 29, 2024
81da3c6
Created tests for the PageRank algorithm
Demon32123 May 29, 2024
55695f3
feat: created new tests for the PageRank algorithm
Demon32123 May 29, 2024
5927b31
Merge pull request #10 from spbu-coding-2023/feature/PageRankTest
homka122 May 29, 2024
7af16ad
feat: add reader interface
homka122 May 29, 2024
fed8fb8
feat: add optimize parameter to config file
homka122 May 29, 2024
5189e68
refactor: canvas and nodes are now a different color
homka122 May 29, 2024
663d6f8
fix: fix bug in edge first and second node are same
homka122 May 29, 2024
276cbfc
feat: edge now prettier
homka122 May 29, 2024
7d8e6c3
feat: orientated options in settings
homka122 May 29, 2024
8dee896
refactor: settings now have sizeSlider from 5 to 80
homka122 May 29, 2024
d2a7e7e
refactor: node's strokeWidth now larger and text smaller
homka122 May 29, 2024
c74514b
feat: add node button now works
homka122 May 29, 2024
726d6d1
refactor: graph now can be only Int type :(
homka122 May 29, 2024
1dce858
feat: now you can add nodes
homka122 May 29, 2024
753224b
Merge pull request #11 from spbu-coding-2023/feature/UI
homka122 May 29, 2024
82fe793
feat: created algorithm for find bridges in graph
Demon32123 May 29, 2024
0c28c79
Merge pull request #13 from spbu-coding-2023/dev
homka122 May 29, 2024
fd5183a
Create README.md
homka122 May 29, 2024
74d325d
fix: fix add node button
homka122 May 29, 2024
07541ad
refactor: remove println functions
homka122 May 29, 2024
087e618
refactor: change nodes and layout algorithm
homka122 May 29, 2024
1eaea30
feat: created tests for the algorithm for finding bridges in a graph
Demon32123 May 29, 2024
95ca1e4
feat: now you can analysis nodes by rank button
homka122 May 29, 2024
a27e8c0
Merge pull request #14 from spbu-coding-2023/feature/findBridges
homka122 May 29, 2024
26e1c46
fix: delete generic type from algorithm
homka122 May 29, 2024
3b74b2d
fix: delete generic type from tests
homka122 May 29, 2024
9c14f2d
feat: add class WeightedGraph
May 26, 2024
9c8cf03
fix: now test only for method addEdge
May 29, 2024
2bad60c
fix: delete generic types for weightedGraph
homka122 May 29, 2024
8a3ab52
Merge pull request #15 from spbu-coding-2023/dev
homka122 May 29, 2024
27fa599
feat: add cycle finding algorithm
homka122 May 31, 2024
5b11ec6
fix: fix bugs in FindCycle algorithm
homka122 May 31, 2024
cd542db
feat: add tests for FindCycle algorithm for undirected graph
homka122 May 31, 2024
ffeccb3
feat: add CI for tests and build
homka122 May 31, 2024
f58dbaa
Merge pull request #16 from spbu-coding-2023/feature/CI
homka122 May 31, 2024
6e83c86
feat: add BellmanFord algorithm
homka122 May 31, 2024
62a6291
refactor: add edges button not active
homka122 May 31, 2024
9c784d1
refactor: rename test
homka122 May 31, 2024
a149560
fix: fix BellmanFord algorithm with negative edges
homka122 May 31, 2024
33cbfac
Create LICENSE
homka122 May 31, 2024
1304025
feat: add tests for BellmanFord algorithm
homka122 May 31, 2024
e4097ab
feat: add tests for cycles for FindCycle algorithm
homka122 May 31, 2024
2d28e85
refactor: refactor HeaderView
homka122 May 31, 2024
4f95491
fix: program null safety now
homka122 May 31, 2024
d9275ef
feat: add Dijkstra algorithm
Demon32123 Aug 17, 2024
a78b38d
refactor: removed the unnecessary part in the file
Demon32123 Aug 17, 2024
0c98d1b
fix: fixed the algorithm class attribute
Demon32123 Aug 17, 2024
2b9809a
refactor: сhanged the output of the algorithm function
Demon32123 Aug 17, 2024
265af6f
feat: add test for Dijkstra algorithm
Demon32123 Aug 17, 2024
92f56f7
Merge pull request #17 from spbu-coding-2023/feature/Dijkstra
Demon32123 Aug 18, 2024
f261912
fix: delete unused graph view
homka122 Aug 18, 2024
1718891
feat: added a dependency for SQLite
Demon32123 Aug 19, 2024
8fd8afe
refactor: added the nameGraph parameter to the loadGraph function
Demon32123 Aug 19, 2024
994c621
refactor: added the nameGraph parameter to the saveGraph function
Demon32123 Aug 20, 2024
7fe1489
refactor: seperate logic, add new viewModels
homka122 Aug 20, 2024
19a5a47
refactor: seperate logic, add new viewModels
homka122 Aug 20, 2024
9ecc1df
feat: created a function to save graph (saveGraph)
Demon32123 Aug 20, 2024
9b7bcd5
feat: created function loadGraph (loadGraph)
Demon32123 Aug 20, 2024
a7014f7
refactor: delete prints
homka122 Aug 23, 2024
26fdbf5
refactor: made the DirectedGraph class open
Demon32123 Aug 23, 2024
344e7ac
feat: add WeightedDirectedGraph class
Demon32123 Aug 23, 2024
0cc068e
feat: add WeightedDirectedGraphTest class
Demon32123 Aug 23, 2024
7a0289e
feat: added to the loadGraph and saveGraph functions to take into acc…
Demon32123 Aug 23, 2024
35a8b87
feat: added a directory with the trial database
Demon32123 Aug 23, 2024
f115877
Merge pull request #19 from spbu-coding-2023/feature/SQLiteReader
Demon32123 Aug 24, 2024
81791f9
Merge pull request #20 from spbu-coding-2023/refactor/views
homka122 Aug 26, 2024
e49ac61
feat: add algorithms icon
Demon32123 Sep 2, 2024
ecb9694
feat: implemented algorithms icon in GUI
Demon32123 Sep 2, 2024
ac54f5d
feat: add image with description for button
Demon32123 Sep 5, 2024
d9ba9bf
feat: implement description display
Demon32123 Sep 5, 2024
15c7c1f
refactor: delete comment
Demon32123 Sep 6, 2024
ce1d985
feat: added icons for the algorithm menu
Demon32123 Sep 6, 2024
5d325c6
feat: made a menu of algorithms
Demon32123 Sep 6, 2024
a846928
feat: add icon for file menu
Demon32123 Sep 9, 2024
1a2bf8b
feat: implemented file menu view
Demon32123 Sep 9, 2024
1a2e48f
refactor: deleted unnecessary imports
Demon32123 Sep 9, 2024
b88cddf
fix: stroke width now scales with zoom
homka122 Sep 10, 2024
5e6ee3f
fix: now clustering and pagerank buttons work
homka122 Sep 10, 2024
e0fd264
Merge pull request #21 from spbu-coding-2023/feature/AlgorithmView
Demon32123 Sep 11, 2024
762fad9
fix: now adding nodes button works
homka122 Sep 14, 2024
a25c617
refactor: delete unused variables in main file
homka122 Sep 14, 2024
0f3d03a
refactor: optimize imports
homka122 Sep 14, 2024
d61ab86
refactor: delete unused variables
homka122 Sep 14, 2024
c492c56
refactor: seperate box style in SettingsView
homka122 Sep 14, 2024
cb9f3c1
resolve merge conflicts
homka122 Sep 14, 2024
2d7336d
Fix buttons (#22)
homka122 Sep 15, 2024
ab4358a
refactor: refactor menu, change variables initilization
homka122 Sep 19, 2024
4384fb9
refactor: refactor vertecies' state initilization
homka122 Sep 19, 2024
17ff642
refactor: refactor canvas, edge, vertex state's initialization
homka122 Sep 19, 2024
52d5197
refactor: refactor modelView of canvas and vertex
homka122 Sep 22, 2024
cb29024
Merge pull request #23 from spbu-coding-2023/refactor/menu
homka122 Sep 22, 2024
6e5978a
feat: add Neo4jReader
homka122 Sep 23, 2024
7aaa4db
refactor: delete println in the method
homka122 Sep 23, 2024
7a01dc5
fix: close transaction after exiting from method
homka122 Sep 23, 2024
6da6362
feat: add type to graph
homka122 Sep 23, 2024
2587a9e
docs: add comments to Neo4jReader
homka122 Sep 23, 2024
439d948
feat: add tests for Neo4jReader
homka122 Sep 23, 2024
ffd989b
feat: add methods for change edge's color
homka122 Sep 23, 2024
2209f0f
feat: add creating edge button
homka122 Sep 23, 2024
f0a4cff
feat: linked the bridges algorithm to the button
Demon32123 Sep 24, 2024
7c17efe
Merge pull request #25 from spbu-coding-2023/feature/addEdge
Demon32123 Sep 24, 2024
0d8789b
refactor: got rid of println and fixed branch conflict
Demon32123 Sep 24, 2024
1014e62
fix: disable tests that interact with database
homka122 Sep 24, 2024
f99a209
refactor: added some changes after the review
Demon32123 Sep 24, 2024
5206b95
Merge pull request #24 from spbu-coding-2023/feature/neo4j
homka122 Sep 24, 2024
4a5893b
rafactor: made the algorithm list function more simple to connect the…
Demon32123 Sep 24, 2024
54f6fb4
refactor: change map on data class
Demon32123 Sep 24, 2024
a121e05
Merge pull request #26 from spbu-coding-2023/feature/FindBridgeVeiwModel
Demon32123 Sep 24, 2024
bacb104
feat: add findEdge to Graph interface and implementation
homka122 Sep 24, 2024
40c7086
feat: connected the Dijkstra algorithm button to the algorithm itself]
Demon32123 Sep 24, 2024
4b0c99d
feat: add find cycle button
homka122 Sep 24, 2024
0bd9374
fix: now color reset when you click on another node
homka122 Sep 24, 2024
e28f802
refactor: added reset color of edges in the algorithm before reuse
Demon32123 Sep 24, 2024
a5310ba
Merge pull request #27 from spbu-coding-2023/feature/DijkstraViewModel
Demon32123 Sep 24, 2024
bdde001
resolve conflicts
homka122 Sep 24, 2024
d7705cb
Merge pull request #28 from spbu-coding-2023/feature/cycleButton
homka122 Sep 24, 2024
6dce6f4
feat: add integrate test
homka122 Sep 24, 2024
fbcae97
Merge pull request #29 from spbu-coding-2023/feature/integrateTest
homka122 Sep 24, 2024
d016283
Merge pull request #30 from spbu-coding-2023/dev
homka122 Sep 24, 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
26 changes: 26 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Kotlin CI With Gradle

on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 20
uses: actions/setup-java@v4
with:
java-version: '20'
distribution: 'temurin'

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

- name: Launch tests
run: ./gradlew test
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.DS_Store
.idea/shelf
.idea
/confluence/target
/dependencies/repo
/android.tests.dependencies
/dependencies/android.tests.dependencies
/dist
/local
/gh-pages
/ideaSDK
/clionSDK
/android-studio/sdk
out/
/tmp
/intellij
workspace.xml
*.versionsBackup
/idea/testData/debugger/tinyApp/classes*
/jps-plugin/testData/kannotator
/js/js.translator/testData/out/
/js/js.translator/testData/out-min/
/js/js.translator/testData/out-pir/
.gradle/
build/
!**/src/**/build
!**/test/**/build
*.iml
!**/testData/**/*.iml
.idea/artifacts
.idea/remote-targets.xml
.idea/libraries/Gradle*.xml
.idea/libraries/Maven*.xml
.idea/modules
.idea/runConfigurations/JPS_*.xml
.idea/runConfigurations/_JPS_*.xml
.idea/runConfigurations/PILL_*.xml
.idea/runConfigurations/_FP_*.xml
.idea/runConfigurations/_MT_*.xml
.idea/libraries
.idea/modules.xml
.idea/gradle.xml
.idea/compiler.xml
.idea/inspectionProfiles/profiles_settings.xml
.idea/.name
.idea/jarRepositories.xml
.idea/csv-plugin.xml
.idea/libraries-with-intellij-classes.xml
.idea/misc.xml
.idea/protoeditor.xml
node_modules/
.rpt2_cache/
libraries/tools/kotlin-test-js-runner/lib/
local.properties
buildSrcTmp/
distTmp/
outTmp/
/test.output
/kotlin-native/dist
kotlin-ide/
.kotlin/
.teamcity/
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) 2024 Ilhom Kombaev, Anastasiia Kuzmina, Dmitry Sheiko

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.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Graph3

With our program you can:
- Add nodes, change their color, size
- Move nodes over canvas
- Drag and zoom canvas (Mouse scroll and drag LMB)
- Cluster nodes

![Screenshot_20240530_000236](https://github.com/spbu-coding-2023/graphs-graphs-3/assets/39369841/00b2e6a4-aec1-46d0-845f-ce099df9dbf3)
62 changes: 62 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
kotlin("jvm")
id("org.jetbrains.compose")
id("jacoco")
}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
flatDir {
dirs("libs")
}
}

dependencies {
// Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet
// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
implementation(compose.desktop.currentOs)
implementation(":louvain-1.0-SNAPSHOT")
testImplementation(kotlin("test"))
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.1")
implementation("org.xerial:sqlite-jdbc:3.41.2.2")
implementation("org.neo4j.driver", "neo4j-java-driver", "5.6.0")
}

compose.desktop {
application {
mainClass = "MainKt"

nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "graphs-3"
packageVersion = "1.0.0"
}
}
}

tasks.test {
useJUnitPlatform()
finalizedBy("jacocoTestReport")
}

tasks.jacocoTestReport {
dependsOn(tasks.test)
reports {
xml.required.set(true)
html.required.set(true)
}
}

jacoco {
toolVersion = "0.8.12"
}
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
kotlin.code.style=official
kotlin.version=1.9.22
compose.version=1.6.0
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading