Skip to content

Commit 65fbc7c

Browse files
authored
Fix documentation (#1104)
* Fix documentation * rm IIF dependency and examples from docs until DFG v1
1 parent fb7d8a8 commit 65fbc7c

19 files changed

+522
-548
lines changed

docs/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[deps]
22
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
33
Compose = "a81c6b42-2e10-5240-aca2-a61377ecd94b"
4+
DistributedFactorGraphs = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
45
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
56
GraphPlot = "a2cc645c-3eea-5389-862e-a155d0052231"
6-
IncrementalInference = "904591bb-b899-562f-9e6f-b8df64c7d480"
77

88
[compat]
9-
Documenter = "0.27"
9+
Documenter = "1"

docs/extra/CoreAPI.fods

Lines changed: 327 additions & 391 deletions
Large diffs are not rendered by default.

docs/make.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Documenter
22
using GraphPlot
3-
push!(ENV, "DFG_USE_CGDFG" => "true")
43
using DistributedFactorGraphs
54

65
makedocs(;
@@ -16,13 +15,14 @@ makedocs(;
1615
"Drawing Graphs" => "DrawingGraphs.md",
1716
"Quick API Reference" => "ref_api.md",
1817
],
19-
"Function Reference" => "func_ref.md",
18+
"Reference" => ["func_ref.md", "services_ref.md", "blob_ref.md"],
2019
],
20+
# warnonly=[:doctest],
21+
# checkdocs=:none,
2122
# html_prettyurls = !("local" in ARGS),
2223
)
2324

2425
deploydocs(;
2526
repo = "github.com/JuliaRobotics/DistributedFactorGraphs.jl.git",
2627
target = "build",
27-
# deps = Deps.pip("mkdocs", "python-markdown-math")
2828
)

docs/src/BuildingGraphs.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this section constructing DFG graphs will be discussed. To start, bring DistributedFactorGraphs into your workspace:
44

5-
```@example buildingGraphs; continued = true
5+
```julia
66
using DistributedFactorGraphs
77
```
88

@@ -14,7 +14,7 @@ So for the following examples, IncrementalInference will be used to create the v
1414
using Pkg
1515
Pkg.add("IncrementalInference")
1616
```
17-
```@example buildingGraphs; continued = true
17+
```julia
1818
using IncrementalInference
1919
```
2020

@@ -30,7 +30,7 @@ To continue the example, run one of the following to create a DFG driver:
3030

3131
### Creating a GraphsDFG Graph
3232

33-
```@example buildingGraphs; continued = true
33+
```julia
3434
# Create a DFG with default solver parameters using the Graphs.jl driver.
3535
dfg = GraphsDFG{SolverParams}(solverParams=SolverParams())
3636
```
@@ -54,7 +54,7 @@ In addition, the following optional parameters are provided:
5454

5555
Three variables are added:
5656

57-
```@example buildingGraphs; continued = true
57+
```julia
5858
v1 = addVariable!(dfg, :x0, ContinuousScalar, tags = [:POSE], solvable=1)
5959
v2 = addVariable!(dfg, :x1, ContinuousScalar, tags = [:POSE], solvable=1)
6060
v3 = addVariable!(dfg, :l0, ContinuousScalar, tags = [:LANDMARK], solvable=1)
@@ -73,7 +73,7 @@ Additionally, the solvable flag is also set to indicate that the factor can be u
7373

7474
Four factors are added: a prior, a linear conditional relationship with a normal distribution between x0 and x1, and a pair of linear conditional relationships between each pose and the landmark.
7575

