Skip to content
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

Add manual trigger to CI and fix boundserrors related to CircularArrayBuffers.jl #73

Merged
merged 6 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM julia:1.10

RUN apt-get update && apt-get install -y git
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"customizations": {
"vscode": {
"extensions": [
"julialang.language-julia",
"ms-azuretools.vscode-docker"
]
}
},
"runArgs": [
"--privileged"
],
"dockerFile": "Dockerfile",
"updateContentCommand": "julia -e 'using Pkg; Pkg.develop(path=\".\");'"
}
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- main
tags: '*'
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand Down
3 changes: 2 additions & 1 deletion test/episodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ using Test
@test eb.sampleable_inds == [1,1,1,1,1,0,0]
@test eb[:action][6] == 6
@test eb[:next_action][5] == 6
@test eb[6][:reward] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
@test eb[:reward][6] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
@test_throws BoundsError eb[6] #6 is not a valid index, the reward there is dummy, filled as zero
ep2_len = 0
for (j,i) = enumerate(8:11)
ep2_len += 1
Expand Down
4 changes: 3 additions & 1 deletion test/traces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ end
@test t1[:reward][1] == 5

@test size(Base.getindex(t1, :reward)) == (1,)
@test size(Base.getindex(t1, 1).state) == (2,3)

push!(t1, Val(:state), ones(2,3))

@test t1[:state][1] == ones(2,3)

t2 = Traces(; a=[2, 3], b=[false, true])
push!(t2, Val(:a), 5)
Expand Down
Loading