Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doctests and update docs #288

Merged
merged 13 commits into from
Dec 22, 2024
8 changes: 4 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ComponentArrays.jl NEWS
Notes on new features (minor releases). For more details on bugfixes and non-feature-adding changes (patch releases), check out the [releases page](https://github.com/jonniedie/ComponentArrays.jl/releases).
Notes on new features (minor releases). For more details on bugfixes and non-feature-adding changes (patch releases), check out the [releases page](https://github.com/SciML/ComponentArrays.jl/releases).

### v0.15.0
- Unpack array components as `StaticArray`s!
Expand Down Expand Up @@ -27,7 +27,7 @@ ComponentVector{Float64,SubArray...}(e = 2.0, f = [6.0, 30.0])

### v0.12.0
- Multiple symbol indexing!
- Use either an `Array` or `Tuple` of `Symbol`s to extract multiple named components into a new `ComponentArray
- Use either an `Array` or `Tuple` of `Symbol`s to extract multiple named components into a new `ComponentArray`
- It's fast!
```julia
julia> ca = ComponentArray(a=5, b=[4, 1], c=(a=2, b=[6, 30.0]))
Expand Down Expand Up @@ -118,7 +118,7 @@ julia> @btime sum(x.a + x.b for x in $ca.c.a);
- Easier DifferentialEquations plotting!
- Automatic legend labeling!
- `Symbol` and `String` support for the `vars` plot keyword!
- See it in an action [here](https://github.com/jonniedie/ComponentArrays.jl/blob/master/docs/src/examples/adaptive_control.md)!
- See it in an action [here](https://github.com/SciML/ComponentArrays.jl/blob/main/docs/src/examples/adaptive_control.md)!

### v0.5.0
- Constructor for making new `ComponentVector`s with additional fields! Watch out, it's slow!
Expand All @@ -131,7 +131,7 @@ ComponentVector{Int64}(a = 5, b = [1, 2], c = [0 0; 0 0], d = (a = 2, b = 10))
```

### v0.4.0
- Zygote rules for DiffEqFlux support! Check out [the docs](https://jonniedie.github.io/ComponentArrays.jl/dev/examples/DiffEqFlux/) for an example!
- Zygote rules for DiffEqFlux support! Check out [the docs](https://sciml.github.io/ComponentArrays.jl/dev/examples/DiffEqFlux/) for an example!

### v0.3.0
- Matrix and higher-dimensional array components!
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ComponentArrays.jl
![](assets/logo.png)

| **Documentation** | **Build Status** |
|:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
| **Documentation** | **Build Status** |
|:-------------------------------------------------------------------------:|:-----------------------------------------------------------:|
| [![][docs-stable-img]][docs-stable-url] [![][docs-dev-img]][docs-dev-url] | [![][build-img]][build-url] [![][codecov-img]][codecov-url] |


Expand All @@ -12,11 +12,11 @@
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://sciml.github.io/ComponentArrays.jl/stable

[build-img]: https://img.shields.io/github/actions/workflow/status/jonniedie/ComponentArrays.jl/ci.yml
[build-url]: https://github.com/jonniedie/docs/ComponentArrays.jl/workflows/ci.yml
[build-img]: https://img.shields.io/github/actions/workflow/status/SciML/ComponentArrays.jl/ci.yml
[build-url]: https://github.com/SciML/ComponentArrays.jl/actions/workflows/ci.yml

[codecov-img]: https://img.shields.io/codecov/c/github/jonniedie/ComponentArrays.jl
[codecov-url]: https://codecov.io/gh/jonniedie/ComponentArrays.jl
[codecov-img]: https://img.shields.io/codecov/c/github/SciML/ComponentArrays.jl
[codecov-url]: https://codecov.io/gh/SciML/ComponentArrays.jl

The main export of this package is the ````ComponentArray```` type. "Components" of ````ComponentArray````s
are really just array blocks that can be accessed through a named index. This will create a new ```ComponentArray``` whose data is a view into the original,
Expand All @@ -27,7 +27,7 @@ in [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl)
[Optim.jl](https://github.com/JuliaNLSolvers/Optim.jl), but anything that requires
flat vectors is fair game.

Check out the [NEWS](https://github.com/jonniedie/ComponentArrays.jl/blob/master/NEWS.md) for new features by minor release version.
Check out the [NEWS](https://github.com/SciML/ComponentArrays.jl/blob/master/NEWS.md) for new features by minor release version.


## General use
Expand All @@ -45,7 +45,7 @@ julia> x[8]
400.0

julia> collect(x)
10-element Array{Float64,1}:
10-element Vector{Float64}:
5.0
20.0
0.0
Expand Down
Loading
Loading