diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd0b2cf..f386c08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,27 +7,30 @@ on: branches: - master tags: '*' + workflow_dispatch: jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.version == 'nightly' }} strategy: fail-fast: false matrix: version: - - '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'. - - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. + - '1.9' + - '1' + # - 'nightly' os: - ubuntu-latest arch: - x64 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + - uses: actions/cache@v4 env: cache-name: cache-artifacts with: @@ -40,6 +43,28 @@ 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@v5 with: - file: lcov.info + files: lcov.info +# docs: +# name: Documentation +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: julia-actions/setup-julia@v2 +# with: +# version: '1' +# - run: | +# julia --project=docs -e ' +# using Pkg +# Pkg.develop(PackageSpec(path=pwd())) +# Pkg.instantiate()' +# - run: | +# julia --project=docs -e ' +# using Documenter: doctest +# using ForwardDiff +# doctest(ForwardDiff)' +# - run: julia --project=docs docs/make.jl +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/Project.toml b/Project.toml index 6ff8d04..b48a9be 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "InteractiveFixedEffectModels" uuid = "80307280-efb2-5c5d-af8b-a9c15821677b" -version = "1.2.2" +version = "1.3.0" [deps] DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" @@ -23,7 +23,7 @@ Vcov = "ec2bfdc2-55df-4fc9-b9ae-4958c2cf2486" [compat] DataFrames = "0.21, 0.22, 1" FillArrays = "0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 1" -FixedEffectModels = "1.5" +FixedEffectModels = "1.11" FixedEffects = "2" GroupedArrays = "0.3" LeastSquaresOptim = "0.7, 0.8" @@ -34,7 +34,7 @@ StatsModels = "0.7" StatsFuns = "0.9, 1" Tables = "1" Vcov = "0.8" -julia = "1.6" +julia = "1.9" [extras] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/README.md b/README.md index de4f697..6e3251e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.com/FixedEffects/InteractiveFixedEffectModels.jl.svg?branch=master)](https://travis-ci.com/FixedEffects/InteractiveFixedEffectModels.jl) +[![Build status](https://github.com/matthieugomez/InteractiveFixedEffectModels.jl/workflows/CI/badge.svg)](https://github.com/matthieugomez/InteractiveFixedEffectModels.jl/actions) [![Coverage Status](https://coveralls.io/repos/matthieugomez/InteractiveFixedEffectModels.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/matthieugomez/InteractiveFixedEffectModels.jl?branch=master) ## Installation diff --git a/test/factormodel.jl b/test/factormodel.jl index 5375bf9..58271d8 100644 --- a/test/factormodel.jl +++ b/test/factormodel.jl @@ -1,36 +1,36 @@ using DataFrames, InteractiveFixedEffectModels,Test, CSV -df = df = DataFrame(CSV.File(joinpath(dirname(pathof(InteractiveFixedEffectModels)), "../dataset/Cigar.csv"))) +df = DataFrame(CSV.File(joinpath(dirname(pathof(InteractiveFixedEffectModels)), "../dataset/Cigar.csv"))) for method in [:gauss_seidel, :dogleg, :levenberg_marquardt] println(method) model = @formula Sales ~ 0 + ife(State, Year, 1) - result = regife(df, model, method = method, maxiter = 10_000) + result = regife(df, model, method = method, maxiter = 10_000, save = true) @test abs(result.augmentdf[1, :factors1]) ≈ 0.18662770198472406 atol = 1e-1 @test abs(result.augmentdf[1, :loadings1]) ≈ 587.2272 atol = 1e-1 @test result.augmentdf[1, :residuals] ≈ - 15.6928 atol = 1e-1 model = @formula Sales ~ 0 + ife(State, Year, 2) - result = regife(df, model, method = method, maxiter = 10_000) + result = regife(df, model, method = method, maxiter = 10_000, save = true) @test abs(result.augmentdf[1, :factors1]) ≈ 0.18662770198472406 atol = 1e-1 @test abs(result.augmentdf[1, :loadings1]) ≈ 587.227 atol = 1e-1 @test result.augmentdf[1, :residuals] ≈ 2.16611 atol = 1e-1 model = @formula Sales ~ ife(State, Year, 1) + fe(State) - result = regife(df, model, method = method, maxiter = 10_000) + result = regife(df, model, method = method, maxiter = 10_000, save = true) @test abs(result.augmentdf[1, :factors1]) ≈ 0.17636 atol = 1e-1 @test abs(result.augmentdf[1, :loadings1]) ≈ 20.176432452716522 atol = 1e-1 @test result.augmentdf[1, :residuals] ≈ - 10.0181 atol = 1e-1 @test result.augmentdf[1, :fe_State] ≈ 107.4766 atol = 1e-1 model = @formula Sales ~ ife(State, Year, 2) + fe(State) - result = regife(df, model, method = method, maxiter = 10_000) + result = regife(df, model, method = method, maxiter = 10_000, save = true) @test abs(result.augmentdf[1, :factors2]) ≈ 0.244 atol = 1e-1 @test abs(result.augmentdf[1, :loadings2]) ≈ 49.7943 atol = 1e-1 @test result.augmentdf[1, :residuals] ≈ 2.165319 atol = 1e-1 @test result.augmentdf[1, :fe_State] ≈ 107.47666 atol = 1e-1 model = @formula Sales ~ ife(State, Year, 2) + fe(State) - result = regife(df, model, subset = df.State .<= 30, method = method, maxiter = 10_000) + result = regife(df, model, subset = df.State .<= 30, method = method, maxiter = 10_000, save = true) @test size(result.augmentdf, 1) == size(df, 1) @test abs(result.augmentdf[1, :factors1]) ≈ 0.20215 atol = 1e-1 @test abs(result.augmentdf[1, :loadings1]) ≈ 29.546 atol = 1e-1