diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4e00cd8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "julia" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/jlpkgbutler-butler-workflow.yml b/.github/workflows/jlpkgbutler-butler-workflow.yml deleted file mode 100644 index 70544cc..0000000 --- a/.github/workflows/jlpkgbutler-butler-workflow.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Run the Julia Package Butler - -on: - push: - branches: - - main - - master - schedule: - - cron: '0 */1 * * *' - workflow_dispatch: - -jobs: - butler: - name: "Run Package Butler" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: davidanthoff/julia-pkgbutler@releases/v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - ssh-private-key: ${{ secrets.JLPKGBUTLER_TOKEN }} - channel: stable diff --git a/.github/workflows/jlpkgbutler-ci-master-workflow.yml b/.github/workflows/jlpkgbutler-ci-master-workflow.yml deleted file mode 100644 index e2fafda..0000000 --- a/.github/workflows/jlpkgbutler-ci-master-workflow.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Run CI on main - -on: - push: - branches: - - main - - master - workflow_dispatch: - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: ['1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10'] - julia-arch: [x64, x86] - os: [ubuntu-latest, windows-latest, macOS-latest] - exclude: - - os: macOS-latest - julia-arch: x86 - - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.julia-version }} - arch: ${{ matrix.julia-arch }} - - uses: julia-actions/julia-buildpkg@v1 - env: - PYTHON: "" - - uses: julia-actions/julia-runtest@v1 - env: - PYTHON: "" - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 - with: - files: ./lcov.info - flags: unittests - token: ${{ secrets.CODECOV_TOKEN }} - \ No newline at end of file diff --git a/.github/workflows/jlpkgbutler-ci-pr-workflow.yml b/.github/workflows/jlpkgbutler-ci-pr-workflow.yml deleted file mode 100644 index 8a710b0..0000000 --- a/.github/workflows/jlpkgbutler-ci-pr-workflow.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Run CI on PR - -on: - pull_request: - types: [opened, synchronize, reopened] - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: ['1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10'] - julia-arch: [x64, x86] - os: [ubuntu-latest, windows-latest, macOS-latest] - exclude: - - os: macOS-latest - julia-arch: x86 - - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.julia-version }} - arch: ${{ matrix.julia-arch }} - - uses: julia-actions/julia-buildpkg@v1 - env: - PYTHON: "" - - uses: julia-actions/julia-runtest@v1 - env: - PYTHON: "" - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 - with: - files: ./lcov.info - flags: unittests - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml b/.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml deleted file mode 100644 index 411bed4..0000000 --- a/.github/workflows/jlpkgbutler-codeformat-pr-workflow.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Code Formatting - -on: - push: - branches: - - main - - master - workflow_dispatch: - -jobs: - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/julia-codeformat@releases/v1 - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Format files using DocumentFormat - title: '[AUTO] Format files using DocumentFormat' - body: '[DocumentFormat.jl](https://github.com/julia-vscode/DocumentFormat.jl) would suggest these formatting changes' - labels: no changelog diff --git a/.github/workflows/jlpkgbutler-compathelper-workflow.yml b/.github/workflows/jlpkgbutler-compathelper-workflow.yml deleted file mode 100644 index b315831..0000000 --- a/.github/workflows/jlpkgbutler-compathelper-workflow.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Run CompatHelper - -on: - schedule: - - cron: '00 * * * *' - issues: - types: [opened, reopened] - workflow_dispatch: - -jobs: - CompatHelper: - name: "Run CompatHelper.jl" - 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 }} - run: julia -e 'using CompatHelper; CompatHelper.main()' diff --git a/.github/workflows/jlpkgbutler-docdeploy-workflow.yml b/.github/workflows/jlpkgbutler-docdeploy-workflow.yml deleted file mode 100644 index e517ba1..0000000 --- a/.github/workflows/jlpkgbutler-docdeploy-workflow.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Deploy documentation - -on: - push: - branches: - - main - - master - tags: - - v* - workflow_dispatch: - -jobs: - docdeploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/julia-buildpkg@v1 - env: - PYTHON: "" - - uses: julia-actions/julia-docdeploy@latest - env: - DOCUMENTER_KEY: ${{ secrets.JLPKGBUTLER_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/jlpkgbutler-tagbot-workflow.yml b/.github/workflows/jlpkgbutler-tagbot-workflow.yml deleted file mode 100644 index d3ca956..0000000 --- a/.github/workflows/jlpkgbutler-tagbot-workflow.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: TagBot -on: - issue_comment: - types: - - created - workflow_dispatch: - -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.JLPKGBUTLER_TOKEN }} - branches: true diff --git a/.github/workflows/juliaci.yml b/.github/workflows/juliaci.yml new file mode 100644 index 0000000..6aa24b5 --- /dev/null +++ b/.github/workflows/juliaci.yml @@ -0,0 +1,17 @@ +name: Julia CI + +on: + push: {branches: [main,master]} + pull_request: {types: [opened,synchronize,reopened,ready_for_review,converted_to_draft]} + issue_comment: {types: [created]} + workflow_dispatch: {inputs: {feature: {type: choice, description: What to run, options: [DocDeploy,LintAndTest,TagBot]}}} + +jobs: + julia-ci: + uses: julia-testitems/testitem-workflow/.github/workflows/juliaci.yml@v2 + with: + include-all-compatible-minor-versions: true + include-rc-versions: true + permissions: write-all + secrets: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 369ae03..6a402a8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ deps/build.log *.jl.mem Manifest.toml .vscode +docs/build/ +docs/Manifest.toml +test-output*.* diff --git a/.jlpkgbutler.toml b/.jlpkgbutler.toml deleted file mode 100644 index b72304f..0000000 --- a/.jlpkgbutler.toml +++ /dev/null @@ -1 +0,0 @@ -template = "bach" diff --git a/LICENSE b/LICENSE index 619cf3f..79b994b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2019 Evan Miller, David Anthoff (except where otherwise noted) +Copyright (c) 2013-2026 Evan Miller, David Anthoff (except where otherwise noted) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Project.toml b/Project.toml index 761d41d..55ddab0 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ReadStat" uuid = "d71aba96-b539-5138-91ee-935c3ee1374c" -version = "1.1.2-DEV" +version = "1.2.0-DEV" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" @@ -8,12 +8,13 @@ DataValues = "e7dc6d0d-1eca-5fa6-8ad6-5aecde8b7ea5" ReadStat_jll = "a4dc8951-f1cc-5499-9034-9ec1c3e64557" [extras] +TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] julia = "1.3" -DataValues = "0.4.13" +DataValues = "0.4.13, 0.5, 1" ReadStat_jll = "1.1.1" [targets] -test = ["Test"] +test = ["Test", "TestItemRunner"] diff --git a/README.md b/README.md index 67a3504..49c10e5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # ReadStat [![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) -[![Build Status](https://travis-ci.org/queryverse/ReadStat.jl.svg?branch=master)](https://travis-ci.org/queryverse/ReadStat.jl) -[![Build status](https://ci.appveyor.com/api/projects/status/99xmebpmtcvv7gxw/branch/master?svg=true)](https://ci.appveyor.com/project/queryverse/readstat-jl/branch/master) +[![Build Status](https://github.com/queryverse/ReadStat.jl/actions/workflows/juliaci.yml/badge.svg?branch=main)](https://github.com/queryverse/ReadStat.jl/actions/workflows/juliaci.yml) [![codecov](https://codecov.io/gh/queryverse/ReadStat.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/queryverse/ReadStat.jl) ## Overview diff --git a/docs/Project.toml b/docs/Project.toml index f2a273e..1814eb3 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,4 +2,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] -Documenter = "~0.24" +Documenter = "1" diff --git a/docs/make.jl b/docs/make.jl index 49cd138..5ca06f1 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -3,7 +3,8 @@ using Documenter, ReadStat makedocs( modules = [ReadStat], sitename = "ReadStat.jl", - analytics="UA-132838790-1", + format = Documenter.HTML(analytics = "UA-132838790-1"), + warnonly = [:missing_docs], pages = [ "Introduction" => "index.md" ] diff --git a/test/runtests.jl b/test/runtests.jl index dbc10b0..391ebaa 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,23 +1,5 @@ -using ReadStat -using DataValues -using Test +using TestItemRunner -@testset "ReadStat: $ext files" for (reader, ext) in - ((read_dta, "dta"), - (read_sav, "sav"), - (read_sas7bdat, "sas7bdat"), - (read_xport, "xpt")) +include("test_readstat.jl") - dtafile = joinpath(dirname(@__FILE__), "types.$ext") - rsdf = reader(dtafile) - data = rsdf.data - - @test length(data) == 6 - @test rsdf.headers == [:vfloat, :vdouble, :vlong, :vint, :vbyte, :vstring] - @test data[1] == DataValueArray{Float32}([3.14, 7., NA]) - @test data[2] == DataValueArray{Float64}([3.14, 7., NA]) - @test data[3] == DataValueArray{Int32}([2, 7, NA]) - @test data[4] == DataValueArray{Int16}([2, 7, NA]) - @test data[5] == DataValueArray{Int8}([2, 7., NA]) - @test data[6] == DataValueArray{String}(["2", "7", ""]) -end +@run_package_tests diff --git a/test/test_readstat.jl b/test/test_readstat.jl new file mode 100644 index 0000000..f5a041f --- /dev/null +++ b/test/test_readstat.jl @@ -0,0 +1,23 @@ +@testitem "ReadStat" begin + using DataValues + + @testset "ReadStat: $ext files" for (reader, ext) in + ((read_dta, "dta"), + (read_sav, "sav"), + (read_sas7bdat, "sas7bdat"), + (read_xport, "xpt")) + + dtafile = joinpath(@__DIR__, "types.$ext") + rsdf = reader(dtafile) + data = rsdf.data + + @test length(data) == 6 + @test rsdf.headers == [:vfloat, :vdouble, :vlong, :vint, :vbyte, :vstring] + @test data[1] == DataValueArray{Float32}([3.14, 7., NA]) + @test data[2] == DataValueArray{Float64}([3.14, 7., NA]) + @test data[3] == DataValueArray{Int32}([2, 7, NA]) + @test data[4] == DataValueArray{Int16}([2, 7, NA]) + @test data[5] == DataValueArray{Int8}([2, 7., NA]) + @test data[6] == DataValueArray{String}(["2", "7", ""]) + end +end