Skip to content

Commit 3a50882

Browse files
authored
Use ComplexityMeasures 3.8 (#400)
* up complexitymeasures * quick fix: move GroupSlices.jl code from ComplexityMeasures.jl here * Better check for agreement between transfer operator and visitation frequency estimates Use reasonable number of points and percentage discrepancy * use package-internal groupslices * Use StableRNG for test that sometimes fails due to random data generation * up version * Fix and clean up documentation build by using @extref (#401) * set version of complexitymeasures * use @extref * update style * formatting * formatting and extref * extref * extref * always use links * formatting * up to julia long term release version * reintroduce references * Properly use extrefs * extref for statespaceset * fix last doc errors and set collapse = false * up minimum julia version to latest LTS * Don't build StateSpaceSets. * Remove temp dep * Force higher versions for packages DynamicalSystems.jl v2 is loaded during tests?? * Update checkout * explicitly add complexitymeasures to test deps * remove direct reference to statespaceset * Some more fixes to docs + version (#402) * set version of complexitymeasures * use @extref * update style * formatting * formatting and extref * extref * extref * always use links * formatting * up to julia long term release version * reintroduce references * Properly use extrefs * extref for statespaceset * fix last doc errors and set collapse = false * up minimum julia version to latest LTS * Don't build StateSpaceSets. * Remove temp dep * Force higher versions for packages DynamicalSystems.jl v2 is loaded during tests?? * Update checkout * explicitly add complexitymeasures to test deps * remove direct reference to statespaceset * Up versions * remove collapse info * less strict dsp requirement
1 parent 69f8259 commit 3a50882

File tree

68 files changed

+976
-726
lines changed

Some content is hidden

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

68 files changed

+976
-726
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
access_token: ${{ github.token }}
3030

3131
# Do tests
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v5
3333
- uses: julia-actions/setup-julia@v1
3434
with:
3535
version: ${{ matrix.version }}

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Associations"
22
uuid = "614afb3a-e278-4863-8805-9959372b9ec2"
33
authors = ["Kristian Agasøster Haaga <[email protected]>", "Tor Einar Møller <[email protected]>", "George Datseris <[email protected]>"]
44
repo = "https://github.com/kahaaga/Associations.jl.git"
5-
version = "4.4.2"
5+
version = "4.5.0"
66

77
[deps]
88
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
@@ -31,8 +31,8 @@ TimeseriesSurrogates = "c804724b-8c18-5caa-8579-6025a0767c70"
3131
[compat]
3232
Accessors = "^0.1.28"
3333
Combinatorics = "1"
34-
ComplexityMeasures = "~3.7"
35-
DSP = "^0.7"
34+
ComplexityMeasures = "3.8"
35+
DSP = "^0.7, 0.8"
3636
DelayEmbeddings = "2.9"
3737
Distances = "^0.10"
3838
Distributions = "^0.25"
@@ -49,4 +49,4 @@ StaticArrays = "^1"
4949
Statistics = "1"
5050
StatsBase = "^0.34"
5151
TimeseriesSurrogates = "2.7"
52-
julia = "^1.10.6"
52+
julia = "^1.10.10"

docs/Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2525
TimeseriesSurrogates = "c804724b-8c18-5caa-8579-6025a0767c70"
2626

2727
[compat]
28+
ComplexityMeasures = "^3.8"
2829
DynamicalSystemsBase = "3"
29-
julia = "^1.10.6"
30+
julia = "^1.10.10"

docs/build_docs_with_style.jl

Lines changed: 68 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing
22

3-
import Pkg
4-
Pkg.pkg"add Documenter@1"
3+
import Pkg
4+
Pkg.pkg"add Documenter@1"
55

6-
# Load documenter
7-
using Documenter
8-
using DocumenterTools: Themes
9-
ENV["JULIA_DEBUG"] = "Documenter"
6+
# Load documenter
7+
using Documenter
8+
using DocumenterTools: Themes
9+
ENV["JULIA_DEBUG"] = "Documenter"
1010

11-
# For easier debugging when downloading from a specific branch.
12-
github_user = "JuliaDynamics"
13-
branch = "master"
14-
download_path = "https://raw.githubusercontent.com/$github_user/doctheme/$branch"
11+
# For easier debugging when downloading from a specific branch.
12+
github_user = "JuliaDynamics"
13+
branch = "master"
14+
download_path = "https://raw.githubusercontent.com/$github_user/doctheme/$branch"
1515

16-
import Downloads
17-
for file in ("juliadynamics-lightdefs.scss", "juliadynamics-darkdefs.scss", "juliadynamics-style.scss")
18-
Downloads.download("$download_path/$file", joinpath(@__DIR__, file))
19-
end
16+
import Downloads
17+
for file in ("juliadynamics-lightdefs.scss", "juliadynamics-darkdefs.scss", "juliadynamics-style.scss")
18+
Downloads.download("$download_path/$file", joinpath(@__DIR__, file))
19+
end
2020

21-
# create the themes
22-
for w in ("light", "dark")
23-
header = read(joinpath(@__DIR__, "juliadynamics-style.scss"), String)
24-
theme = read(joinpath(@__DIR__, "juliadynamics-$(w)defs.scss"), String)
25-
write(joinpath(@__DIR__, "juliadynamics-$(w).scss"), header*"\n"*theme)
26-
end
21+
# create the themes
22+
for w in ("light", "dark")
23+
header = read(joinpath(@__DIR__, "juliadynamics-style.scss"), String)
24+
theme = read(joinpath(@__DIR__, "juliadynamics-$(w)defs.scss"), String)
25+
write(joinpath(@__DIR__, "juliadynamics-$(w).scss"), header * "\n" * theme)
26+
end
2727

28-
# compile the themes
29-
Themes.compile(joinpath(@__DIR__, "juliadynamics-light.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-light.css"))
30-
Themes.compile(joinpath(@__DIR__, "juliadynamics-dark.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"))
28+
# compile the themes
29+
Themes.compile(joinpath(@__DIR__, "juliadynamics-light.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-light.css"))
30+
Themes.compile(joinpath(@__DIR__, "juliadynamics-dark.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"))
3131

32-
# Download and apply CairoMakie plotting style
33-
using CairoMakie
34-
Downloads.download("$download_path/style.jl", joinpath(@__DIR__, "style.jl"))
35-
include("style.jl")
32+
# Download and apply CairoMakie plotting style
33+
using CairoMakie
34+
Downloads.download("$download_path/style.jl", joinpath(@__DIR__, "style.jl"))
35+
include("style.jl")
3636

37-
using DocumenterInterLinks
37+
using DocumenterInterLinks
3838

3939
links = InterLinks(
4040
"ComplexityMeasures" => (
@@ -49,46 +49,48 @@ links = InterLinks(
4949
),
5050
);
5151

52-
function build_docs_with_style(pages, modules...; bib = nothing, authors = "George Datseris", draft = false, kwargs...)
53-
settings = (
54-
modules = [modules...],
55-
format = Documenter.HTML(
56-
prettyurls = CI,
57-
assets = [
58-
asset("https://fonts.googleapis.com/css?family=Montserrat|Source+Code+Pro&display=swap", class=:css),
59-
],
60-
collapselevel = 3,
61-
size_threshold = 1250 * 2^10,
62-
size_threshold_warn = 750 * 2^10,
63-
example_size_threshold = 100 * 2^10,
64-
size_threshold_ignore = [
65-
"examples/examples_associations.md",
52+
function build_docs_with_style(pages, modules...; bib=nothing,
53+
authors="Kristian Haaga, George Datseris and others", draft=false, kwargs...)
54+
settings = (
55+
modules=[modules...],
56+
format=Documenter.HTML(
57+
prettyurls=CI,
58+
assets=[
59+
asset("https://fonts.googleapis.com/css?family=Montserrat|Source+Code+Pro&display=swap", class=:css),
60+
],
61+
collapselevel=3,
62+
size_threshold=1250 * 2^10,
63+
size_threshold_warn=750 * 2^10,
64+
example_size_threshold=100 * 2^10,
65+
size_threshold_ignore=[
66+
"examples/examples_associations.md",
6667
"examples/examples_independence.md",
6768
"examples/examples_infer_graphs.md",
68-
]
69-
),
70-
sitename = "$(modules[1]).jl",
71-
authors,
72-
pages,
73-
draft,
74-
doctest = false,
75-
warnonly = false,
76-
checkdocs = :exported,
77-
kwargs...
78-
)
69+
]
70+
),
71+
sitename="$(modules[1]).jl",
72+
authors,
73+
pages,
74+
draft,
75+
doctest=false,
76+
checkdocs=:exported,
77+
# The following Documenter fails will NOT ERROR the docbuild!
78+
warnonly=[:doctest, :missing_docs],
79+
kwargs...
80+
)
7981

80-
if isnothing(bib)
81-
makedocs(; settings...)
82-
else
83-
makedocs(; plugins=[bib, links], settings...)
84-
end
82+
if isnothing(bib)
83+
makedocs(; plugins=[links], settings...)
84+
else
85+
makedocs(; plugins=[links, bib], settings...)
86+
end
8587

86-
if CI
87-
deploydocs(
88-
repo = "github.com/JuliaDynamics/$(modules[1]).jl.git",
89-
target = "build",
90-
push_preview = true
91-
)
92-
end
88+
if CI
89+
deploydocs(
90+
repo="github.com/JuliaDynamics/$(modules[1]).jl.git",
91+
target="build",
92+
push_preview=true
93+
)
94+
end
9395

94-
end
96+
end

docs/make.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pages = [
2525
"api/cross_map_api.md",
2626
],
2727
"Examples" => [
28-
"Associations" => "examples/examples_associations.md",
28+
"Associations" => "examples/examples_associations.md",
2929
"Independence testing" => "examples/examples_independence.md",
3030
"Causal graph inference" => "examples/examples_infer_graphs.md",
3131
],
@@ -43,9 +43,9 @@ bibliography = CitationBibliography(
4343
style=:authoryear
4444
)
4545

46-
build_docs_with_style(pages, Associations, ComplexityMeasures, StateSpaceSets;
47-
expandfirst = ["index.md"],
48-
bib = bibliography,
49-
pages = pages,
50-
authors = "Kristian Agasøster Haaga, David Diego, Tor Einar Møller, George Datseris",
46+
build_docs_with_style(pages, Associations;
47+
expandfirst=["index.md"],
48+
bib=bibliography,
49+
pages=pages,
50+
authors="Kristian Agasøster Haaga, David Diego, Tor Einar Møller, George Datseris",
5151
)

docs/src/api/counts_and_probabilities_api.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11

22
```@meta
3-
CollapsedDocStrings = true
3+
CollapsedDocStrings = false
44
```
55

66
# [Multivariate counts and probabilities API](@id counts_and_probabilities_api)
77

88
For counting and probabilities, Associations.jl extends the single-variable machinery
9-
in ComplexityMeasures.jl to multiple variables.
9+
in ComplexityMeasures.jl to multiple variables. See the following types:
1010

11-
```@docs
12-
Associations.Counts
13-
Associations.counts(::OutcomeSpace)
14-
```
11+
- [`Counts`](@extref ComplexityMeasures.Counts)
12+
- [`Probabilities`](@extref ComplexityMeasures.Probabilities)
1513

1614
```@docs
17-
Associations.Probabilities
15+
Associations.counts(::OutcomeSpace)
1816
Associations.probabilities(::OutcomeSpace)
1917
```
2018

@@ -24,10 +22,10 @@ The utility function [`marginal`](@ref) is also useful.
2422
marginal
2523
```
2624

27-
## [Example: estimating [`Counts`](@ref) and [`Probabilities`](@ref)](@id tutorial_probabilities)
25+
## [Example: estimating [`Counts`](@extref ComplexityMeasures.Counts) and [`Probabilities`](@extref ComplexityMeasures.Probabilities)](@id tutorial_probabilities)
2826

2927
Estimating multivariate counts (contingency matrices) and PMFs is simple. If the data are pre-discretized, then
30-
we can use [`UniqueElements`](@ref) to simply count the number of occurrences.
28+
we can use [`UniqueElements`](@extref ComplexityMeasures.UniqueElements) to simply count the number of occurrences.
3129

3230
```@example counts_probs_tutorial
3331
using Associations
@@ -47,7 +45,7 @@ probabilities(discretization, x, y, z)
4745
```
4846

4947
For numerical data, we can estimate both counts and probabilities using [`CodifyVariables`](@ref)
50-
with any count-based [`OutcomeSpace`](@ref).
48+
with any count-based [`OutcomeSpace`](@extref ComplexityMeasures.OutcomeSpace).
5149

5250
```@example counts_probs_tutorial
5351
using Associations
@@ -56,7 +54,7 @@ discretization = CodifyVariables(BubbleSortSwaps(m = 4))
5654
probabilities(discretization, x, y)
5755
```
5856

59-
For more fine-grained control, we can use [`CodifyPoints`](@ref) with one or several [`Encoding`](@ref)s.
57+
For more fine-grained control, we can use [`CodifyPoints`](@ref) with one or several [`Encoding`](@extref ComplexityMeasures.Encoding)s.
6058

6159
```@example counts_probs_tutorial
6260
using Associations

docs/src/api/cross_map_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```@meta
2-
CollapsedDocStrings = true
2+
CollapsedDocStrings = false
33
```
44

55
# Cross-map API

0 commit comments

Comments
 (0)