Skip to content

Commit 92f2bc0

Browse files
authored
Rename to ConcurrentSim and fix up tests and CI (#83)
Signed-off-by: Stefan Krastanov <[email protected]>
1 parent 1dbbdae commit 92f2bc0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+906
-236
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
version: 2
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/" # Location of package manifests
7+
schedule:
8+
interval: "weekly"

.github/workflows/CompatHelper.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: '00 00 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
17+
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/TagBot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
- uses: JuliaRegistries/TagBot@v1
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
15-
ssh: ${{ secrets.DOCUMENTER_KEY }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI-nightly
2+
on:
3+
push:
4+
branches: [master, main]
5+
tags: ["*"]
6+
pull_request:
7+
jobs:
8+
test:
9+
name: Julia ${{ matrix.version }} - t=${{ matrix.threads }} - jet=${{ matrix.jet }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
version:
15+
- nightly
16+
os:
17+
- ubuntu-latest
18+
threads:
19+
- '1'
20+
jet:
21+
- 'false'
22+
arch:
23+
- x64
24+
steps:
25+
- uses: actions/checkout@v3
26+
- uses: julia-actions/setup-julia@v1
27+
with:
28+
version: ${{ matrix.version }}
29+
arch: ${{ matrix.arch }}
30+
- uses: actions/cache@v3
31+
env:
32+
cache-name: cache-artifacts
33+
with:
34+
path: ~/.julia/artifacts
35+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
36+
restore-keys: |
37+
${{ runner.os }}-test-${{ env.cache-name }}-
38+
${{ runner.os }}-test-
39+
${{ runner.os }}-
40+
- uses: julia-actions/julia-buildpkg@v1
41+
- uses: julia-actions/julia-runtest@v1
42+
env:
43+
JULIA_NUM_THREADS: ${{ matrix.threads }}
44+
JET_TEST: ${{ matrix.jet }}
45+
- uses: julia-actions/julia-processcoverage@v1
46+
- uses: codecov/codecov-action@v3
47+
with:
48+
file: lcov.info

.github/workflows/ci.yml

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,34 @@
11
name: CI
22
on:
33
push:
4-
branches: [master]
4+
branches: [master, main]
55
tags: ["*"]
66
pull_request:
77
jobs:
88
test:
9-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
9+
name: Julia ${{ matrix.version }} - t=${{ matrix.threads }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
fail-fast: false
1313
matrix:
1414
version:
15-
- '1.2'
16-
- '1' # automatically expands to the latest stable 1.x release of Julia
17-
- nightly
15+
- '1.6'
16+
- '1.7'
17+
- '1.8'
18+
- '1'
1819
os:
1920
- ubuntu-latest
21+
threads:
22+
- '1'
2023
arch:
2124
- x64
22-
- x86
23-
include:
24-
# test macOS and Windows with latest Julia only
25-
- os: macOS-latest
26-
arch: x64
27-
version: 1
28-
- os: windows-latest
29-
arch: x64
30-
version: 1
31-
- os: windows-latest
32-
arch: x86
33-
version: 1
3425
steps:
35-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v3
3627
- uses: julia-actions/setup-julia@v1
3728
with:
3829
version: ${{ matrix.version }}
3930
arch: ${{ matrix.arch }}
40-
- uses: actions/cache@v1
31+
- uses: actions/cache@v3
4132
env:
4233
cache-name: cache-artifacts
4334
with:
@@ -49,24 +40,23 @@ jobs:
4940
${{ runner.os }}-
5041
- uses: julia-actions/julia-buildpkg@v1
5142
- uses: julia-actions/julia-runtest@v1
43+
env:
44+
JULIA_NUM_THREADS: ${{ matrix.threads }}
5245
- uses: julia-actions/julia-processcoverage@v1
53-
- uses: codecov/codecov-action@v1
46+
- uses: codecov/codecov-action@v3
5447
with:
5548
file: lcov.info
5649
docs:
5750
name: Documentation
5851
runs-on: ubuntu-latest
5952
steps:
60-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
6154
- uses: julia-actions/setup-julia@v1
6255
with:
6356
version: '1'
64-
- run: |
65-
julia --project=docs -e '
66-
using Pkg
67-
Pkg.develop(PackageSpec(path=pwd()))
68-
Pkg.instantiate()'
69-
- run: julia --project=docs docs/make.jl
57+
- uses: julia-actions/julia-buildpkg@v1
58+
- uses: julia-actions/julia-docdeploy@v1
7059
env:
60+
GKSwstype: nul # Fix for Plots with GR backend.
7161
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7262
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/invalidations.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Invalidations
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
# Skip intermediate builds: always.
8+
# Cancel intermediate builds: always.
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
evaluate:
14+
# Only run on PRs to the default branch.
15+
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
16+
if: github.base_ref == github.event.repository.default_branch
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: julia-actions/setup-julia@v1
20+
with:
21+
version: '1'
22+
- uses: actions/checkout@v3
23+
- uses: julia-actions/julia-buildpkg@v1
24+
- uses: julia-actions/julia-invalidations@v1
25+
id: invs_pr
26+
27+
- uses: actions/checkout@v3
28+
with:
29+
ref: ${{ github.event.repository.default_branch }}
30+
- uses: julia-actions/julia-buildpkg@v1
31+
- uses: julia-actions/julia-invalidations@v1
32+
id: invs_default
33+
34+
- name: Report invalidation counts
35+
run: |
36+
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
37+
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
38+
- name: Check if the PR does increase number of invalidations
39+
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
40+
run: exit 1

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# News
2+
3+
## v1.0.0 - 2023-05-03
4+
5+
- Rename from SimJulia.jl to ConcurrentSim.jl
6+
7+
## Changelog of SimJulia.jl before the renaming
8+
9+
* v0.8.2 (2021)
10+
* implementation of Store based on a Dict
11+
* v0.8.1 (2021)
12+
* some minor bug fixes
13+
* uses ResumableFunctions v0.6 or higher
14+
* v0.8 (2019)
15+
* adds support for Julia v1.2.
16+
* v0.7 (2018)
17+
* adds support for Julia v1.0
18+
* v0.6 (2018)
19+
* adds support for Julia v0.7.
20+
* the `@oldprocess` macro and the `produce` / `consume` functions are removed because they are no longer supported.
21+
* v0.5 (2018)
22+
* The old way of making processes is deprecated in favor of the semi-coroutine approach as implemented in [ResumableFunctions](https://github.com/BenLauwens/ResumableFunctions.jl.git). The `@process` macro replaces the `@coroutine` macro. The old `@process` macro is temporarily renamed `@oldprocess` and will be removed when the infrastructure supporting the `produce` and the `consume` functions is no longer available in Julia. (DONE)
23+
* This version no longer integrates a continuous time solver. A continuous simulation framework based on [DISCO](http://www.akira.ruc.dk/~keld/research/DISCO/) and inspired by the standalone [QSS](https://sourceforge.net/projects/qssengine/) solver using ConcurrentSim as its discrete-event engine can be found in the repository [QuantizedStateSystems](https://github.com/BenLauwens/QuantizedStateSystems.jl.git) (WIP):
24+
* Documentation is automated with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl) (WIP: Overview and Tutorial OK).
25+
* v0.4.1 (2017)
26+
* the `@resumable` and `@yield` macros are put in a seperate package [ResumableFunctions](https://github.com/BenLauwens/ResumableFunctions.jl.git):
27+
* Users have to take into account the following syntax change: `@yield return arg` is replaced by `@yield arg`.
28+
* v0.4 (2017) only supports Julia v0.6 and above. It is a complete rewrite: more julian and less pythonic. The discrete event features are on par with v0.3 (SimPy v3) and following features are added:
29+
* Scheduling of events can be done with `Base.Dates.Datetime` and `Base.Dates.Period`
30+
* Two ways of making `Processes` are provided:
31+
- using the existing concept of `Tasks`
32+
- using a novel finite-statemachine approach
33+
* A continuous time solver based on the standalone [QSS](https://sourceforge.net/projects/qssengine/) solver is implemented. Only non-stiff systems can be solved efficiently.
34+
* v0.3 (2015) synchronizes the API with SimPy v3 and is Julia v0.3, v0.4 and v0.5 compatible:
35+
* Documentation is available at [readthedocs](http://simjuliajl.readthedocs.org/en/latest/).
36+
* The continuous time solver is not implemented.
37+
* v0.2 (2014) introduces a continuous time solver inspired by the Simula library [DISCO](http://www.akira.ruc.dk/~keld/research/DISCO/) and is Julia v0.2 and v0.3 compatible.
38+
* v0.1 (2013) is a Julia clone of SimPy v2 and is Julia v0.2 compatible.

Project.toml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
name = "SimJulia"
2-
uuid = "428bdadb-6287-5aa5-874b-9969638295fd"
1+
name = "ConcurrentSim"
2+
uuid = "6ed1e86c-fcaf-46a9-97e0-2b26a2cdb499"
33
keywords = ["discrete-even simulation"]
44
license = "MIT"
55
desc = "A discrete event process oriented simulation framework."
6-
authors = ["Ben Lauwens <[email protected]>"]
7-
repo = "https://github.com/BenLauwens/SimJulia.jl.git"
8-
version = "0.8.2"
6+
authors = ["Ben Lauwens and SimJulia and ConcurrentSim contributors"]
7+
repo = "https://github.com/JuliaDynamics/ConcurrentSim.jl.git"
8+
version = "1.0.0"
99

1010
[deps]
1111
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
1212
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
1313
ResumableFunctions = "c5292f4c-5179-55e1-98c5-05642aab7184"
1414

1515
[compat]
16-
ResumableFunctions = "^0.6"
17-
DataStructures = "^0.18"
18-
julia = "^1.2"
19-
20-
[extras]
21-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
22-
23-
[targets]
24-
test = ["Test"]
16+
DataStructures = "0.18"
17+
ResumableFunctions = "0.6"
18+
julia = "1.6"

README.md

Lines changed: 36 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,52 @@
1-
# SimJulia
2-
3-
A discrete event process oriented simulation framework written in [Julia](http://julialang.org/) inspired by the Python library [SimPy](https://simpy.readthedocs.io/).
4-
5-
## Build Status & Coverage
6-
7-
[![Build Status](https://github.com/benlauwens/SimJulia.jl/workflows/CI/badge.svg)](https://github.com/benlauwens/SimJulia.jl/actions?query=workflow%3ACI+branch%3Amaster)
8-
[![codecov](https://codecov.io/gh/BenLauwens/SimJulia.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/BenLauwens/SimJulia.jl)
1+
# ConcurrentSim (formerly SimJulia)
2+
3+
<table>
4+
<tr>
5+
<td>Documentation</td>
6+
<td>
7+
<a href="https://juliadynamics.github.io/ConcurrentSim.jl/stable"><img src="https://img.shields.io/badge/docs-stable-blue.svg" alt="Documentation of latest stable version"></a>
8+
<a href="https://juliadynamics.github.io/ConcurrentSim.jl/dev"><img src="https://img.shields.io/badge/docs-dev-blue.svg" alt="Documentation of dev version"></a>
9+
</td>
10+
</tr><tr></tr>
11+
<tr>
12+
<td>Continuous integration</td>
13+
<td>
14+
<a href="https://github.com/JuliaDynamics/ConcurrentSim.jl/actions?query=workflow%3ACI+branch%3Amaster"><img src="https://img.shields.io/github/actions/workflow/status/JuliaDynamics/ConcurrentSim.jl/ci.yml?branch=master" alt="GitHub Workflow Status"></a>
15+
</td>
16+
</tr><tr></tr>
17+
<tr>
18+
<td>Code coverage</td>
19+
<td>
20+
<a href="https://codecov.io/gh/JuliaDynamics/ConcurrentSim.jl"><img src="https://img.shields.io/codecov/c/gh/JuliaDynamics/ConcurrentSim.jl?label=codecov" alt="Test coverage from codecov"></a>
21+
</td>
22+
</tr><tr></tr>
23+
<tr>
24+
<td>Static analysis with</td>
25+
<td>
26+
<a href="https://github.com/aviatesk/JET.jl"><img src="https://img.shields.io/badge/JET.jl-%E2%9C%88%EF%B8%8F-9cf" alt="JET static analysis"></a>
27+
<a href="https://github.com/JuliaTesting/Aqua.jl"><img src="https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg" alt="Aqua QA"></a>
28+
</td>
29+
</tr>
30+
</table>
31+
32+
A discrete event process oriented simulation framework written in [Julia](http://julialang.org/) inspired by the Python library [SimPy](https://simpy.readthedocs.io/). One of the longest-lived Julia packages (originally under the name SimJulia).
933

1034
## Installation
1135

12-
SimJulia.jl is a [registered package](http://pkg.julialang.org), and is installed by running
36+
ConcurrentSim.jl is a [registered package](http://pkg.julialang.org), and is installed by running
1337

1438
```julia
15-
julia> Pkg.add("SimJulia")
39+
julia> Pkg.add("ConcurrentSim")
1640
```
1741

18-
## Documentation
19-
20-
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://BenLauwens.github.io/SimJulia.jl/stable)
21-
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://BenLauwens.github.io/SimJulia.jl/latest)
22-
2342
## License
2443

2544
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
2645

2746
## Authors
2847

2948
* Ben Lauwens, Royal Military Academy, Brussels, Belgium.
49+
* Maintainer volunteers from the JuliaDynamics and QuantumSavory organizations.
3050

3151
## Contributing
3252

@@ -35,38 +55,4 @@ julia> Pkg.add("SimJulia")
3555

3656
## Release Notes
3757

38-
* v0.8.2 (2021)
39-
* implementation of Store based on a Dict
40-
* v0.8.1 (2021)
41-
* some minor bug fixes
42-
* uses ResumableFunctions v0.6 or higher
43-
* v0.8 (2019)
44-
* adds support for Julia v1.2.
45-
* v0.7 (2018)
46-
* adds support for Julia v1.0
47-
* v0.6 (2018)
48-
* adds support for Julia v0.7.
49-
* the `@oldprocess` macro and the `produce` / `consume` functions are removed because they are no longer supported.
50-
* v0.5 (2018)
51-
* The old way of making processes is deprecated in favor of the semi-coroutine approach as implemented in [ResumableFunctions](https://github.com/BenLauwens/ResumableFunctions.jl.git). The `@process` macro replaces the `@coroutine` macro. The old `@process` macro is temporarily renamed `@oldprocess` and will be removed when the infrastructure supporting the `produce` and the `consume` functions is no longer available in Julia. (DONE)
52-
* This version no longer integrates a continuous time solver. A continuous simulation framework based on [DISCO](http://www.akira.ruc.dk/~keld/research/DISCO/) and inspired by the standalone [QSS](https://sourceforge.net/projects/qssengine/) solver using SimJulia as its discrete-event engine can be found in the repository [QuantizedStateSystems](https://github.com/BenLauwens/QuantizedStateSystems.jl.git) (WIP):
53-
* Documentation is automated with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl) (WIP: Overview and Tutorial OK).
54-
* v0.4.1 (2017)
55-
* the `@resumable` and `@yield` macros are put in a seperate package [ResumableFunctions](https://github.com/BenLauwens/ResumableFunctions.jl.git):
56-
* Users have to take into account the following syntax change: `@yield return arg` is replaced by `@yield arg`.
57-
* v0.4 (2017) only supports Julia v0.6 and above. It is a complete rewrite: more julian and less pythonic. The discrete event features are on par with v0.3 (SimPy v3) and following features are added:
58-
* Scheduling of events can be done with `Base.Dates.Datetime` and `Base.Dates.Period`
59-
* Two ways of making `Processes` are provided:
60-
- using the existing concept of `Tasks`
61-
- using a novel finite-statemachine approach
62-
* A continuous time solver based on the standalone [QSS](https://sourceforge.net/projects/qssengine/) solver is implemented. Only non-stiff systems can be solved efficiently.
63-
* v0.3 (2015) synchronizes the API with SimPy v3 and is Julia v0.3, v0.4 and v0.5 compatible:
64-
* Documentation is available at [readthedocs](http://simjuliajl.readthedocs.org/en/latest/).
65-
* The continuous time solver is not implemented.
66-
* v0.2 (2014) introduces a continuous time solver inspired by the Simula library [DISCO](http://www.akira.ruc.dk/~keld/research/DISCO/) and is Julia v0.2 and v0.3 compatible.
67-
* v0.1 (2013) is a Julia clone of SimPy v2 and is Julia v0.2 compatible.
68-
69-
## Todo
70-
71-
* Transparent statistics gathering for resources.
72-
* Update of documentation.
58+
A [detailed change log is kept](https://github.com/JuliaDynamics/ConcurrentSim.jl/blob/master/CHANGELOG.md).

0 commit comments

Comments
 (0)