-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from JuliaSymbolics/ale/makedocs
Add real docs
- Loading branch information
Showing
7 changed files
with
109 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Docs | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
tags: "*" | ||
jobs: | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/julia-buildpkg@latest | ||
- uses: julia-actions/julia-docdeploy@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "TermInterface" | ||
uuid = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" | ||
authors = ["Shashi Gowda <[email protected]>", "Alessandro Cheli <[email protected]>"] | ||
version = "1.0.0" | ||
version = "1.0.1" | ||
|
||
[compat] | ||
julia = "1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env julia | ||
|
||
# Root of the repository | ||
const repo_root = dirname(@__DIR__) | ||
|
||
# Make sure docs environment is active | ||
import Pkg | ||
Pkg.activate(@__DIR__) | ||
using TermInterface | ||
|
||
# Communicate with docs/make.jl that we are running in live mode | ||
push!(ARGS, "liveserver") | ||
|
||
# Run LiveServer.servedocs(...) | ||
import LiveServer | ||
LiveServer.servedocs(; | ||
# Documentation root where make.jl and src/ are located | ||
foldername=joinpath(repo_root, "docs"), | ||
skip_dirs=[ | ||
# exclude assets folder because it is modified by docs/make.jl | ||
joinpath(repo_root, "docs", "src", "assets"), | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Documenter | ||
using TermInterface | ||
|
||
const TERMINTERFACE_PATH = dirname(pathof(TermInterface)) | ||
|
||
|
||
makedocs( | ||
modules=[TermInterface], | ||
sitename="TermInterface.jl", | ||
pages=[ | ||
"index.md" | ||
# "api.md" | ||
], | ||
checkdocs=:all, | ||
) | ||
|
||
deploydocs(repo="github.com/JuliaSymbolics/TermInterface.jl.git") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# TermInterface.jl Documentation | ||
|
||
This package contains definitions for common functions that are useful for symbolic expression manipulation. | ||
Its purpose is to provide a shared interface between various symbolic programming Julia packages, for example | ||
[SymbolicUtils.jl](https://github.com/JuliaSymbolics/SymbolicUtils.jl), [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl) and [Metatheory.jl](https://github.com/0x0f0f0f/Metatheory.jl). | ||
|
||
You should define the following methods for your expression tree type to work | ||
with TermInterface.jl, and therefore with [SymbolicUtils.jl](https://github.com/JuliaSymbolics/SymbolicUtils.jl) | ||
and [Metatheory.jl](https://github.com/0x0f0f0f/Metatheory.jl). | ||
|
||
## Examples | ||
|
||
### Function call Julia Expressions | ||
|
||
```julia | ||
ex = :(f(a, b)) | ||
@test head(ex) == :call | ||
@test children(ex) == [:f, :a, :b] | ||
@test operation(ex) == :f | ||
@test arguments(ex) == [:a, :b] | ||
@test isexpr(ex) | ||
@test iscall(ex) | ||
@test ex == maketerm(Expr, :call, [:f, :a, :b], nothing) | ||
``` | ||
|
||
|
||
### Non-function call Julia Expressions | ||
|
||
```julia | ||
ex = :(arr[i, j]) | ||
@test head(ex) == :ref | ||
@test_throws ErrorException operation(ex) | ||
@test_throws ErrorException arguments(ex) | ||
@test isexpr(ex) | ||
@test !iscall(ex) | ||
@test ex == maketerm(Expr, :ref, [:arr, :i, :j], nothing) | ||
``` | ||
|
||
## API Docs | ||
|
||
```@autodocs | ||
Modules = [TermInterface] | ||
``` | ||
|