Skip to content

Commit b9bf2d1

Browse files
Merge pull request #249 from ArnoStrouwen/doc_improv
various doc and style improvements
2 parents a8a0bdb + 34d8b6c commit b9bf2d1

32 files changed

+764
-637
lines changed

.JuliaFormatter.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
style = "sciml"
2+
format_markdown = true

.github/workflows/FormatCheck.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: format-check
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'release-'
8+
tags: '*'
9+
pull_request:
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
julia-version: [1]
17+
julia-arch: [x86]
18+
os: [ubuntu-latest]
19+
steps:
20+
- uses: julia-actions/setup-julia@latest
21+
with:
22+
version: ${{ matrix.julia-version }}
23+
24+
- uses: actions/checkout@v1
25+
- name: Install JuliaFormatter and format
26+
# This will use the latest version by default but you can set the version like so:
27+
#
28+
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
29+
run: |
30+
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
31+
julia -e 'using JuliaFormatter; format(".", verbose=true)'
32+
- name: Format check
33+
run: |
34+
julia -e '
35+
out = Cmd(`git diff --name-only`) |> read |> String
36+
if out == ""
37+
exit(0)
38+
else
39+
@error "Some files have not been formatted !!!"
40+
write(stdout, out)
41+
exit(1)
42+
end'

LICENSE.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,10 @@ The RecursiveArrayTools.jl package is licensed under the MIT "Expat" License:
1919
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
> SOFTWARE.
22-
>
2322
2423
The chain function is from Iterators.jl and is licensed under the MIT License:
2524

