Skip to content

Commit

Permalink
update to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed May 31, 2024
2 parents 7bafe13 + e1fcbe8 commit 04b17c5
Show file tree
Hide file tree
Showing 26,308 changed files with 1,184,290 additions and 1,023,884 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2,161 changes: 2,161 additions & 0 deletions .git-blame-ignore-revs

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

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

This is the short version. There's more information on the [wiki](https://github.com/stan-dev/math/wiki/Developer-Doc#contributing).

This is the short version. There's more information on the [documentation site](https://mc-stan.org/math/developer_guide.html).
## Issues

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.
Expand Down Expand Up @@ -31,22 +30,22 @@ Open feature requests should be the ones we want to implement in the Math librar

## Pull Requests

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.
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.

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

1. the contribution maintains the Math library's open-source [license](https://github.com/stan-dev/math/wiki/Developer-Doc#licensing): 3-clause BSD
1. the contribution maintains the Math library's open-source [license](https://github.com/stan-dev/stan/wiki/Stan-Licensing): 3-clause BSD
2. the code base remains stable after merging the pull request; we expect the `develop` branch to always be in a good state
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++.
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.
5. the changes adhere to the Math library's [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality). Consistency really helps.
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.

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.

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.

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


## Discussion
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ If this is a **feature request**, show what you expect to happen if the feature


#### Current Version:
v4.3.2
v4.9.0
6 changes: 2 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Thanks for submitting a pull request! Please remove this text when submitting.

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).
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).

## Summary

Expand All @@ -26,8 +26,6 @@ Replace this text with a short note on what will change if this pull request is

## Checklist

- [ ] Math issue #(issue number)

- [ ] Copyright holder: (fill in copyright holder information)

The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
Expand All @@ -40,7 +38,7 @@ Replace this text with a short note on what will change if this pull request is
- header checks pass, (`make test-headers`)
- dependencies checks pass, (`make test-math-dependencies`)
- docs build, (`make doxygen`)
- code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality) checks (`make cpplint`)
- code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Coding-Style-and-Idioms) checks (`make cpplint`)

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

Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
37 changes: 13 additions & 24 deletions .github/workflows/header_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ on:
- 'README.md'
- 'RELEASE-NOTES.txt'

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
windows:
name: Windows
runs-on: windows-latest

steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: c-cpp.yml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"

- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '2.x'
python-version: '3.x'

- name: Print g++/mingw32-make version and path
run: |
Expand All @@ -40,7 +41,7 @@ jobs:

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs
run: mingw32-make -f make/standalone math-libs -j2

- name: Run header tests
shell: powershell
Expand All @@ -51,13 +52,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: c-cpp.yml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Run header tests
run: |
Expand All @@ -68,13 +63,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: c-cpp.yml
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Run header tests
run: |
Expand Down
168 changes: 97 additions & 71 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows Rtools40
name: Windows Rtools44

on:
pull_request:
Expand All @@ -12,41 +12,35 @@ on:
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
prim-rev:
name: prim and rev tests
runs-on: windows-latest

steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/develop'"

- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '2.x'
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.1.3

- name: Set path for Rtools40
if: runner.os == 'Windows'
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install mingw32-make and check toolchain path
r-version: 'release'
rtools-version: '44'

- name: Set path for Rtools44
if: runner.os == 'Windows'
run: |
pacman -Syu mingw-w64-x86_64-make --noconfirm
g++ --version
Get-Command g++ | Select-Object -ExpandProperty Definition
mingw32-make --version
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
shell: powershell
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs
run: |
make -f make/standalone math-libs -j2
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand All @@ -58,103 +52,135 @@ jobs:
python.exe runTests.py -j2 test/unit/math/prim
python.exe runTests.py -j2 test/unit/math/rev
python.exe runTests.py -j2 test/unit/math/memory
- name: Upload gtest_output xml
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: gtest_outputs_xml
path: '**/*_test.xml'

