Skip to content

Commit 5ba3453

Browse files
committed
initialize
1 parent c1bdccd commit 5ba3453

35 files changed

+63418
-29
lines changed

.JuliaFormatter.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
# See https://domluna.github.io/JuliaFormatter.jl/stable/ for a list of options
22
style = "blue"
3+
4+
margin = 92
5+
6+
align_assignment = true
7+
align_matrix = true
8+
9+
always_use_return = true
10+
short_to_long_function_def = false
11+
remove_extra_newlines = true
12+
13+
import_to_using = true
14+
format_docstrings = true
15+
conditional_to_if = true
16+
indent_submodule = true
17+
18+
always_for_in=true

.github/workflows/CI.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
matrix:
2525
version:
2626
- '1.10'
27-
- '1.6'
2827
os:
2928
- ubuntu-latest
3029
arch:
@@ -39,7 +38,7 @@ jobs:
3938
- uses: julia-actions/julia-buildpkg@v1
4039
- uses: julia-actions/julia-runtest@v1
4140
- uses: julia-actions/julia-processcoverage@v1
42-
- uses: codecov/codecov-action@v4
41+
- uses: codecov/codecov-action@v5
4342
with:
4443
files: lcov.info
4544
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/CompatHelper.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
@@ -13,4 +16,4 @@ jobs:
1316
env:
1417
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1518
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'
19+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
*.jl.*.cov
22
*.jl.cov
33
*.jl.mem
4-
/Manifest*.toml
5-
/docs/Manifest*.toml
4+
/Manifest.toml
5+
/docs/Manifest.toml
66
/docs/build/
7+
*.cov
8+
*.info
9+
/.VSCodeCounter

Project.toml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,45 @@
11
name = "GraphColoring"
2-
uuid = "2eaf82eb-f9ae-4d9b-a5af-4a8051fbc35e"
3-
authors = ["djukic14 <[email protected]> and contributors"]
4-
version = "1.0.0-DEV"
2+
uuid = "ed38bb8a-6120-4024-8d1e-8789784f251b"
3+
authors = ["Danijel Jukić <[email protected]> and contributors"]
4+
version = "0.1.0"
5+
6+
[deps]
7+
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
8+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
9+
10+
[weakdeps]
11+
BEAST = "bb4162c7-ba94-5a20-af32-d8ec4428bdd1"
12+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
13+
14+
[extensions]
15+
GraphColoringBEAST = ["BEAST"]
16+
GraphColoringGraphs = ["Graphs"]
517

618
[compat]
7-
julia = "1.6.7"
19+
julia = "1.10"
20+
LinearAlgebra = "1"
21+
BEAST = "2"
22+
CompScienceMeshes = "0.9"
23+
DataStructures = ">=0.18.1"
24+
Graphs = "1"
25+
Aqua = "0.8"
26+
SparseArrays = "1"
27+
Test = "1"
28+
JuliaFormatter = "2.1"
29+
TestItemRunner = "1.1"
30+
TestItems = "1.0"
831

932
[extras]
1033
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
34+
BEAST = "bb4162c7-ba94-5a20-af32-d8ec4428bdd1"
35+
CompScienceMeshes = "3e66a162-7b8c-5da0-b8f8-124ecd2c3ae1"
36+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
37+
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
38+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
39+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1140
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
41+
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
42+
TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe"
1243

1344
[targets]
14-
test = ["Aqua", "Test"]
45+
test = ["Aqua", "BEAST", "CompScienceMeshes", "Graphs", "JuliaFormatter", "LinearAlgebra", "SparseArrays", "Test", "TestItemRunner", "TestItems"]

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
# GraphColoring
22

