Skip to content

Commit

Permalink
Move to dynamicalsystems v3 (#117)
Browse files Browse the repository at this point in the history
* remove warnings of untyped parameters

* more unused typed paramas

* renames for StateSpaceSets.jl v1

* update readme

* bump version to 3.0

* folder refactor

* better readme

* add docs here from DynamicalSystems.jl

* state space set reference

* update version to 2.6

* finish separated embedding page

* finish unified page as well

* bump version to 2.7

* update github workflows

* fix auto separated embeddding tests

* fix autodelay time tests

* remove old file

* use dedicated test project toml
  • Loading branch information
Datseris committed Feb 17, 2023
1 parent 020333a commit c6741dd
Show file tree
Hide file tree
Showing 43 changed files with 16,128 additions and 254 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Minimal Working Example**
Please provide a piece of code that leads to the bug you encounter.

If the code is **runnable**, it will help us identify the problem faster.

**Package versions**

Please provide the versions of packages you use. To do this, run the code:
```julia
import Pkg
Pkg.status([
"Package1", "Package2"]; # etc.
mode = PKGMODE_MANIFEST
)
```

Please also include the Julia version you run.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Describe the feature you'd like to have**

**Cite scientific papers related to the feature/algorithm**

**If possible, sketch out an implementation strategy**
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
24 changes: 22 additions & 2 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
branches:
- main
- '**' # matches every branch
push:
branches:
- main
Expand All @@ -23,17 +24,17 @@ jobs:
# Cancel ongoing CI test runs if pushing to branch again before the previous tests
# have finished
- name: Cancel ongoing test runs for previous commits
uses: styfle/cancel-workflow-action@0.6.0
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

# Do tests
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
Expand All @@ -45,3 +46,7 @@ jobs:
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info
28 changes: 28 additions & 0 deletions .github/workflows/doccleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Doc Preview Cleanup

on:
pull_request:
types: [closed]

jobs:
doc-preview-cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages

- name: Delete preview and history
run: |
git config user.name "Documenter.jl"
git config user.email "[email protected]"
git rm -rf "previews/PR$PRNUM"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
env:
PRNUM: ${{ github.event.number }}

- name: Push changes
run: |
git push --force origin gh-pages-new:gh-pages
26 changes: 26 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation

on:
push:
branches:
- main
tags: '*'
pull_request:

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
Manifest.toml
*.csv
docs/build/*
Manifest.toml
*.scss
*.css
.DS_Store
*vscode
*.css
*.scss
*style.jl
24 changes: 15 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# 2.6 - Refactoring release
# v2.7 - Refactoring release

All functionality related to `Dataset` has been refactored into a new package StateSpaceSets.jl. Since DelayEmbeddings.jl re-exports it, nothing should be breaking, but still, if you don't explicitly need delay embeddings, you should use StateSpaceSets.jl directly.
The package has also been updated to all new names used in DynamicalSystems.jl v3.0,
and now hosts its own documentation as per DynamicalSystems.jl v3.0 change.

Nothing else has been changed.

# v2.6 - Refactoring release
All functionality related to `StateSpaceSet` has been refactored into a new package StateSpaceSets.jl. Since DelayEmbeddings.jl re-exports it, nothing should be breaking, but still, if you don't explicitly need delay embeddings, you should use StateSpaceSets.jl directly.

Now DelayEmbeddings.jl really is only about delay coordinate embedding methods.

# v2.5
- `statespace_sampler` ported here from ChaosTools.jl

# v2.4
- It is now possible to horizontally concatenate more than two `Dataset`s using `hcat`. Providing multiple `Dataset`s of potentially different dimensions to the `Dataset` constructor will horizontally concatenate the inputs.
- It is now possible to horizontally concatenate more than two `StateSpaceSet`s using `hcat`. Providing multiple `StateSpaceSet`s of potentially different dimensions to the `StateSpaceSet` constructor will horizontally concatenate the inputs.

# v2.3
- New function `dataset_distance` that calculates distances between datasets.
Expand All @@ -21,7 +27,7 @@ Now DelayEmbeddings.jl really is only about delay coordinate embedding methods.
# v2.0.0
**BREAKING**
- All deprecations have been removed and errors will be thrown now instead. Switch to previous stable version to enable them again.
- `Dataset[range_of_integers]` now returns a `Dataset` instead of `Vector{SVector}`.
- `StateSpaceSet[range_of_integers]` now returns a `StateSpaceSet` instead of `Vector{SVector}`.

# v1.20.6
* Name `regularize` has been deprecated in favor of `standardize`, which aligns more with current literature.
Expand All @@ -38,7 +44,7 @@ Now DelayEmbeddings.jl really is only about delay coordinate embedding methods.
* Theiler window is now usable in Cao's method.

# v1.18.0
* `view` is now applicable to `AbstractDataset`, producing objects of the new type `SubDataset`.
* `view` is now applicable to `AbstractStateSpaceSet`, producing objects of the new type `SubDataset`.

# v1.17.0
* All code related to neighborhoods and finding nearest neighbors has moved to Neighborhood.jl, and thus old names like `FixedMassNeighborhood` and `neighborhood` have been deprecated.
Expand All @@ -48,11 +54,11 @@ Now DelayEmbeddings.jl really is only about delay coordinate embedding methods.
* Arbitrary weights can be given as options to `genembed`.

# v1.15.0
* Horizontal concatenation of same-length `Vector{<:Real}` and `Dataset` in any order using
* Horizontal concatenation of same-length `Vector{<:Real}` and `StateSpaceSet` in any order using
`Base.hcat(x, y)` or `[x y]` syntax.
* Convenience constructors that uses horizontal concatenation:
`Dataset(::Dataset, ::Vector{<:Real})`, `Dataset(::Vector{<:Real}, ::Dataset)` and
`Dataset(::Dataset, ::Dataset)`.
`StateSpaceSet(::StateSpaceSet, ::Vector{<:Real})`, `StateSpaceSet(::Vector{<:Real}, ::StateSpaceSet)` and
`StateSpaceSet(::StateSpaceSet, ::StateSpaceSet)`.

# v1.14.0
* New unified embedding method `pecuzal` by Kraemer et al.
Expand All @@ -63,7 +69,7 @@ Now DelayEmbeddings.jl really is only about delay coordinate embedding methods.
# v1.12.0
* Possible delay times in `optimal_traditional_de` are now `1:100` for increased accuracy.
* New method for univariate non-unified delay embedding by Hegger, Kantz
* It is now possible to `embed` in one dimension (which just returns the vector as a Dataset)
* It is now possible to `embed` in one dimension (which just returns the vector as a StateSpaceSet)
* New function `optimal_traditional_de` for automated delay embeddings
* `delay_afnn, delay_ifnn, delay_fnn, delay_f1nn` are part of public API now.
* The argument `γs` and the function `reconstruct` is starting to be phased out in
Expand Down
21 changes: 4 additions & 17 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DelayEmbeddings"
uuid = "5732040d-69e3-5649-938a-b6b4f237613f"
repo = "https://github.com/JuliaDynamics/DelayEmbeddings.jl.git"
version = "2.6.0"
version = "2.7.0"

[deps]
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
Expand All @@ -10,28 +10,15 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Neighborhood = "645ca80c-8b79-4109-87ea-e1f58159d116"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StateSpaceSets = "40b095a5-5852-4c12-98c7-d43bf788e795"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
Distances = "0.7, 0.8, 0.9, 0.10"
Distributions = "0.23, 0.24, 0.25"
DynamicalSystemsBase = "2.3.4"
Distances = "0.10"
Distributions = "0.25"
Neighborhood = "0.2"
Reexport = "1"
StaticArrays = "0.8, 0.11, 0.12, 1.0"
StateSpaceSets = "0.1.2, 1"
StateSpaceSets = "1"
StatsBase = "0.24, 0.32, 0.33"
julia = "1.5"

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["DynamicalSystemsBase", "Test", "Random", "DelimitedFiles", "Downloads"]
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# DelayEmbeddings.jl

![DynamicalSystems.jl logo: The Double Pendulum](https://i.imgur.com/nFQFdB0.gif)
[![](https://img.shields.io/badge/docs-dev-lightblue.svg)](https://JuliaDynamics.github.io/DelayEmbeddings.jl/dev)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaDynamics.github.io/DelayEmbeddings.jl/stable)
[![](https://img.shields.io/badge/DOI-10.1007%2F978--3--030--91032--7-purple)](https://link.springer.com/book/10.1007/978-3-030-91032-7)
[![CI](https://github.com/JuliaDynamics/DelayEmbeddings.jl/workflows/CI/badge.svg)](https://github.com/JuliaDynamics/DelayEmbeddings.jl/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/JuliaDynamics/DelayEmbeddings.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaDynamics/DelayEmbeddings.jl)
[![Package Downloads](https://shields.io/endpoint?url=https://pkgs.genieframework.com/api/v1/badge/DelayEmbeddings)](https://pkgs.genieframework.com?packages=DelayEmbeddings)

| **Documentation** | **Tests** | Gitter |
|:--------:|:-------------------:|:-----:|
|[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaDynamics.github.io/DynamicalSystems.jl/dev) | [![CI](https://github.com/juliadynamics/DelayEmbedding.jl/workflows/CI/badge.svg)](https://github.com/JuliaDynamics/DelayEmbedding.jl/actions) | [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/JuliaDynamics/Lobby)
A Julia package that provides a generic interface for performing delay coordinate embeddings, as well as cutting edge algorithms for creating optimal embeddings given some data.
It can be used as a standalone package, or as part of
[DynamicalSystems.jl](https://juliadynamics.github.io/DynamicalSystems.jl/dev/).

To install it, run `import Pkg; Pkg.add("DelayEmbeddings")`.

Contained here:

1. Defines the `Dataset` structure, which is a wrapper of `Vector{SVector}`, used in **DynamicalSystems.jl**.
2. Implements methods for delay coordinates embedding with high performance and many features.
3. Algorithms for estimating optimal delay embedding parameters, the delay time and the number of temporal neighbors (generalization of the "embedding dimension").
4. New, _unified_ algorithms for optimal delay embedding.
All further information is provided in the documentation, which you can either find [online](https://juliadynamics.github.io/DelayEmbeddings.jl/stable/) or build locally by running the `docs/make.jl` file.
18 changes: 18 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ChaosTools = "608a59af-f2a3-5ad4-90b4-758bdf3122a7"
ComplexityMeasures = "ab4b797d-85ee-42ba-b621-05d793b346a2"
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
DelayEmbeddings = "5732040d-69e3-5649-938a-b6b4f237613f"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
DynamicalSystemsBase = "6e36e845-645a-534a-86f2-f5d4aa5a06b4"
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StateSpaceSets = "40b095a5-5852-4c12-98c7-d43bf788e795"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
TimeseriesSurrogates = "c804724b-8c18-5caa-8579-6025a0767c70"
41 changes: 41 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
cd(@__DIR__)

import Downloads
Downloads.download(
"https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/apply_style.jl",
joinpath(@__DIR__, "apply_style.jl")
)
include("apply_style.jl")

using DelayEmbeddings

DelayEmbeddings_PAGES = [
"index.md",
"embed.md",
"separated.md",
"unified.md",
]

makedocs(
modules = [DelayEmbeddings, StateSpaceSets],
format = Documenter.HTML(
prettyurls = CI,
assets = [
asset("https://fonts.googleapis.com/css?family=Montserrat|Source+Code+Pro&display=swap", class=:css),
],
collapselevel = 3,
),
sitename = "DelayEmbeddings.jl",
authors = "George Datseris",
pages = DelayEmbeddings_PAGES,
doctest = false,
draft = false,
)

if CI
deploydocs(
repo = "github.com/JuliaDynamics/DelayEmbeddings.jl.git",
target = "build",
push_preview = true
)
end
Loading

0 comments on commit c6741dd

Please sign in to comment.