Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Jan 22, 2024
1 parent d9de571 commit 86ca73f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,20 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@latest
- run: |
git config --global user.name Tester
git config --global user.email te@st.er
- uses: julia-actions/julia-runtest@latest
continue-on-error: ${{ matrix.version == 'nightly' }}

- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info
4 changes: 4 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://github.com/JuliaRegistries/TagBot
name: TagBot
on:
issue_comment:
Expand All @@ -12,3 +13,6 @@ jobs:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
ssh: ${{ secrets.DOCUMENTER_KEY }}
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}
2 changes: 1 addition & 1 deletion src/Dist/logLogistic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ end


function fit_logLogistic(x::AbstractVector)
x2 = x[.!isnan(x)] |> sort
x2 = x[.!isnan.(x)] |> sort
beta = pwm(x2, 0.0, 0.0, 0)
params = _fit_logLogistic(beta)
params
Expand Down
7 changes: 5 additions & 2 deletions src/main_spei.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""
spei(x::AbstractVector)
"""
function spei(x::AbstractVector)
x2 = x[.!isnan(x)] |> sort
x2 = x[.!isnan.(x)] |> sort
beta = pwm(x2, 0.0, 0.0, 0)
params = _fit_logLogistic(beta)

Expand All @@ -23,7 +26,7 @@ end
+ `mle`: maximum likelihood estimation, julia solver
"""
function spi(x::AbstractVector; fit="lmom")
x2 = x[.!isnan(x)]
x2 = x[.!isnan.(x)]
x_nozero = x2[x2.>0]
q = 1 - length(x_nozero) / length(x2) # probability of zero

Expand Down

0 comments on commit 86ca73f

Please sign in to comment.