Skip to content

Commit

Permalink
Merge pull request #33 from LilithHafner/lh/format
Browse files Browse the repository at this point in the history
Run JuliaFormatter.format()
  • Loading branch information
ChrisRackauckas authored Feb 15, 2024
2 parents 9ecd95b + d2d3d52 commit a8027a7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
[![codecov](https://codecov.io/gh/SciML/CommonSolve.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/SciML/CommonSolve.jl)
[![Build Status](https://github.com/SciML/CommonSolve.jl/workflows/CI/badge.svg)](https://github.com/SciML/CommonSolve.jl/actions?query=workflow%3ACI)

[![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)
[![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)
[![SciML Code Style](https://img.shields.io/static/v1?label=code%20style&message=SciML&color=9558b2&labelColor=389826)](https://github.com/SciML/SciMLStyle)

This holds the common `solve`, `init`, `step!`, and `solve!` commands. By using the same definition,
solver libraries from other completely different ecosystems can extend the functions and thus
not clash with SciML if both ecosystems export the `solve` command. The rules are that
not clash with SciML if both ecosystems export the `solve` command. The rules are that
you must dispatch on one of your own types. That's it. No pirates.

## General recommendation
Expand All @@ -25,14 +25,14 @@ solve(args...; kwargs...) = solve!(init(args...; kwargs...))
So, we recommend defining

```julia
init(::ProblemType, args...; kwargs...) :: SolverType
solve!(::SolverType) :: SolutionType
init(::ProblemType, args...; kwargs...)::SolverType
solve!(::SolverType)::SolutionType
```

where `ProblemType`, `SolverType`, and `SolutionType` are the types defined in
your package.
your package.

In many cases, the `SolverType` is an object that is iteratively progressed to achieve the solution.
In many cases, the `SolverType` is an object that is iteratively progressed to achieve the solution.
In such cases, the `step!` function can be used:

```julia
Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ makedocs(
clean = true, doctest = false, linkcheck = true,
format = Documenter.HTML(
assets = ["assets/favicon.ico"],
canonical = "https://docs.sciml.ai/CommonSolve/stable",
canonical = "https://docs.sciml.ai/CommonSolve/stable"
),
pages = pages,
pages = pages
)

deploydocs(repo = "github.com/SciML/CommonSolve.jl.git"; push_preview = true)
19 changes: 14 additions & 5 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ solve(args...; kwargs...) = solve!(init(args...; kwargs...))
So, we recommend defining

```julia
init(::ProblemType, args...; kwargs...) :: SolverType
solve!(::SolverType) :: SolutionType
init(::ProblemType, args...; kwargs...)::SolverType
solve!(::SolverType)::SolutionType
```

where `ProblemType`, `SolverType`, and `SolutionType` are the types defined in
your package.
your package.

In many cases, the `SolverType` is an object that is iteratively progressed to achieve the solution. In such cases, the `step!` function can be used:


```julia
step!(::SolverType, args...; kwargs...)
```
Expand Down Expand Up @@ -73,36 +72,46 @@ CommonSolve.step!
+ See also [SciML Community page](https://sciml.ai/community/)

## Reproducibility

```@raw html
<details><summary>The documentation of this SciML package was built using these direct dependencies,</summary>
```

```@example
using Pkg # hide
Pkg.status() # hide
```

```@raw html
</details>
```

```@raw html
<details><summary>and using this machine and Julia version.</summary>
```

```@example
using InteractiveUtils # hide
versioninfo() # hide
```

```@raw html
</details>
```

```@raw html
<details><summary>A more complete overview of all dependencies and their versions is also provided.</summary>
```

```@example
using Pkg # hide
Pkg.status(;mode = PKGMODE_MANIFEST) # hide
Pkg.status(; mode = PKGMODE_MANIFEST) # hide
```

```@raw html
</details>
```

```@eval
using TOML
using Markdown
Expand Down
4 changes: 3 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using SafeTestsets

@time @safetestset "Quality Assurance" begin include("qa.jl") end
@time @safetestset "Quality Assurance" begin
include("qa.jl")
end

0 comments on commit a8027a7

Please sign in to comment.