3+
<p align="center">
4+
<picture>
5+
<source media="(prefers-color-scheme)" srcset="docs/src/assets/logo.svg" height="100">
6+
<img alt="" src="" height="100">
7+
</picture>
8+
</p>
9+
310
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://djukic14.github.io/GraphColoring.jl/stable/)
411
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://djukic14.github.io/GraphColoring.jl/dev/)
512
[![Build Status](https://github.com/djukic14/GraphColoring.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/djukic14/GraphColoring.jl/actions/workflows/CI.yml?query=branch%3Amain)
613
[![Coverage](https://codecov.io/gh/djukic14/GraphColoring.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/djukic14/GraphColoring.jl)
7-
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
14+
15+
## Introduction
16+
17+
Graph coloring is a technique used to avoid conflicts between elements in a graph. The goal is to assign colors to the elements such that no two neighboring elements have the same color.
18+
Currently, the following aspects are implemented (✓) and planned (⌛):
19+
20+
-[Greedy](https://www.geeksforgeeks.org/dsa/graph-coloring-set-2-greedy-algorithm/)
21+
-[DSATUR (Degree SATURated)](https://www.geeksforgeeks.org/dsa/dsatur-algorithm-for-graph-coloring/)
22+
-[Workstream](https://dl.acm.org/doi/10.1145/2851488)
23+
- ⌛ Random (and iterative random coloring)
24+
- ⌛ First-Fit Coloring
25+
26+
## Documentation
27+
28+
- Documentation for the [latest stable version](https://djukic14.github.io/GraphColoring.jl/stable/).
29+
- Documentation for the [development version](https://djukic14.github.io/GraphColoring.jl/dev/)

docs/Project.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
[deps]
2+
BEAST = "bb4162c7-ba94-5a20-af32-d8ec4428bdd1"
3+
CompScienceMeshes = "3e66a162-7b8c-5da0-b8f8-124ecd2c3ae1"
24
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
GraphColoring = "2eaf82eb-f9ae-4d9b-a5af-4a8051fbc35e"
5+
GmshTools = "82e2f556-b1bd-5f1a-9576-f93c0da5f0ee"
6+
GraphColoring = "ed38bb8a-6120-4024-8d1e-8789784f251b"
7+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
8+
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"

docs/make.jl

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,61 @@
11
using GraphColoring
2+
using Graphs, BEAST, PlotlyJS
23
using Documenter
34

5+
import GraphColoring:
6+
node,
7+
partition,
8+
gather,
9+
color,
10+
colorzones,
11+
_neighbors,
12+
_numelements,
13+
noconflicts,
14+
conflicts,
15+
ConflictFunctor
16+
417
DocMeta.setdocmeta!(GraphColoring, :DocTestSetup, :(using GraphColoring); recursive=true)
518

619
makedocs(;
7-
modules=[GraphColoring],
8-
authors="djukic14 <[email protected]> and contributors",
20+
modules=[
21+
GraphColoring,
22+
if isdefined(Base, :get_extension)
23+
Base.get_extension(GraphColoring, :GraphColoringBEAST)
24+
else
25+
GraphColoring.GraphColoringBEAST
26+
end,
27+
if isdefined(Base, :get_extension)
28+
Base.get_extension(GraphColoring, :GraphColoringGraphs)
29+
else
30+
GraphColoring.GraphColoringGraphs
31+
end,
32+
],
33+
authors="Danijel Jukić <[email protected]> and contributors",
934
sitename="GraphColoring.jl",
1035
format=Documenter.HTML(;
36+
prettyurls=true,
1137
canonical="https://djukic14.github.io/GraphColoring.jl",
1238
edit_link="main",
1339
assets=String[],
1440
),
1541
pages=[
1642
"Home" => "index.md",
43+
"Conflicts" => "conflicts.md",
44+
"Coloring" => [
45+
"Greedy" => "greedy.md",
46+
"DSatur" => "dsatur.md",
47+
"Workstream" => "workstream.md",
48+
],
49+
"Contributing" => "contributing.md",
50+
"API Reference" => "apiref.md",
1751
],
1852
)
1953

2054
deploydocs(;
2155
repo="github.com/djukic14/GraphColoring.jl",
56+
target="build",
2257
devbranch="main",
58+
push_preview=true,
59+
forcepush=true,
60+
versions=["stable" => "v^", "dev" => "dev"],
2361
)

docs/src/apiref.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# API Reference
2+
3+
```@index
4+
```
5+
6+
```@autodocs
7+
Modules=[GraphColoring,
8+
if isdefined(Base, :get_extension)
9+
Base.get_extension(GraphColoring, :GraphColoringBEAST)
10+
else
11+
GraphColoring.GraphColoringBEAST
12+
end,
13+
if isdefined(Base, :get_extension)
14+
Base.get_extension(GraphColoring, :GraphColoringGraphs)
15+
else
16+
GraphColoring.GraphColoringGraphs
17+
end,
18+
]
19+
```

docs/src/assets/logo.svg

Lines changed: 71 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)