Skip to content

Commit ccde5d5

Browse files
authored
Merge branch 'stan-dev:develop' into issue-2783-bernoulli-cdf-stable
2 parents 136fc9c + 224e581 commit ccde5d5

120 files changed

Lines changed: 3442 additions & 2117 deletions

File tree

Some content is hidden

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

.github/CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
Thanks for reading! We love contributions from everyone in the form of good discussion, issues, and pull requests.
44

5-
This is the short version. There's more information on the [wiki](https://github.com/stan-dev/math/wiki/Developer-Doc#contributing).
6-
5+
This is the short version. There's more information on the [documentation site](https://mc-stan.org/math/developer_guide.html).
76
## Issues
87

98
We reserve [issues](https://github.com/stan-dev/math/issues) for bugs and feature requests that are defined well enough for a developer to tackle. If you have general questions about the Math library, please see the [Discussion](#discussion) section.
@@ -31,22 +30,22 @@ Open feature requests should be the ones we want to implement in the Math librar
3130

3231
## Pull Requests
3332

34-
All changes to the Math library are handled through [pull requests](https://github.com/stan-dev/math/pulls). Each pull request should correspond to an issue. We follow a [modified GitFlow branching model](https://github.com/stan-dev/stan/wiki/Dev:-Git-Process) for development.
33+
All changes to the Math library are handled through [pull requests](https://github.com/stan-dev/math/pulls). Each pull request should correspond to an issue. We follow a [modified GitFlow branching model](https://github.com/stan-dev/stan/wiki/Developer-process-overview#2-create-a-branch-for-the-issue) for development.
3534

3635
When a contributor creates a pull request for inclusion to the Math library, here are some of the things we expect:
3736

38-
1. the contribution maintains the Math library's open-source [license](https://github.com/stan-dev/math/wiki/Developer-Doc#licensing): 3-clause BSD
37+
1. the contribution maintains the Math library's open-source [license](https://github.com/stan-dev/stan/wiki/Stan-Licensing): 3-clause BSD
3938
2. the code base remains stable after merging the pull request; we expect the `develop` branch to always be in a good state
4039
3. the changes are maintainable. In code review, we look at the design of the proposed code. We also expect documentation. It should look like idiomatic C++.
4140
4. the changes are tested. For bugs, we expect at least one test that fails before the patch and is fixed after the patch. For new features, we expect at least one test that shows expected behavior and one test that shows the behavior when there's an error.
42-
5. the changes adhere to the Math library's [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality). Consistency really helps.
41+
5. the changes adhere to the Math library's [C++ standards](https://github.com/stan-dev/stan/wiki/Coding-Style-and-Idioms). Consistency really helps.
4342

4443
Pull requests are code reviewed after they pass our continuous integration tests. We expect all the above before a pull request is merged. We are an open-source project and once code makes it into the repository, it's on the community to maintain.
4544

4645
It is the responsibility of the contributor submitting the pull request that the code meets these requirements. We're open-source. Once the code gets into the code base, the community of developers take ownership of it.
4746

4847
### Code Reviews
49-
See the [Code Review Guidelines](https://github.com/stan-dev/math/wiki/Developer-Doc#code-review-guidelines) on the Math wiki.
48+
See the [Code Review Guidelines](https://github.com/stan-dev/stan/wiki/Developer-process-overview#code-review-guidelines) on the Math wiki.
5049

5150

5251
## Discussion

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Thanks for submitting a pull request! Please remove this text when submitting.
22

3-
Start by filling in the Summary, Tests, and Side Effects sections of this pull request and then work through the handy checklist at the bottom. If anything significant is missing, the pull request may be closed until it's ready. The full guidebook on how pull requests are reviewed is here: [Code Review Guidelines](https://github.com/stan-dev/math/wiki/Developer-Doc#code-review-guidelines).
3+
Start by filling in the Summary, Tests, and Side Effects sections of this pull request and then work through the handy checklist at the bottom. If anything significant is missing, the pull request may be closed until it's ready. The full guidebook on how pull requests are reviewed is here: [Code Review Guidelines](https://github.com/stan-dev/stan/wiki/Developer-process-overview#code-review-guidelines).
44

55
## Summary
66

@@ -40,7 +40,7 @@ Replace this text with a short note on what will change if this pull request is
4040
- header checks pass, (`make test-headers`)
4141
- dependencies checks pass, (`make test-math-dependencies`)
4242
- docs build, (`make doxygen`)
43-
- code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality) checks (`make cpplint`)
43+
- code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Coding-Style-and-Idioms) checks (`make cpplint`)
4444

4545
- [ ] the code is written in idiomatic C++ and changes are documented in the doxygen
4646

.github/workflows/header_checks.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@ on:
1313
- 'README.md'
1414
- 'RELEASE-NOTES.txt'
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
windows:
21+
permissions:
22+
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
23+
contents: read # for actions/checkout to fetch code
1824
name: Windows
1925
runs-on: windows-latest
2026

@@ -28,7 +34,7 @@ jobs:
2834
- uses: actions/checkout@v3
2935
- uses: actions/setup-python@v4
3036
with:
31-
python-version: '2.x'
37+
python-version: '3.x'
3238

3339
- name: Print g++/mingw32-make version and path
3440
run: |
@@ -40,13 +46,16 @@ jobs:
4046

4147
- name: Build Math libs
4248
shell: powershell
43-
run: mingw32-make -f make/standalone math-libs
49+
run: mingw32-make -f make/standalone math-libs -j2
4450

4551
- name: Run header tests
4652
shell: powershell
4753
run: make -j2 test-headers
4854

4955
opencl:
56+
permissions:
57+
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
58+
contents: read # for actions/checkout to fetch code
5059
name: OpenCL
5160
runs-on: ubuntu-latest
5261

@@ -64,6 +73,9 @@ jobs:
6473
echo "STAN_OPENCL=true" > make/local
6574
make -j2 test-headers
6675
no_range_checks:
76+
permissions:
77+
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
78+
contents: read # for actions/checkout to fetch code
6779
name: NoRange
6880
runs-on: ubuntu-latest
6981

.github/workflows/main.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ on:
1212
- 'LICENSE.md'
1313
- 'README.md'
1414
- 'RELEASE-NOTES.txt'
15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
prim-rev:
20+
permissions:
21+
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
22+
contents: read # for actions/checkout to fetch code
1723
name: prim and rev tests
1824
runs-on: windows-latest
1925

@@ -26,7 +32,7 @@ jobs:
2632
- uses: actions/checkout@v3
2733
- uses: actions/setup-python@v4
2834
with:
29-
python-version: '2.x'
35+
python-version: '3.x'
3036
- uses: r-lib/actions/setup-r@v2
3137
with:
3238
r-version: 4.1.3
@@ -46,7 +52,9 @@ jobs:
4652

4753
- name: Build Math libs
4854
shell: powershell
49-
run: mingw32-make -f make/standalone math-libs
55+
run: |
56+
Add-Content make\local "O=1`n"
57+
mingw32-make -f make/standalone math-libs -j2
5058
- name: Add TBB to PATH
5159
shell: powershell
5260
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -73,7 +81,7 @@ jobs:
7381
- uses: actions/checkout@v3
7482
- uses: actions/setup-python@v4
7583
with:
76-
python-version: '2.x'
84+
python-version: '3.x'
7785
- uses: r-lib/actions/setup-r@v2
7886
with:
7987
r-version: 4.1.3
@@ -93,7 +101,9 @@ jobs:
93101

94102
- name: Build Math libs
95103
shell: powershell
96-
run: mingw32-make -f make/standalone math-libs
104+
run: |
105+
Add-Content make\local "O=1`n"
106+
mingw32-make -f make/standalone math-libs -j2
97107
- name: Add TBB to PATH
98108
shell: powershell
99109
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -103,12 +113,12 @@ jobs:
103113
- name: Run fwd unit tests and all the mix tests except those in mix/fun
104114
shell: powershell
105115
run: |
106-
python.exe runTests.py test/unit/math/fwd
107-
python.exe runTests.py test/unit/math/mix/core
108-
python.exe runTests.py test/unit/math/mix/functor
109-
python.exe runTests.py test/unit/math/mix/meta
110-
python.exe runTests.py test/unit/math/mix/prob
111-
python.exe runTests.py test/unit/math/mix/*_test.cpp
116+
python.exe runTests.py test/unit/math/fwd -j2
117+
python.exe runTests.py test/unit/math/mix/core -j2
118+
python.exe runTests.py test/unit/math/mix/functor -j2
119+
python.exe runTests.py test/unit/math/mix/meta -j2
120+
python.exe runTests.py test/unit/math/mix/prob -j2
121+
python.exe runTests.py test/unit/math/mix/*_test.cpp -j2
112122
113123
- name: Upload gtest_output xml
114124
uses: actions/upload-artifact@v3
@@ -124,7 +134,7 @@ jobs:
124134
- uses: actions/checkout@v3
125135
- uses: actions/setup-python@v4
126136
with:
127-
python-version: '2.x'
137+
python-version: '3.x'
128138
- uses: r-lib/actions/setup-r@v2
129139
with:
130140
r-version: 4.1.3
@@ -144,7 +154,9 @@ jobs:
144154

145155
- name: Build Math libs
146156
shell: powershell
147-
run: mingw32-make -f make/standalone math-libs
157+
run: |
158+
Add-Content make\local "O=1`n"
159+
mingw32-make -f make/standalone math-libs -j2
148160
- name: Add TBB to PATH
149161
shell: powershell
150162
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
@@ -170,7 +182,7 @@ jobs:
170182
- uses: actions/checkout@v3
171183
- uses: actions/setup-python@v4
172184
with:
173-
python-version: '2.x'
185+
python-version: '3.x'
174186
- uses: r-lib/actions/setup-r@v2
175187
with:
176188
r-version: 4.1.3
@@ -190,7 +202,9 @@ jobs:
190202

191203
- name: Build Math libs
192204
shell: powershell
193-
run: mingw32-make -f make/standalone math-libs
205+
run: |
206+
Add-Content make\local "O=1`n"
207+
mingw32-make -f make/standalone math-libs -j2
194208
- name: Add TBB to PATH
195209
shell: powershell
196210
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

0 commit comments

Comments
 (0)