JuliaDynamics / Agents.jl

Agent-based modeling framework in Julia
https://juliadynamics.github.io/Agents.jl/stable/
MIT License
725 stars 117 forks source link

New version of agent macro #870

Closed Tortar closed 11 months ago

Tortar commented 1 year ago

Per #869

e.g. this now works

abstract type Foo end
@agent struct NewAgent(GridAgent{2}) <: Foo
    x::Int = 1
    const y::Int
end
codecov-commenter commented 1 year ago

Codecov Report

Merging #870 (96488cf) into main (abca390) will increase coverage by 0.96%. Report is 6 commits behind head on main. The diff coverage is 82.60%.

@@            Coverage Diff             @@
##             main     #870      +/-   ##
==========================================
+ Coverage   71.76%   72.72%   +0.96%     
==========================================
  Files          42       42              
  Lines        2745     2871     +126     
==========================================
+ Hits         1970     2088     +118     
- Misses        775      783       +8     
Files Changed Coverage Δ
src/Agents.jl 100.00% <ø> (ø)
src/deprecations.jl 2.00% <0.00%> (-0.33%) :arrow_down:
src/simulations/sample.jl 100.00% <ø> (ø)
src/spaces/continuous.jl 92.30% <ø> (-0.96%) :arrow_down:
src/spaces/graph.jl 76.19% <ø> (ø)
src/spaces/grid_general.jl 99.16% <ø> (+0.32%) :arrow_up:
src/spaces/openstreetmap.jl 72.30% <ø> (ø)
src/core/agents.jl 100.00% <100.00%> (+7.69%) :arrow_up:
src/core/space_interaction_API.jl 93.07% <100.00%> (+0.76%) :arrow_up:

... and 14 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more