Skip to content

Commit 5d836a5

Browse files
committed
Merge branch 'master' into lvalue-indexing-bug
2 parents 4bd90b2 + 7e7382d commit 5d836a5

File tree

1,042 files changed

+300656
-262336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,042 files changed

+300656
-262336
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: File a bug/issue
4+
title: '[BUG] <title>'
5+
labels: ''
6+
assignees: ''
7+
---
8+
<!-- Thank you for submitting a bug report! -->
9+
10+
### Current Behavior:
11+
<!-- A concise description of what you're experiencing. -->
12+
13+
### Expected Behavior:
14+
<!-- A concise description of what you expected to happen. -->
15+
16+
### Model Code
17+
<!-- If a specific model is causing this issue, it really helps if you can share it -->
18+
<details><summary>Model which exhibits the issue</summary>
19+
20+
```stan
21+
// Please put your code here
22+
23+
```
24+
</details>
25+
26+
### Environment:
27+
<!--
28+
Example:
29+
- OS: Ubuntu 20.04
30+
- stanc: 2.28.0
31+
- cmdstan/rstan/other Stanversions
32+
-->
33+
34+
### Anything else:
35+
<!--
36+
Links? References? Anything that will give us more context about the issue that you are encountering!
37+
-->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question about using Stan, modeling, etc
4+
url: https://discourse.mc-stan.org/
5+
about: |
6+
Ask questions and discuss with other community members here.
7+
If your question involves a specific model, including it will
8+
improve the quality of help the community can provide.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest a new feature for the language or compiler
4+
title: ''
5+
labels: 'feature'
6+
assignees: ''
7+
---
8+
9+
<!-- Please do a quick search of existing issues to make sure that this has not been suggested before.
10+
Thank you for helping us improve Stan!
11+
-->
12+
13+
**Is your feature request related to a problem? Please describe.**
14+
<!-- A description of what the problem is. e.g., "I'm always frustrated when [...]" -->
15+
16+
**Describe the solution you'd like**
17+
<!-- A description of what you're proposing, e.g., "The auto-formatter should allow users to set a line length" -->
18+
19+
**Describe alternatives you've considered**
20+
<!-- A description of any alternative solutions to this problem or features you've considered. -->
21+
22+
**Additional context**
23+
<!-- Add any other context about the feature request here. -->

.github/ISSUE_TEMPLATE/todo.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: TODO Item
3+
about: (For existing developers) Open a generic issue related to the build process or something that needs to be worked on.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+

Jenkinsfile

Lines changed: 66 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ def utils = new org.stan.Utils()
66
def skipExpressionTests = false
77
def skipRemainingStages = false
88
def skipCompileTests = false
9+
def skipRebuildingBinaries = false
910
def buildingAgentARM = "linux"
1011