76-
```@example buildingGraphs; continued = true
76+
```julia
7777
prior = addFactor!(dfg, [:x0], Prior(Normal(0,1)))
7878
f1 = addFactor!(dfg, [:x0; :x1], LinearRelative(Normal(50.0,2.0)), solvable=1)
7979
f1 = addFactor!(dfg, [:l0; :x0], LinearRelative(Normal(40.0,5.0)), solvable=1)
@@ -97,12 +97,12 @@ variable and factor labels can be retrieved with the [`ls`](@ref)/[`listVariable
9797
[`lsf`](@ref)/[`listFactors`](@ref) functions:
9898

9999
For example listing the variables in the graph we created above:
100-
```@example buildingGraphs
100+
```julia
101101
ls(dfg)
102102
```
103103

104104
Or listing the factors:
105-
```@example buildingGraphs
105+
```julia
106106
lsf(dfg)
107107
```
108108

docs/src/DataStructure.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ summary of the types and the available properties (some of which are derived) is
1313

1414
Accessible properties for each of the variable structures:
1515

16-
| | Label | Timestamp | Tags | Estimates | Soft Type | Solvable | Solver Data | Small Data | Big Data Entries |
17-
|---------------------|-------|-----------|------|-----------|-----------|----------|-------------|------------|------------------|
18-
| SkeletonDFGVariable | X | | X | | | | | | |
19-
| DFGVariableSummary | X | X | X | X | Symbol | | | | X |
20-
| DFGVariable | X | X | X | X | X | X | X | X | X |
16+
| | Label | Timestamp | Tags | Estimates | Soft Type | Solvable | Solver Data | Metadata | Blob Entries |
17+
|---------------------|-------|-----------|------|-----------|-----------|----------|-------------|----------|--------------|
18+
| SkeletonDFGVariable | X | | X | | | | | | |
19+
| DFGVariableSummary | X | X | X | X | Symbol | | | | X |
20+
| DFGVariable | X | X | X | X | X | X | X | X | X |
2121

2222
Accessible properties for each of the factor structures:
2323

@@ -27,21 +27,26 @@ Accessible properties for each of the factor structures:
2727
| DFGFactorSummary | X | X | X | | | |
2828
| DFGFactor | X | X | X | X | X | X |
2929

30-
## DFG Skeleton
30+
## DFG Skeleton types
3131

3232
- [`SkeletonDFGVariable`](@ref)
3333
- [`SkeletonDFGFactor`](@ref)
3434

35-
## DFG Summary
35+
## DFG Summary types
3636

3737
- [`DFGVariableSummary`](@ref)
3838
- [`DFGFactorSummary`](@ref)
3939

40-
## Full DFG Node
40+
## DFG Portable and Storeable types
41+
42+
- [`Variable`](@ref)
43+
- [`PackedFactor`](@ref)
44+
45+
## DFG Full solvable types
4146

4247
- [`DFGVariable`](@ref)
4348
- [`DFGFactor`](@ref)
4449

4550
## Additional Offloaded Data
4651

47-
Additional, larger data can be associated with variables using keyed big data entries.
52+
Additional, larger data can be associated with variables and factors using keyed blob entries.

docs/src/DrawingGraphs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ Pkg.add("GraphPlot")
1313

1414
Then bring `GraphPlot` in before DFG:
1515

16-
```@example plots; continued = true
16+
```julia
1717
using GraphPlot
1818
using DistributedFactorGraphs
1919
```
2020

2121
Any factor graph can then be drawn by calling [`plotDFG`](@ref):
2222

23-
```@example plots
23+
```julia
2424
using Cairo # hide
2525
# Construct graph using IIF
2626
using IncrementalInference
@@ -42,7 +42,7 @@ plotDFG(dfg)
4242

4343
The graph can be rendered to PDF, SVG or JPG in the following way by including compose:
4444

45-
```@example plots
45+
```julia
4646
using Compose
4747
# lets add another variable and factor and plot it
4848
dfg.solverParams.graphinit = false # hide
@@ -52,7 +52,7 @@ addFactor!(dfg, [:x1; :x2], LinearRelative(Normal(50.0,2.0)));
5252
draw(SVG("graph.svg", 10cm, 10cm), plotDFG(dfg));
5353
nothing # hide
5454
```
55-
![](graph.svg)
55+
FIXME show graph.svg
5656

5757

5858
### More Information
@@ -67,7 +67,7 @@ and can be drawn by either:
6767
- Calling [`toDot`](@ref) on any graph to produce a string of the graph
6868
- Calling [`toDotFile`](@ref) on any graph to save it directly to a dotfile
6969

70-
```@example
70+
```julia
7171
using DistributedFactorGraphs
7272
# Construct graph using IIF
7373
using IncrementalInference

docs/src/blob_ref.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Blobs and BlobEntries
2+
3+
```@contents
4+
Pages = [
5+
"blob_ref.md"
6+
]
7+
Depth = 3
8+
```
9+
10+
## Types
11+
```@autodocs
12+
Modules = [DistributedFactorGraphs]
13+
14+
Pages = [
15+
"DataBlobs/entities/BlobEntry.jl",
16+
"DataBlobs/entities/BlobStores.jl",
17+
]
18+
19+
```
20+
21+
## Functions
22+
```@autodocs
23+
Modules = [DistributedFactorGraphs]
24+
25+
Pages = [
26+
"DataBlobs/services/BlobEntry.jl",
27+
"DataBlobs/services/BlobStores.jl",
28+
"DataBlobs/services/BlobPacking.jl",
29+
"DataBlobs/services/HelpersDataWrapEntryBlob.jl",
30+
]
31+
32+
```
33+
34+

docs/src/func_ref.md

Lines changed: 5 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DistributedFactorGraphs Functions Reference
1+
# DistributedFactorGraphs Types
22

33
```@contents
44
Pages = [
@@ -14,7 +14,7 @@ Modules = [DistributedFactorGraphs]
1414
Pages = ["DistributedFactorGraphs.jl"]
1515
```
1616

17-
## Entities
17+
## Types
1818

1919
### Abstract DFG
2020

@@ -44,70 +44,11 @@ Modules = [DistributedFactorGraphs]
4444
Pages = ["entities/DFGFactor.jl"]
4545
```
4646

47-
## Services
48-
49-
### Abstract DFG
50-
51-
```@autodocs
52-
Modules = [DistributedFactorGraphs]
53-
Pages = ["services/AbstractDFG.jl"]
54-
```
55-
56-
### Common Accessors
57-
58-
Common Accessors to both variable and factor nodes
59-
60-
```@autodocs
61-
Modules = [DistributedFactorGraphs]
62-
Pages = ["services/CommonAccessors.jl"]
63-
```
64-
65-
### DFG Variable Accessors CRUD and SET opperations
66-
67-
```@autodocs
68-
Modules = [DistributedFactorGraphs]
69-
Pages = ["services/DFGVariable.jl"]
70-
```
71-
72-
### DFG Factor Accessors CRUD and SET opperations
73-
74-
```@autodocs
75-
Modules = [DistributedFactorGraphs]
76-
Pages = ["services/DFGFactor.jl"]
77-
```
78-
79-
### Printing
80-
81-
```@autodocs
82-
Modules = [DistributedFactorGraphs]
83-
Pages = ["services/CustomPrinting.jl"]
84-
```
85-
86-
### Compare Utilities
87-
88-
```@autodocs
89-
Modules = [DistributedFactorGraphs]
90-
Pages = ["services/CompareUtils.jl"]
91-
```
92-
93-
### Common Functions
94-
95-
```@autodocs
96-
Modules = [DistributedFactorGraphs]
97-
Pages = ["src/Common.jl"]
98-
```
99-
100-
### Serialization
101-
102-
```@autodocs
103-
Modules = [DistributedFactorGraphs]
104-
Pages = ["services/Serialization.jl"]
105-
```
106-
10747
## DFG Plots [GraphPlot.jl]
10848

10949
```@autodocs
110-
Modules = [DFGPlots]
50+
Modules = [DistributedFactorGraphs]
51+
Pages = ["weakdeps_prototypes.jl"]
11152
```
11253

11354
## Drivers
@@ -123,18 +64,4 @@ Modules = [GraphsDFGs]
12364
```@autodocs
12465
Modules = [DistributedFactorGraphs]
12566
Pages = ["FileDFG.jl"]
126-
```
127-
128-
## Data Entries and Blobs
129-
130-
```@autodocs
131-
Modules = [DistributedFactorGraphs]
132-
133-
Pages = ["entities/AbstractDataEntries.jl",
134-
"services/AbstractDataEntries.jl",
135-
"services/BlobStores.jl",
136-
"services/DataEntryBlob.jl",
137-
"services/FileDataEntryBlob.jl",
138-
"services/InMemoryDataEntryBlob.jl"]
139-
140-
```
67+
```

docs/src/imgs/CoreAPI.png

-69.9 KB
Loading

docs/src/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ Pages = [
2424
"DrawingGraphs.md"
2525
"ref_api.md"
2626
"func_ref.md"
27+
"services_ref.md"
28+
"blob_ref.md"
2729
]
2830
```

0 commit comments

Comments
 (0)