26-
>Copyright (c) 2012-2016: Daniel Jones, Stefan Karpinski, Simon Kornblith, Kevin Squire, Jeff Bezanson, Tim Holy, Jonathan Malmaud, Eric Davies, and other contributors.
25+
> Copyright (c) 2012-2016: Daniel Jones, Stefan Karpinski, Simon Kornblith, Kevin Squire, Jeff Bezanson, Tim Holy, Jonathan Malmaud, Eric Davies, and other contributors.
2726
2827
The above copyright notice and this permission notice shall be included in all
2928
copies or substantial portions of the Software.
30-
31-

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Build Status](https://github.com/SciML/RecursiveArrayTools.jl/workflows/CI/badge.svg)](https://github.com/SciML/RecursiveArrayTools.jl/actions?query=workflow%3ACI)
88
[![build status](https://badge.buildkite.com/9eab94781cf0af9a3566e9b9f16abe5aea167b640b88065285.svg?branch=master)](https://buildkite.com/julialang/recursivearraytools-dot-jl)
99

10-
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
10+
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor%27s%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
1111
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)
1212

1313
RecursiveArrayTools.jl is a set of tools for dealing with recursive arrays like
@@ -31,8 +31,8 @@ vB = VectorOfArray(b)
3131

3232
vA .* vB # Now all standard array stuff works!
3333

34-
a = (rand(5),rand(5))
35-
b = (rand(5),rand(5))
34+
a = (rand(5), rand(5))
35+
b = (rand(5), rand(5))
3636
pA = ArrayPartition(a)
3737
pB = ArrayPartition(b)
3838

docs/make.jl

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
55

66
include("pages.jl")
77

8-
makedocs(
9-
sitename="RecursiveArrayTools.jl",
10-
authors="Chris Rackauckas",
11-
modules=[RecursiveArrayTools],
12-
clean=true,doctest=false,
13-
format = Documenter.HTML(analytics = "UA-90474609-3",
14-
assets = ["assets/favicon.ico"],
15-
canonical="https://docs.sciml.ai/RecursiveArrayTools/stable/"),
16-
pages=pages
17-
)
8+
makedocs(sitename = "RecursiveArrayTools.jl",
9+
authors = "Chris Rackauckas",
10+
modules = [RecursiveArrayTools],
11+
clean = true, doctest = false, linkcheck = true,
12+
strict = [
13+
:doctest,
14+
:linkcheck,
15+
:parse_error,
16+
:example_block,
17+
# Other available options are
18+
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block
19+
],
20+
format = Documenter.HTML(analytics = "UA-90474609-3",
21+
assets = ["assets/favicon.ico"],
22+
canonical = "https://docs.sciml.ai/RecursiveArrayTools/stable/"),
23+
pages = pages)
1824

19-
deploydocs(
20-
repo = "github.com/SciML/RecursiveArrayTools.jl.git";
21-
push_preview = true
22-
)
25+
deploydocs(repo = "github.com/SciML/RecursiveArrayTools.jl.git";
26+
push_preview = true)

docs/pages.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Put in a separate page so it can be used by SciMLDocs.jl
22

3-
pages=[
3+
pages = [
44
"Home" => "index.md",
55
"array_types.md",
6-
"recursive_array_functions.md"
7-
]
6+
"recursive_array_functions.md",
7+
]

docs/src/array_types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ mapping and iteration functions, and more.
1313
VectorOfArray
1414
DiffEqArray
1515
ArrayPartition
16-
```
16+
```

docs/src/index.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RecursiveArrayTools.jl: Arrays of Arrays and Even Deeper
22

3-
RecursiveArrayTools.jl is a set of tools for dealing with recursive arrays like
3+
RecursiveArrayTools.jl is a set of tools for dealing with recursive arrays, like
44
arrays of arrays. It contains type wrappers for making recursive arrays act more
55
like normal arrays (for example, automating the recursion of broadcast, maps,
66
iteration, and more), and utility functions which make it easier to work with
@@ -17,66 +17,87 @@ Pkg.add("RecursiveArrayTools")
1717

1818
## Contributing
1919

20-
- Please refer to the
21-
[SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac/blob/master/README.md)
22-
for guidance on PRs, issues, and other matters relating to contributing to SciML.
23-
- There are a few community forums:
24-
- the #diffeq-bridged channel in the [Julia Slack](https://julialang.org/slack/)
25-
- [JuliaDiffEq](https://gitter.im/JuliaDiffEq/Lobby) on Gitter
26-
- on the [Julia Discourse forums](https://discourse.julialang.org)
27-
- see also [SciML Community page](https://sciml.ai/community/)
20+
- Please refer to the
21+
[SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac/blob/master/README.md)
22+
for guidance on PRs, issues, and other matters relating to contributing to SciML.
23+
24+
- See the [SciML Style Guide](https://github.com/SciML/SciMLStyle) for common coding practices and other style decisions.
25+
- There are a few community forums:
26+
27+
+ The #diffeq-bridged and #sciml-bridged channels in the
28+
[Julia Slack](https://julialang.org/slack/)
29+
+ The #diffeq-bridged and #sciml-bridged channels in the
30+
[Julia Zulip](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged)
31+
+ On the [Julia Discourse forums](https://discourse.julialang.org)
32+
+ See also [SciML Community page](https://sciml.ai/community/)
2833

2934
## Reproducibility
35+
3036
```@raw html
3137
<details><summary>The documentation of this SciML package was built using these direct dependencies,</summary>
3238
```
39+
3340
```@example
3441
using Pkg # hide
3542
Pkg.status() # hide
3643
```
44+
3745
```@raw html
3846
</details>
3947
```
48+
4049
```@raw html
4150
<details><summary>and using this machine and Julia version.</summary>
4251
```
52+
4353
```@example
4454
using InteractiveUtils # hide
4555
versioninfo() # hide
4656
```
57+
4758
```@raw html
4859
</details>
4960
```
61+
5062
```@raw html
5163
<details><summary>A more complete overview of all dependencies and their versions is also provided.</summary>
5264
```
65+
5366
```@example
5467
using Pkg # hide
55-
Pkg.status(;mode = PKGMODE_MANIFEST) # hide
68+
Pkg.status(; mode = PKGMODE_MANIFEST) # hide
5669
```
70+
5771
```@raw html
5872
</details>
5973
```
74+
6075
```@raw html
6176
You can also download the
6277
<a href="
6378
```
79+
6480
```@eval
6581
using TOML
66-
version = TOML.parse(read("../../Project.toml",String))["version"]
67-
name = TOML.parse(read("../../Project.toml",String))["name"]
68-
link = "https://github.com/SciML/"*name*".jl/tree/gh-pages/v"*version*"/assets/Manifest.toml"
82+
version = TOML.parse(read("../../Project.toml", String))["version"]
83+
name = TOML.parse(read("../../Project.toml", String))["name"]
84+
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
85+
"/assets/Manifest.toml"
6986
```
87+
7088
```@raw html
7189
">manifest</a> file and the
7290
<a href="
7391
```
92+
7493
```@eval
7594
using TOML
76-
version = TOML.parse(read("../../Project.toml",String))["version"]
77-
name = TOML.parse(read("../../Project.toml",String))["name"]
78-
link = "https://github.com/SciML/"*name*".jl/tree/gh-pages/v"*version*"/assets/Project.toml"
95+
version = TOML.parse(read("../../Project.toml", String))["version"]
96+
name = TOML.parse(read("../../Project.toml", String))["name"]
97+
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
98+
"/assets/Project.toml"
7999
```
100+
80101
```@raw html
81102
">project</a> file.
82-
```
103+
```

docs/src/recursive_array_functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ recursivecopy
1010
recursivecopy!
1111
vecvecapply
1212
copyat_or_push!
13-
```
13+
```

ext/RecursiveArrayToolsTrackerExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ function RecursiveArrayTools.recursivecopy!(b::AbstractArray{T, N},
1515
end
1616
end
1717

18-
end
18+
end

0 commit comments

Comments
 (0)