Skip to content

Commit

Permalink
Merge pull request #13 from tpgillam/tg/stuff
Browse files Browse the repository at this point in the history
Fix CI, small tweaks
  • Loading branch information
tpgillam authored Aug 8, 2022
2 parents 5a883d3 + d9d49a8 commit 6c2f0d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: CI
on: [push, pull_request]
# Run on main, tags, or any pull request
on:
schedule:
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
push:
branches: [main]
tags: ["*"]
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
Expand All @@ -9,8 +16,8 @@ jobs:
matrix:
version:
- '1.5'
- '1.6'
- '1.7-nightly'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AssociativeWindowAggregation"
uuid = "444271a7-5434-4a02-b82b-0e30a9223c60"
authors = ["Thomas Gillam <tpgillam@googlemail.com>"]
version = "0.3.1"
version = "0.3.2"

[deps]
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Expand Down
6 changes: 3 additions & 3 deletions src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ Base.@propagate_inbounds function update_state!(
empty!(state.previous_cumsum)
upper = length(state.values)
lower = 1 + num_values_to_remove
if (upper - lower) >= 0 # i.e. we have a non-zero range
@inbounds if (upper - lower) >= 0 # i.e. we have a non-zero range
i = upper
accumulation = @inbounds(state.values[i])
accumulation = state.values[i]
while true
push!(state.previous_cumsum, accumulation)
i -= 1
i >= lower || break
# If we were to use a mutating operation here, then we'd have to introduce
# a copy above. So there is no drawback to using the non-mutating Op.
accumulation = Op(@inbounds(state.values[i]), accumulation)
accumulation = Op(state.values[i], accumulation)
end
end

Expand Down
2 changes: 1 addition & 1 deletion src/time.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ mutable struct TimeWindowAssociativeOp{Value,Op,Op!,Time,TimeDiff}
throw(ArgumentError("Got window $window, but it must be positive."))
end
return new{Value,Op,Op!,Time,TimeDiff}(
WindowedAssociativeOp{Value,Op,Op!,}(), window, Deque{Time}(), false
WindowedAssociativeOp{Value,Op,Op!}(), window, Deque{Time}(), false
)
end
end
Expand Down

2 comments on commit 6c2f0d3

@tpgillam
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/65846

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.2 -m "<description of version>" 6c2f0d3b3fe3f1252da1c0b15fc9b77e4e167264
git push origin v0.3.2

Please sign in to comment.