1112
/* Functions that runs a sh command and returns the stdout */
@@ -27,7 +28,13 @@ def tagName() {
2728
pipeline {
2829
agent none
2930
parameters {
30-
booleanParam(name:"compile_all", defaultValue: false, description:"Try compiling all models in test/integration/good")
31+
booleanParam(name:"skip_end_to_end", defaultValue: false, description:"Skip end-to-end tests ")
32+
string(defaultValue: 'develop', name: 'cmdstan_pr',
33+
description: "CmdStan PR to test against. Will check out this PR in the downstream Stan repo.")
34+
string(defaultValue: 'develop', name: 'stan_pr',
35+
description: "Stan PR to test against. Will check out this PR in the downstream Stan repo.")
36+
string(defaultValue: 'develop', name: 'math_pr',
37+
description: "Math PR to test against. Will check out this PR in the downstream Math repo.")
3138
}
3239
options {parallelsAlwaysFailFast()}
3340
stages {
@@ -46,15 +53,18 @@ pipeline {
4653
retry(3) { checkout scm }
4754
sh 'git clean -xffd'
4855

49-
def stanMathSigs = ['test/integration/signatures/stan_math_sigs.expected'].join(" ")
56+
def stanMathSigs = ['test/integration/signatures/stan_math_signatures.t'].join(" ")
5057
skipExpressionTests = utils.verifyChanges(stanMathSigs)
5158

52-
def sourceCodePaths = ['src'].join(" ")
53-
skipRemainingStages = utils.verifyChanges(sourceCodePaths)
59+
def runTestPaths = ['src', 'test/integration/good', 'test/stancjs'].join(" ")
60+
skipRemainingStages = utils.verifyChanges(runTestPaths)
5461

5562
def compileTests = ['test/integration/good'].join(" ")
5663
skipCompileTests = utils.verifyChanges(compileTests)
5764

65+
def sourceCodePaths = ['src'].join(" ")
66+
skipRebuildingBinaries = utils.verifyChanges(sourceCodePaths)
67+
5868
if (buildingTag()) {
5969
buildingAgentARM = "arm-ec2"
6070
}
@@ -180,6 +190,11 @@ pipeline {
180190

181191
writeFile(file:"performance-tests-cmdstan/cmdstan/make/local",
182192
text:"O=0\nCXX=${CXX}")
193+
194+
utils.checkout_pr("cmdstan", "performance-tests-cmdstan/cmdstan", params.cmdstan_pr)
195+
utils.checkout_pr("stan", "performance-tests-cmdstan/cmdstan/stan", params.stan_pr)
196+
utils.checkout_pr("math", "performance-tests-cmdstan/cmdstan/stan/lib/stan_math", params.math_pr)
197+
183198
sh """
184199
cd performance-tests-cmdstan
185200
mkdir cmdstan/bin
@@ -203,29 +218,39 @@ pipeline {
203218
stage("Model end-to-end tests") {
204219
when {
205220
beforeAgent true
206-
expression {
221+
allOf {
222+
expression {
207223
!skipCompileTests
224+
}
225+
expression {
226+
!params.skip_end_to_end
227+
}
208228
}
209229
}
210230
agent { label 'linux' }
211231
steps {
212-
unstash 'ubuntu-exe'
213-
sh """
214-
git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan
215-
"""
216-
sh """
217-
cd performance-tests-cmdstan
218-
git show HEAD --stat
219-
echo "example-models/regression_tests/mother.stan" > all.tests
220-
cat known_good_perf_all.tests >> all.tests
221-
echo "" >> all.tests
222-
cat shotgun_perf_all.tests >> all.tests
223-
cat all.tests
224-
echo "CXXFLAGS+=-march=core2" > cmdstan/make/local
225-
echo "PRECOMPILED_HEADERS=false" >> cmdstan/make/local
226-
cd cmdstan; make clean-all; git show HEAD --stat; cd ..
227-
CXX="${CXX}" ./compare-compilers.sh "--tests-file all.tests --num-samples=10" "\$(readlink -f ../bin/stanc)"
228-
"""
232+
script {
233+
unstash 'ubuntu-exe'
234+
sh """
235+
git clone --recursive --depth 50 https://github.com/stan-dev/performance-tests-cmdstan
236+
"""
237+
utils.checkout_pr("cmdstan", "performance-tests-cmdstan/cmdstan", params.cmdstan_pr)
238+
utils.checkout_pr("stan", "performance-tests-cmdstan/cmdstan/stan", params.stan_pr)
239+
utils.checkout_pr("math", "performance-tests-cmdstan/cmdstan/stan/lib/stan_math", params.math_pr)
240+
sh """
241+
cd performance-tests-cmdstan
242+
git show HEAD --stat
243+
echo "example-models/regression_tests/mother.stan" > all.tests
244+
cat known_good_perf_all.tests >> all.tests
245+
echo "" >> all.tests
246+
cat shotgun_perf_all.tests >> all.tests
247+
cat all.tests
248+
echo "CXXFLAGS+=-march=core2" > cmdstan/make/local
249+
echo "PRECOMPILED_HEADERS=false" >> cmdstan/make/local
250+
cd cmdstan; make clean-all; git show HEAD --stat; cd ..
251+
CXX="${CXX}" ./compare-compilers.sh "--tests-file all.tests --num-samples=10" "\$(readlink -f ../bin/stanc)"
252+
"""
253+
}
229254

230255
xunit([GoogleTest(
231256
deleteOutputFiles: false,
@@ -258,12 +283,15 @@ pipeline {
258283

259284
unstash 'ubuntu-exe'
260285

261-
sh """
262-
git clone --recursive https://github.com/stan-dev/math.git
263-
cp bin/stanc math/test/expressions/stanc
264-
"""
265-
266286
script {
287+
sh """
288+
git clone --recursive https://github.com/stan-dev/math.git
289+
"""
290+
utils.checkout_pr("math", "math", params.math_pr)
291+
sh """
292+
cp bin/stanc math/test/expressions/stanc
293+
"""
294+
267295
dir("math") {
268296
sh """
269297
echo O=0 >> make/local
@@ -287,7 +315,7 @@ pipeline {
287315
when {
288316
beforeAgent true
289317
expression {
290-
!skipRemainingStages
318+
!skipRebuildingBinaries
291319
}
292320
}
293321
agent { label "osx && ocaml" }
@@ -311,7 +339,7 @@ pipeline {
311339
when {
312340
beforeAgent true
313341
expression {
314-
!skipRemainingStages
342+
!skipRebuildingBinaries
315343
}
316344
}
317345
agent {
@@ -338,7 +366,7 @@ pipeline {
338366
when {
339367
beforeAgent true
340368
expression {
341-
!skipRemainingStages
369+
!skipRebuildingBinaries
342370
}
343371
}
344372
agent {
@@ -366,7 +394,7 @@ pipeline {
366394
when {
367395
beforeAgent true
368396
allOf {
369-
expression { !skipRemainingStages }
397+
expression { !skipRebuildingBinaries }
370398
anyOf { buildingTag(); branch 'master' }
371399
}
372400
}
@@ -396,7 +424,7 @@ pipeline {
396424
when {
397425
beforeAgent true
398426
allOf {
399-
expression { !skipRemainingStages }
427+
expression { !skipRebuildingBinaries }
400428
anyOf { buildingTag(); branch 'master' }
401429
}
402430
}
@@ -426,7 +454,7 @@ pipeline {
426454
when {
427455
beforeAgent true
428456
allOf {
429-
expression { !skipRemainingStages }
457+
expression { !skipRebuildingBinaries }
430458
anyOf { buildingTag(); branch 'master' }
431459
}
432460
}
@@ -456,7 +484,7 @@ pipeline {
456484
when {
457485
beforeAgent true
458486
allOf {
459-
expression { !skipRemainingStages }
487+
expression { !skipRebuildingBinaries }
460488
anyOf { buildingTag(); branch 'master' }
461489
}
462490
}
@@ -487,7 +515,7 @@ pipeline {
487515
when {
488516
beforeAgent true
489517
allOf {
490-
expression { !skipRemainingStages }
518+
expression { !skipRebuildingBinaries }
491519
anyOf { buildingTag(); branch 'master' }
492520
}
493521
}
@@ -518,7 +546,7 @@ pipeline {
518546
when {
519547
beforeAgent true
520548
allOf {
521-
expression { !skipRemainingStages }
549+
expression { !skipRebuildingBinaries }
522550
anyOf { buildingTag(); branch 'master' }
523551
}
524552
}
@@ -550,7 +578,7 @@ pipeline {
550578
when {
551579
beforeAgent true
552580
expression {
553-
!skipRemainingStages
581+
!skipRebuildingBinaries
554582
}
555583
}
556584
agent {
@@ -583,6 +611,7 @@ pipeline {
583611
beforeAgent true
584612
allOf {
585613
expression { !skipRemainingStages }
614+
expression { !skipRebuildingBinaries }
586615
anyOf { buildingTag(); branch 'master' }
587616
}
588617
}

docs/getting_started.mld

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ installed via apt, homebrew, or your system's package manager.
1414
{- Download the repository (or your fork of it) from Github}
1515
{- Install the necessary {!page-dependencies} by running
1616

17-
[bash -x scripts/setup_dev_env.sh].
17+
[cd scripts; bash -x ./setup_dev_env.sh].
1818

1919
If you already have opam installed, you can instead run
2020

21-
[opam install --deps-only --with-test .]
21+
[opam update; opam install --deps-only --with-test .]
2222

2323
If you wish to {e install} stanc on your system, you can run the above
2424
[opam] command without [--deps-only].}
@@ -156,5 +156,3 @@ If you use {{:https://github.com/jwiegley/use-package}[use-package.el]}, this sn
156156
(define-key tuareg-mode-map (kbd "C-M-<tab>") #'ocamlformat)
157157
(add-hook 'before-save-hook #'ocamlformat-before-save)))
158158
]}
159-
160-

dune-project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
(lang dune 2.5)
1+
(lang dune 2.8)
22
(using menhir 1.1)
33
(name stanc)
4+
(cram enable)
45
(generate_opam_files true)
56
(package
67
(name stanc)
78
(synopsis "The Stan compiler and utilities")
89
(depends
910
(ocaml (= 4.12.0))
10-
(dune (>= 2.8))
1111
(core_kernel (= v0.14.2))
1212
(menhir (= 20210929))
1313
(ppx_deriving (= 5.2.1))

0 commit comments

Comments
 (0)