Skip to content

Commit da1d733

Browse files
authored
version 0.7.0
Dev
2 parents c171821 + 8832468 commit da1d733

File tree

156 files changed

+73718
-10744
lines changed

Some content is hidden

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

156 files changed

+73718
-10744
lines changed

.github/workflows/CI_full.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313

1414
jobs:
1515
test:
16+
env:
17+
JULIA_NUM_THREADS: 2
1618
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1719
runs-on: ${{ matrix.os }}
1820
# This allows a subsequently queued workflow run to interrupt previous runs
@@ -24,7 +26,6 @@ jobs:
2426
matrix:
2527
version:
2628
- '1'
27-
- 'nightly'
2829
os:
2930
- ubuntu-latest
3031
- macOS-latest
@@ -41,7 +42,7 @@ jobs:
4142
- uses: julia-actions/julia-buildpkg@v1
4243
- uses: julia-actions/julia-runtest@v1
4344
- uses: julia-actions/julia-processcoverage@v1
44-
- uses: codecov/codecov-action@v4
45+
- uses: codecov/codecov-action@v5
4546
with:
4647
token: ${{ secrets.CODECOV_TOKEN }}
4748
files: lcov.info

.github/workflows/CI_small.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212

1313
jobs:
1414
test:
15+
env:
16+
JULIA_NUM_THREADS: 2
1517
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
1618
runs-on: ${{ matrix.os }}
1719
# This allows a subsequently queued workflow run to interrupt previous runs
@@ -37,7 +39,7 @@ jobs:
3739
- uses: julia-actions/julia-buildpkg@v1
3840
- uses: julia-actions/julia-runtest@v1
3941
- uses: julia-actions/julia-processcoverage@v1
40-
- uses: codecov/codecov-action@v4
42+
- uses: codecov/codecov-action@v5
4143
with:
4244
token: ${{ secrets.CODECOV_TOKEN }}
4345
files: lcov.info

.github/workflows/CompatHelper.yml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,48 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main(; master_branch = "dev")
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
1342
env:
1443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
# This repo uses Documenter, so we can reuse our [Documenter SSH key](https://documenter.juliadocs.org/stable/man/hosting/walkthrough/).
45+
# If we didn't have one of those setup, we could configure a dedicated ssh deploy key `COMPATHELPER_PRIV` following https://juliaregistries.github.io/CompatHelper.jl/dev/#Creating-SSH-Key.
46+
# Either way, we need an SSH key if we want the PRs that CompatHelper creates to be able to trigger CI workflows themselves.
47+
# That is because GITHUB_TOKEN's can't trigger other workflows (see https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow).
48+
# Check if you have a deploy key setup using these docs: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.
1549
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main(; master_branch = "dev")'
50+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/TagBot.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,20 @@ on:
66
workflow_dispatch:
77
inputs:
88
lookback:
9-
default: 3
9+
default: "3"
1010
permissions:
11+
actions: read
12+
checks: read
1113
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
1223
jobs:
1324
TagBot:
1425
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
@@ -17,4 +28,6 @@ jobs:
1728
- uses: JuliaRegistries/TagBot@v1
1829
with:
1930
token: ${{ secrets.GITHUB_TOKEN }}
31+
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
2032
ssh: ${{ secrets.DOCUMENTER_KEY }}
33+
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}

.github/workflows/automerge_CompatHelper.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/automerge_dependabot.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/documentation.yml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,45 @@ name: Documentation
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
tags: '*'
88
pull_request:
99
branches:
10-
- main
11-
12-
# This allows a subsequently queued workflow run to interrupt previous runs
13-
concurrency:
14-
group: "${{ github.workflow }} @ ${{ github.ref }}"
15-
cancel-in-progress: true
10+
- main
11+
- dev
1612

