Skip to content

Commit 2e4b2ca

Browse files
authored
Merge pull request #168 from control-toolbox/167-doc-add-warning-message
Add warning message
2 parents f7942eb + 1c93ff4 commit 2e4b2ca

21 files changed

+493
-13
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CTModels"
22
uuid = "34c4fa32-2049-4079-8329-de33c2a22e2d"
33
authors = ["Olivier Cots <olivier.cots@toulouse-inp.fr>"]
4-
version = "0.5.3"
4+
version = "0.5.4"
55

66
[deps]
77
CTBase = "54762871-cc72-4466-b8e8-f6c8b58076cd"

docs/src/constraints.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels, Base]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/control.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/ctmodels.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels, RecipesBase]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/dynamics.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/init.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/jld.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels, CTModelsJLD]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/json.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels, CTModelsJSON]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/model.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

docs/src/objective.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@ Modules = [CTModels]
88
Order = [:module, :constant, :type, :function, :macro]
99
```
1010

11+
!!! warning
12+
13+
In the examples in the documentation below, the methods are not prefixed by the module name even if they are private.
14+
15+
```julia-repl
16+
julia> using CTModels
17+
julia> x = 1
18+
julia> private_fun(x) # throw an error
19+
```
20+
21+
must be replaced by
22+
23+
```julia-repl
24+
julia> using CTModels
25+
julia> x = 1
26+
julia> CTModels.private_fun(x)
27+
```
28+
29+
However, if the method is reexported by another package, then, there is no need of prefixing.
30+
31+
```julia-repl
32+
julia> module OptimalControl
33+
import CTModels: private_fun
34+
export private_fun
35+
end
36+
julia> using OptimalControl
37+
julia> x = 1
38+
julia> private_fun(x)
39+
```
40+
1141
## Documentation
1242

1343
```@autodocs

0 commit comments

Comments
 (0)