Skip to content

Commit bf645cd

Browse files
authored
Merge branch 'master' into compathelper/new_version/2020-11-18-00-24-50-020-3385823575
2 parents f233dea + f7da732 commit bf645cd

File tree

15 files changed

+105
-103
lines changed

15 files changed

+105
-103
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
name: CompatHelper
2-
32
on:
43
schedule:
5-
- cron: '00 * * * *'
6-
issues:
7-
types: [opened, reopened]
8-
4+
- cron: '00 00 * * *'
5+
workflow_dispatch:
96
jobs:
10-
build:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
julia-version: [1.5.0]
15-
julia-arch: [x86]
16-
os: [ubuntu-latest]
7+
CompatHelper:
8+
runs-on: ubuntu-latest
179
steps:
18-
- uses: julia-actions/setup-julia@latest
19-
with:
20-
version: ${{ matrix.julia-version }}
2110
- name: Pkg.add("CompatHelper")
2211
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
2312
- name: CompatHelper.main()
2413
env:
2514
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
2616
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- 'LICENSE.md'
8+
- 'README.md'
9+
- '.github/workflows/CompatHelper.yml'
10+
- '.github/workflows/TagBot.yml'
11+
tags: '*'
12+
pull_request:
13+
branches:
14+
- master
15+
paths-ignore:
16+
- 'LICENSE.md'
17+
- 'README.md'
18+
- '.github/workflows/CompatHelper.yml'
19+
- '.github/workflows/TagBot.yml'
20+
jobs:
21+
test:
22+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- '1'
29+
os:
30+
- ubuntu-latest
31+
arch:
32+
- x64
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: julia-actions/setup-julia@v1
36+
with:
37+
version: ${{ matrix.version }}
38+
arch: ${{ matrix.arch }}
39+
- uses: actions/cache@v1
40+
env:
41+
cache-name: cache-artifacts
42+
with:
43+
path: ~/.julia/artifacts
44+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
45+
restore-keys: |
46+
${{ runner.os }}-test-${{ env.cache-name }}-
47+
${{ runner.os }}-test-
48+
${{ runner.os }}-
49+
- uses: julia-actions/julia-buildpkg@v1
50+
- uses: julia-actions/julia-runtest@v1
51+
- uses: julia-actions/julia-processcoverage@v1
52+
- uses: codecov/codecov-action@v1
53+
with:
54+
file: lcov.info

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ModelingToolkit"
22
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "4.0.5"
4+
version = "4.0.6"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
@@ -49,7 +49,7 @@ Requires = "1.0"
4949
RuntimeGeneratedFunctions = "0.4"
5050
SafeTestsets = "0.0.1"
5151
SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0"
52-
StaticArrays = "0.10, 0.11, 0.12"
52+
StaticArrays = "0.10, 0.11, 0.12, 1.0"
5353
SymbolicUtils = "0.6"
5454
TreeViews = "0.3"
5555
UnPack = "0.1, 1.0"

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# ModelingToolkit.jl
22

3-
[![Build Status](https://travis-ci.com/SciML/ModelingToolkit.jl.svg?branch=master)](https://travis-ci.com/SciML/ModelingToolkit.jl)
4-
[![Coverage Status](https://coveralls.io/repos/SciML/ModelingToolkit.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/JuliaDiffEq/ModelingToolkit.jl?branch=master)
5-
[![codecov.io](http://codecov.io/github/SciML/ModelingToolkit.jl/coverage.svg?branch=master)](http://codecov.io/github/SciML/ModelingToolkit.jl?branch=master)
3+
[![Github Action CI](https://github.com/SciML/ModelingToolkit.jl/workflows/CI/badge.svg)](https://github.com/SciML/ModelingToolkit.jl/actions)
4+
[![Coverage Status](https://coveralls.io/repos/github/SciML/ModelingToolkit.jl/badge.svg?branch=master)](https://coveralls.io/github/SciML/ModelingToolkit.jl?branch=master)
65
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](http://mtk.sciml.ai/stable/)
76
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](http://mtk.sciml.ai/dev/)
87

appveyor.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/src/tutorials/symbolic_functions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ the user's code. For these cases, ModelingToolkit.jl allows for fully
382382
macro-free usage. For example:
383383

384384
```julia
385-
x = Sym{Float64}(:x)()
386-
y = Sym{Float64}(:y)()
387-
x+y^2.0
385+
x = Num(Sym{Float64}(:x))
386+
y = Num(Sym{Float64}(:y))
387+
x+y^2.0 # isa Num
388388
```
389389

390390
Does what you'd expect. The reference documentation shows how to
@@ -395,7 +395,7 @@ If we need to use this to generate new Julia code, we can simply
395395
convert the output to an `Expr`:
396396

397397
```julia
398-
Expr(x+y^2)
398+
toexpr(x+y^2)
399399
```
400400

401401
## `Sym`s and callable `Sym`s

src/differentials.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function occursin_info(x, expr::Term)
4545
if all(_isfalse, args)
4646
return false
4747
end
48-
Term(true, args)
48+
Term{Real}(true, args)
4949
end
5050
end
5151
function occursin_info(x, expr::Sym)

src/direct.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function toexpr(O::Term)
222222
end
223223
if O.op === (^)
224224
if length(O.args) > 1 && O.args[2] isa Number && O.args[2] < 0
225-
return Expr(:call, :^, Expr(:call, :inv, toexpr(O.args[1])), -(O.args[2].value))
225+
return Expr(:call, ^, Expr(:call, inv, toexpr(O.args[1])), -(O.args[2]))
226226
end
227227
end
228228
return Expr(:call, O.op, toexpr.(O.args)...)

src/register_function.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ macro register(expr, Ts = [Num, Symbolic, Real])
1717
name(x::Expr) = ((@assert x.head == :(::)); :($value($(x.args[1]))))
1818

1919
Expr(:block,
20-
[:($f($(setinds(args, symbolic_args, ts)...)) = Term{Real}($f, [$(map(name, args)...)]))
20+
[quote
21+
function $f($(setinds(args, symbolic_args, ts)...))
22+
wrap = any(x->typeof(x) <: Num, tuple($(setinds(args, symbolic_args, ts)...),)) ? Num : identity
23+
wrap(Term{Real}($f, [$(map(name, args)...)]))
24+
end
25+
end
2126
for ts in types]...) |> esc
2227
end
2328

0 commit comments

Comments
 (0)