-
Notifications
You must be signed in to change notification settings - Fork 35
JET + Mooncake fixes for 1.12 #921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
5cab7dd
32f9054
57bd111
fa479f3
16ca002
7363432
e0ec601
6974ab2
3b1a6bc
f9d16c7
cac8f9c
027ccdc
af76f81
86be8b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# We want to only run doctests on a single version of Julia, because | ||
# things like error messages / output can change between versions and | ||
# is fragile to test against. | ||
name: Doctests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
merge_group: | ||
types: [checks_requested] | ||
|
||
# needed to allow julia-actions/cache to delete old caches that it has created | ||
permissions: | ||
actions: write | ||
contents: read | ||
|
||
# Cancel existing tests on the same PR if a new commit is added to a pull request | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: '1' | ||
|
||
- uses: julia-actions/cache@v2 | ||
|
||
- uses: julia-actions/julia-buildpkg@v1 | ||
|
||
- name: Run doctests | ||
shell: julia --color=yes --depwarn=yes --project=docs {0} | ||
run: | | ||
# Develop currently checked out version of DynamicPPL | ||
using Pkg | ||
Pkg.develop(path=pwd()) | ||
Pkg.instantiate() | ||
|
||
using Documenter, DynamicPPL, Distributions | ||
|
||
DocMeta.setdocmeta!( | ||
DynamicPPL, | ||
:DocTestSetup, | ||
:(using DynamicPPL, Distributions); | ||
recursive=true, | ||
) | ||
doctestfilters = [ | ||
# Ignore the source of a warning in the doctest output, since this is dependent on host. | ||
# This is a line that starts with "└ @ " and ends with the line number. | ||
r"└ @ .+:[0-9]+", | ||
] | ||
|
||
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ using Bijectors | |
using DifferentiationInterface | ||
using Distributions | ||
using DistributionsAD | ||
using Documenter | ||
using ForwardDiff | ||
using LogDensityProblems | ||
using MacroTools | ||
|
@@ -97,22 +96,5 @@ include("test_util.jl") | |
@test_throws ErrorException prob"..." | ||
@test_throws ErrorException logprob"..." | ||
end | ||
if !IS_PRERELEASE | ||
# Don't run doctests on prerelease as error messages etc. may vary | ||
@testset "doctests" begin | ||
DocMeta.setdocmeta!( | ||
DynamicPPL, | ||
:DocTestSetup, | ||
:(using DynamicPPL, Distributions); | ||
recursive=true, | ||
) | ||
doctestfilters = [ | ||
# Ignore the source of a warning in the doctest output, since this is dependent on host. | ||
# This is a line that starts with "└ @ " and ends with the line number. | ||
r"└ @ .+:[0-9]+", | ||
] | ||
doctest(DynamicPPL; manual=false, doctestfilters=doctestfilters) | ||
end | ||
end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we keep this but have it outside of both Group1 and Group2? I think it would still be good to run it when running tests locally. Didn't think of this earlier, sorry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, sure, in that case it becomes even easier from the CI part. |
||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for the doctests? I didn't realise the
docs
project would need it, but if it's needed then it is.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it depends on which env you call
doctest()
from. In the new workflow I was using the docs env. But I suppose I will move it back to the test env