diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..9c3da47 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "monthly" + - package-ecosystem: "julia" + directories: # Location of Julia projects + - "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml deleted file mode 100644 index 2876f03..0000000 --- a/.github/workflows/CompatHelper.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: CompatHelper -on: - schedule: - - cron: '00 00 * * *' - workflow_dispatch: -jobs: - CompatHelper: - runs-on: ubuntu-latest - steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # optional - run: julia -e 'using CompatHelper; CompatHelper.main()' \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4517f31..f8d86d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,20 +17,19 @@ jobs: fail-fast: false matrix: version: - - '1.6' - - '1.10' + - 'lts' - '1' os: - ubuntu-latest arch: - x64 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v7 + - uses: julia-actions/setup-julia@v3 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 + - uses: julia-actions/cache@v3 env: cache-name: cache-artifacts with: @@ -43,6 +42,6 @@ jobs: - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v7 with: file: lcov.info diff --git a/Project.toml b/Project.toml index 583cf77..d6dea97 100644 --- a/Project.toml +++ b/Project.toml @@ -1,14 +1,14 @@ name = "StatisticalTraits" uuid = "64bff920-2084-43da-a3e6-9bb72801c0c9" authors = ["Anthony D. Blaom "] -version = "3.5.0" +version = "3.6.0" [deps] ScientificTypesBase = "30f210dd-8aff-4c5f-94ba-8e64358c1161" [compat] ScientificTypesBase = "1, 2, 3" -julia = "1.6" +julia = "1.10" [extras] REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" diff --git a/README.md b/README.md index 1fb19e8..dfc6f6c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ | Linux | Coverage | | :-----------: | :------: | -| [![Build status](https://github.com/JuliaAI/StatisticalTraits.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/StatisticalTraits.jl/actions)| [![codecov](https://codecov.io/gh/JuliaAI/StatisticalTraits.jl/branch/master/graph/badge.svg?token=rh6HnyIKc1)](https://codecov.io/gh/JuliaAI/StatisticalTraits.jl) | +| [![Build status](https://github.com/JuliaAI/StatisticalTraits.jl/workflows/CI/badge.svg)](https://github.com/JuliaAI/StatisticalTraits.jl/actions)| [![codecov](https://codecov.io/gh/JuliaAI/StatisticalTraits.jl/graph/badge.svg?token=rnWBkGwcMy)](https://codecov.io/gh/JuliaAI/StatisticalTraits.jl) | A light-weight package defining fall-back implementations for a collection of traits possessed by statistical objects. Here a "trait" diff --git a/src/StatisticalTraits.jl b/src/StatisticalTraits.jl index 4cb830b..bfe61b2 100644 --- a/src/StatisticalTraits.jl +++ b/src/StatisticalTraits.jl @@ -89,10 +89,8 @@ returns `:Machine`. Where this does not make sense (eg, instances of """ function typename(M) - if isdefined(M, :name) - return M.name.name - elseif isdefined(M, :body) - return typename(M.body) + if M isa DataType || M isa UnionAll + return nameof(M) else return Symbol(string(M)) end