fwd-non-fun-mix:
name: fwd tests and non-fun mix tests
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '2.x'
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.1.3

- name: Set path for Rtools40
if: runner.os == 'Windows'
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install mingw32-make and check toolchain path
r-version: 'release'
rtools-version: '44'

- name: Set path for Rtools44
if: runner.os == 'Windows'
run: |
pacman -Syu mingw-w64-x86_64-make --noconfirm
g++ --version
Get-Command g++ | Select-Object -ExpandProperty Definition
mingw32-make --version
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
shell: powershell
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs
run: |
make -f make/standalone math-libs -j2
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Disable running fwd/mix tests
shell: powershell
run: echo "CXXFLAGS+= -DSTAN_MATH_TESTS_REV_ONLY" | Out-File -Append -FilePath make/local -Encoding utf8
run: echo "CXXFLAGS+= -DSTAN_MATH_TESTS_REV_ONLY" | Out-File -Append -FilePath make/local -Encoding utf8
- name: Run fwd unit tests and all the mix tests except those in mix/fun
shell: powershell
run: |
python.exe runTests.py test/unit/math/fwd
python.exe runTests.py test/unit/math/mix/core
python.exe runTests.py test/unit/math/mix/functor
python.exe runTests.py test/unit/math/mix/meta
python.exe runTests.py test/unit/math/mix/prob
python.exe runTests.py test/unit/math/mix/*_test.cpp
python.exe runTests.py test/unit/math/fwd -j2
python.exe runTests.py test/unit/math/mix/core -j2
python.exe runTests.py test/unit/math/mix/functor -j2
python.exe runTests.py test/unit/math/mix/meta -j2
python.exe runTests.py test/unit/math/mix/prob -j2
python.exe runTests.py test/unit/math/mix/*_test.cpp -j2
- name: Upload gtest_output xml
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: gtest_outputs_xml
path: '**/*_test.xml'
mix-fun:
name: mix/fun tests

mix-fun-1:
name: mix/fun tests 1
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '2.x'
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.1.3

- name: Set path for Rtools40
if: runner.os == 'Windows'
run: echo "C:/rtools40/usr/bin;C:/rtools40/mingw64/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Install mingw32-make and check toolchain path
r-version: 'release'
rtools-version: '44'

- name: Set path for Rtools44
if: runner.os == 'Windows'
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build Math libs
shell: powershell
run: |
pacman -Syu mingw-w64-x86_64-make --noconfirm
g++ --version
Get-Command g++ | Select-Object -ExpandProperty Definition
mingw32-make --version
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
make -f make/standalone math-libs -j2
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run mix/fun unit tests
shell: powershell
run: |
$MixFunTests = Get-ChildItem -Path test\unit\math\mix\fun\* -Include *.cpp | Resolve-Path -Relative
$NumberTests = $MixFunTests.Length
$HalfNumberTests = [math]::Floor($NumberTests / 2)
python.exe runTests.py $MixFunTests[0..$HalfNumberTests]
- name: Upload gtest_output xml
uses: actions/upload-artifact@v4
if: failure()
with:
name: gtest_outputs_xml
path: '**/*_test.xml'

mix-fun-2:
name: mix/fun tests 2
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
rtools-version: '44'

- name: Set path for Rtools44
if: runner.os == 'Windows'
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs
run: |
Add-Content make\local "O=1`n"
make -f make/standalone math-libs -j2
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run mix/fun unit tests
shell: powershell
run: |
python.exe runTests.py test/unit/math/mix/fun
$MixFunTests = Get-ChildItem -Path test\unit\math\mix\fun\* -Include *.cpp | Resolve-Path -Relative
$NumberTests = $MixFunTests.Length
$HalfNumberTests = [math]::Floor($NumberTests / 2)
python.exe runTests.py $MixFunTests[($HalfNumberTests + 1)..($NumberTests - 1)]
- name: Upload gtest_output xml
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: gtest_outputs_xml
Expand Down
Loading

0 comments on commit 04b17c5

Please sign in to comment.