1713
jobs:
18-
docs:
19-
name: Documentation
20-
runs-on: macOS-latest
14+
build:
15+
env:
16+
JULIA_NUM_THREADS: 2
17+
# These permissions are needed to:
18+
# - Deploy the documentation: https://documenter.juliadocs.org/stable/man/hosting/#Permissions
19+
# - Delete old caches: https://github.com/julia-actions/cache#usage
20+
permissions:
21+
actions: write
22+
contents: write
23+
pull-requests: read
24+
statuses: write
25+
runs-on: ubuntu-latest
2126
steps:
2227
- uses: actions/checkout@v4
2328
- uses: julia-actions/setup-julia@v2
2429
with:
2530
version: '1'
26-
- uses: julia-actions/julia-buildpkg@v1
27-
- uses: julia-actions/julia-docdeploy@v1
31+
- uses: julia-actions/cache@v2
32+
- name: Install dependencies
33+
shell: julia --color=yes --project=docs {0}
34+
run: |
35+
using Pkg
36+
Pkg.develop(PackageSpec(path=pwd()))
37+
Pkg.instantiate()
38+
- name: Build and deploy
39+
run: julia --project=docs --code-coverage=user docs/make.jl
2840
env:
2941
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3042
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
31-
- run: |
32-
julia --project=docs/ -e '
33-
using Documenter: DocMeta, doctest
34-
using ActionModels
35-
DocMeta.setdocmeta!(ActionModels, :DocTestSetup, :(using ActionModels); recursive=true)
36-
doctest(ActionModels)'
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v5
45+
46+
47+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
8+
concurrency:
9+
group: doc-preview-cleanup
10+
cancel-in-progress: false
11+
12+
jobs:
13+
doc-preview-cleanup:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout gh-pages branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: gh-pages
22+
- name: Delete preview and history + push changes
23+
run: |
24+
if [ -d "${preview_dir}" ]; then
25+
git config user.name "Documenter.jl"
26+
git config user.email "[email protected]"
27+
git rm -rf "${preview_dir}"
28+
git commit -m "delete preview"
29+
git branch gh-pages-new "$(echo "delete history" | git commit-tree "HEAD^{tree}")"
30+
git push --force origin gh-pages-new:gh-pages
31+
fi
32+
env:
33+
preview_dir: previews/PR${{ github.event.number }}

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@
33
*.jl.mem
44
/docs/build/
55
.DS_Store
6-
testing_script.jl
76
settings.json
87
Manifest.toml
98

109
/docs/src/generated
1110
/docs/src/index.md
1211
/docs/build/
13-
/build
12+
/build
13+
14+
testing_scripts/*
15+
16+
docs/.samplingstate
17+
18+
README.md

CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac)
2+
3+
We follow the ColPrac guide for collaborative practices, and recommend new contributors to read through it.
4+
5+
There are three primary ways in which contributors may wish to improve ActionModels. They may wish to contribute to the growing library of premade models, to add features more generally, or to report and/or fix errors. All of them are deeply appreciated. If there is interest, do not hesitate to ask to be made a more permanent constributor to the package.
6+
7+
# Adding premade models
8+
ActionModels contains a library of pre-created models that users can easily instantiate and use. These are fully modular from most of the source code, so users can contribute here needing very little except for understanding the general API of ActionModels.
9+
10+
Adding a new premade action model requires three steps:
11+
1) creating a Julia file in the `src/premade_models` folder which implements the action model itself, and adding the path to that julia file in the main `src/ActionModels.jl` file.
12+
2) adding a Julia file in the `test/testsuite/premade_models` which runs a comprehensive set of tests for the model
13+
3) adding a Julia file in the `docs/julia_files/C_premade_models` folder which contains documentation for the new model
14+
15+
Users can see the PVL-Delta model which is already created as an illustrative example. If users want to create a premade model that relies on a submodel struct, they can instead see the Rescorla-Wagner model for an example.
16+
17+
In the first step, the contributor should make sure to export the config struct used in the `ActionModel` constructor call. They should keep the model as flexible as possible, so that it can be used for many different datasets, should keep it as readable as possible, and should keep it type-stable.
18+
19+
In the second step, the contributor should make sure to test both simulating with the model and fitting it to data, and to test the full exported API of functions like `get_parameters` etc.
20+
21+
In the third step, the contributor should provide a brief theoretical (and perhaps formal) introduction to the model and its theoretical commitments, preferably with a reference to an article that describes it in more detail, and also clarify which types of tasks and data it is useful for. The user should describe all the variations of the model that is included, and provide examples of its use for each. Users may add a dataset to the `docs/example_datasets` folder that can be used with the model, if they find that it would be illustrative.
22+
23+
When the above steps are completed, a user can create a pull-request into the `dev` branch, and a maintainer of ActionModels will review the code before merging it.
24+
25+
# Adding features and fixing errors
26+
Users are welcome to make an issue on the Github repository if they have encountered and error or unexpected behaviour, or if they have a suggestion for a new feature or an improvement to ActionModels, so as to initialize discussions about the design of the implementation. They are also very welcome to create a pull-request with an update to the package to the `dev` branch, which will be reviewed by a maintainer of ActionModels before merging. In any case, we wish to keep the bar low for contribution, so potential contributors should not hesitate to get in touch.

0 commit comments

Comments
 (0)