Skip to content

Commit b23dd43

Browse files
Merge pull request #73 from JuliaReinforcementLearning/jeremiahpslewis-patch-1
Add manual trigger to CI and fix boundserrors related to CircularArrayBuffers.jl
2 parents f222bad + 6aaa4f8 commit b23dd43

File tree

5 files changed

+24
-2
lines changed

5 files changed

+24
-2
lines changed

.devcontainer/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM julia:1.10
2+
3+
RUN apt-get update && apt-get install -y git

.devcontainer/devcontainer.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"customizations": {
3+
"vscode": {
4+
"extensions": [
5+
"julialang.language-julia",
6+
"ms-azuretools.vscode-docker"
7+
]
8+
}
9+
},
10+
"runArgs": [
11+
"--privileged"
12+
],
13+
"dockerFile": "Dockerfile",
14+
"updateContentCommand": "julia -e 'using Pkg; Pkg.develop(path=\".\");'"
15+
}

.github/workflows/CI.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
- main
66
tags: '*'
77
pull_request:
8+
workflow_dispatch:
89
concurrency:
910
# Skip intermediate builds: always.
1011
# Cancel intermediate builds: only if it is a pull request build.

test/episodes.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ using Test
116116
@test eb.sampleable_inds == [1,1,1,1,1,0,0]
117117
@test eb[:action][6] == 6
118118
@test eb[:next_action][5] == 6
119-
@test eb[6][:reward] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
119+
@test eb[:reward][6] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
120+
@test_throws BoundsError eb[6] #6 is not a valid index, the reward there is dummy, filled as zero
120121
ep2_len = 0
121122
for (j,i) = enumerate(8:11)
122123
ep2_len += 1

test/traces.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ end
167167
@test t1[:reward][1] == 5
168168

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

171+
push!(t1, Val(:state), ones(2,3))
172+
173+
@test t1[:state][1] == ones(2,3)
172174

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

0 commit comments

Comments
 (0)