Skip to content

Update ci.yml #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions test/factormodel.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading