Skip to content

Commit a2d2d12

Browse files
authored
Merge pull request #19 from DilumAluthge/dpa/docs-internals
Move the state machine diagram to a separate `docs/internals.md` Markdown file
2 parents a82dede + 0ea237f commit a2d2d12

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,4 @@ julia> Pkg.Registry.update()
6666

6767
## Implementation
6868

69-
Authentication is implemented with the following state machine:
70-
71-
![State machine](assets/structure.png)
69+
For implementation details, please see [`docs/internals.md`](docs/internals.md).

bin/structure.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
using LightGraphs, PkgAuthentication, GraphPlot, Cairo, Compose
22

3-
file = joinpath(dirname(@__DIR__), "src", "PkgAuthentication.jl")
3+
const bin_dir = @__DIR__
4+
const root_dir = dirname(bin_dir)
5+
const src_dir = joinpath(root_dir, "src")
6+
const docs_dir = joinpath(root_dir, "docs")
7+
const docs_assets_dir = joinpath(docs_dir, "assets")
8+
9+
file = joinpath(src_dir, "PkgAuthentication.jl")
410

511
g = SimpleDiGraph()
612
lines = readlines(file)
@@ -19,4 +25,4 @@ for line in lines
1925
end
2026
end
2127
plot = gplot(g, nodelabel=vertices, linetype="curve")
22-
draw(PNG(joinpath(@__DIR__, "structure.png"), 16cm, 16cm), plot)
28+
draw(PNG(joinpath(docs_assets_dir, "structure.png"), 16cm, 16cm), plot)
File renamed without changes.

docs/internals.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Internals
2+
3+
## Implementation
4+
5+
Authentication is implemented with the following state machine:
6+
7+
![State machine](assets/structure.png)

0 commit comments

Comments
 (0)