Skip to content

Commit 4432591

Browse files
authored
Merge pull request #158 from TuringLang/dev
Merge changes in dev branch into master
2 parents 275ccc8 + cebad20 commit 4432591

29 files changed

+659
-416
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CompatHelper
33
on:
44
schedule:
55
- cron: '00 00 * * *'
6-
6+
workflow_dispatch:
77
jobs:
88
CompatHelper:
99
runs-on: ubuntu-latest
@@ -14,4 +14,4 @@ jobs:
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
17-
run: julia -e 'using CompatHelper; CompatHelper.main(; master_branch = "dev")'
17+
run: julia -e 'using CompatHelper; CompatHelper.main(; master_branch = "dev", subdirs = ["", "test"])'

.github/workflows/DynamicPPL-CI.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ name: DynamicPPL-CI
33
on:
44
push:
55
branches:
6-
- master
7-
- dev
86
# This is where pull requests from "bors r+" are built.
97
- staging
108
# This is where pull requests from "bors try" are built.
119
- trying
12-
# Enable building pull requests.
13-
pull_request:
10+
# Build the master branch.
11+
- master
1412

1513
jobs:
1614
test:
@@ -19,9 +17,9 @@ jobs:
1917
strategy:
2018
matrix:
2119
version:
22-
- '1.0'
20+
- '1.3'
2321
- '1'
24-
- 'nightly'
22+
# - 'nightly'
2523
os:
2624
- ubuntu-latest
2725
- macOS-latest
@@ -30,6 +28,8 @@ jobs:
3028
- x86
3129
- x64
3230
exclude:
31+
- os: windows-latest
32+
arch: x86
3333
- os: macOS-latest
3434
arch: x86
3535
steps:

.github/workflows/TagBot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: TagBot
22
on:
33
schedule:
44
- cron: 0 0 * * *
5+
workflow_dispatch:
56
jobs:
67
TagBot:
78
runs-on: ubuntu-latest

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
*.jl.mem
44
.DS_Store
55
/Manifest.toml
6+
/test/Manifest.toml
67
/dev/
8+
/test/gdemo_default.jls

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22
language: julia
33
branches:
44
only:
5-
# Enable building pull requests to master and dev.
6-
- master
7-
- dev
85
# This is where pull requests from "bors r+" are built.
96
- staging
107
# This is where pull requests from "bors try" are built.
118
- trying
9+
# Build the master branch.
10+
- master
1211
os:
1312
- linux
1413
- osx
1514
matrix:
1615
include:
17-
- julia: 1.0
16+
- julia: 1.3
1817
- julia: 1
1918
env: JULIA_NUM_THREADS=1
2019
- julia: 1
@@ -32,4 +31,5 @@ notifications:
3231
after_success:
3332
- if [[ $TRAVIS_JULIA_VERSION = 1 ]] && [[ $JULIA_NUM_THREADS = 1 ]] && [[ $TRAVIS_OS_NAME = linux ]]; then
3433
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())';
34+
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())';
3535
fi

Project.toml

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,21 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
authors = ["mohamed82008 <[email protected]>"]
4-
version = "0.8.2"
3+
version = "0.9.0"
54

65
[deps]
76
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
87
Bijectors = "76274a88-744f-5084-9051-94815aaf08c4"
98
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
109
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
10+
NaturalSort = "c020b1a1-e9b0-503a-9c33-f039bfc54a85"
1111
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1212
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
1313

1414
[compat]
1515
AbstractMCMC = "1"
1616
Bijectors = "0.5.2, 0.6, 0.7, 0.8"
17-
Distributions = "0.22, 0.23"
17+
Distributions = "0.23.8"
1818
MacroTools = "0.5.1"
19+
NaturalSort = "1"
1920
ZygoteRules = "0.2"
20-
julia = "1"
21-
22-
[extras]
23-
AdvancedHMC = "0bf59076-c3b1-5ca4-86bd-e02cd72cde3d"
24-
AdvancedMH = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170"
25-
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
26-
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
27-
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
28-
EllipticalSliceSampling = "cad2338a-1db2-11e9-3401-43bc07c9ede2"
29-
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
30-
Libtask = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
31-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
32-
LogDensityProblems = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c"
33-
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
34-
MCMCChains = "c7f686f2-ff18-58e9-bc7b-31028e88f75d"
35-
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
36-
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
37-
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
38-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
39-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
40-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
41-
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
42-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
43-
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
44-
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
45-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
46-
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
47-
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
48-
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
49-
50-
[targets]
51-
test = ["AdvancedHMC", "AdvancedMH", "DistributionsAD", "DocStringExtensions", "EllipticalSliceSampling", "ForwardDiff", "Libtask", "LinearAlgebra", "LogDensityProblems", "Logging", "MCMCChains", "Markdown", "PDMats", "ProgressLogging", "Random", "Reexport", "Requires", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test", "Tracker", "UUIDs", "Zygote"]
21+
julia = "1.3"

bors.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ status = [
66
"test (1, ubuntu-latest, x64)",
77
"test (1.%, macOS-latest, x64)",
88
"test (1, macOS-latest, x64)",
9-
"test (1.%, windows-latest, x86)",
10-
"test (1, windows-latest, x86)",
119
"test (1.%, windows-latest, x64)",
1210
"test (1, windows-latest, x64)"
1311
]
1412
delete_merged_branches = true
15-
# Uncomment this to require at least on approval of a project member.
16-
#required_approvals = 1
13+
# Require at least on approval of a project member.
14+
required_approvals = 1
15+
# Squash commits before merging.
16+
use_squash_merge = true
1717
# Uncomment this to use a two hour timeout.
1818
# The default is one hour.
1919
#timeout_sec = 7200

src/DynamicPPL.jl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ module DynamicPPL
33
using AbstractMCMC: AbstractSampler, AbstractChains, AbstractModel
44
using Distributions
55
using Bijectors
6-
using MacroTools
76

87
import AbstractMCMC
8+
import NaturalSort
9+
import MacroTools
910
import ZygoteRules
1011

1112
import Random
@@ -51,25 +52,20 @@ export AbstractVarInfo,
5152
inspace,
5253
subsumes,
5354
# Compiler
54-
ModelGen,
5555
@model,
5656
@varname,
5757
# Utilities
5858
vectorize,
5959
reconstruct,
6060
reconstruct!,
6161
Sample,
62-
Chain,
6362
init,
6463
vectorize,
6564
set_resume!,
6665
# Model
67-
ModelGen,
6866
Model,
6967
getmissings,
7068
getargnames,
71-
getdefaults,
72-
getgenerator,
7369
# Samplers
7470
Sampler,
7571
SampleFromPrior,
@@ -93,14 +89,14 @@ export AbstractVarInfo,
9389
@logprob_str,
9490
# Convenience functions
9591
logprior,
96-
logjoint
92+
logjoint,
93+
# Convenience macros
94+
@addlogprob!
9795

9896
# Reexport
9997
using Distributions: loglikelihood
10098
export loglikelihood
10199

102-
const DEBUG = Bool(parse(Int, get(ENV, "DEBUG_DYNAMICPPL", "0")))
103-
104100
# Used here and overloaded in Turing
105101
function getspace end
106102

0 commit comments

Comments
 (0)