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

Run JuliaFormatter.format() #33

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading