Skip to content

Commit

Permalink
Merge branch 'master' into StatsBase2021
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Sep 25, 2021
2 parents 0a17953 + 54f9b0d commit 1e5d2a8
Show file tree
Hide file tree
Showing 10 changed files with 2,140 additions and 115 deletions.
28 changes: 28 additions & 0 deletions .ci/test_and_change_uuid.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@static if Base.VERSION >= v"1.6"
using TOML
using Test
else
using Pkg: TOML
using Test
end

# To generate the new UUID, we simply modify the first character of the original UUID
const original_uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
const new_uuid = "20745b16-79ce-11e8-11f9-7d13ad32a3b2"

# `@__DIR__` is the `.ci/` folder.
# Therefore, `dirname(@__DIR__)` is the repository root.
const project_filename = joinpath(dirname(@__DIR__), "Project.toml")

@testset "Test that the UUID is unchanged" begin
project_dict = TOML.parsefile(project_filename)
@test project_dict["uuid"] == original_uuid
end

write(
project_filename,
replace(
read(project_filename, String),
r"uuid = .*?\n" => "uuid = \"$(new_uuid)\"\n",
),
)
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'nightly'
os:
Expand Down Expand Up @@ -41,6 +40,10 @@ jobs:
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
<<<<<<< HEAD
=======
- run: julia --color=yes .ci/test_and_change_uuid.jl
>>>>>>> master
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand All @@ -52,8 +55,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
<<<<<<< HEAD
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
=======
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: julia --project=docs docs/make.jl
>>>>>>> master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
7 changes: 4 additions & 3 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
StatsBase.jl is licensed under the MIT License:
Statistics.jl is licensed under the MIT License:

> Copyright (c) 2012-2016: Dahua Lin, Simon Byrne, Andreas Noack,
> Douglas Bates, John Myles White, Simon Kornblith, and other contributors.
> Copyright (c) 2012-2016: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,
> Dahua Lin, Simon Byrne, Andreas Noack, Douglas Bates, John Myles White,
> Simon Kornblith, and other contributors.
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
Expand Down
28 changes: 4 additions & 24 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,13 @@
name = "StatsBase"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
authors = ["JuliaStats"]
version = "0.33.10"
name = "Statistics"
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[deps]
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SortingAlgorithms = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0"

[compat]
DataAPI = "1"
DataStructures = "0.10, 0.11, 0.12, 0.13, 0.14, 0.17, 0.18"
Missings = "0.3, 0.4, 1.0"
SortingAlgorithms = "0.3, 1.0"
StatsAPI = "1"
julia = "1"

[extras]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Dates", "DelimitedFiles", "StableRNGs", "Test"]
test = ["Random", "Test"]
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
## StatsBase.jl
# Statistics.jl

*StatsBase.jl* is a Julia package that provides basic support for statistics. Particularly, it implements a variety of statistics-related functions, such as scalar statistics, high-order moment computation, counting, ranking, covariances, sampling, and empirical density estimation.
[![Build status](https://github.com/JuliaLang/Statistics.jl/workflows/CI/badge.svg)](https://github.com/JuliaLang/Statistics.jl/actions?query=workflow%3ACI+branch%3Amaster)

- **Build & Testing Status:**
[![Build status](https://github.com/JuliaStats/StatsBase.jl/workflows/CI/badge.svg)](https://github.com/JuliaStats/StatsBase.jl/actions?query=workflow%3ACI+branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/JuliaStats/StatsBase.jl/badge.svg?branch=master)](https://coveralls.io/r/JuliaStats/StatsBase.jl?branch=master)
[![Coverage Status](http://codecov.io/github/JuliaStats/StatsBase.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaStats/StatsBase.jl?branch=master)
Development repository for the Statistics standard library (stdlib) that ships with Julia.

- **Documentation**: [![][docs-stable-img]][docs-stable-url] [![][docs-latest-img]][docs-latest-url]
#### Using the development version of Statistics.jl

[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: http://JuliaStats.github.io/StatsBase.jl/latest/
If you want to develop this package, do the following steps:
- Clone the repo anywhere.
- In line 2 of the `Project.toml` file (the line that begins with `uuid = ...`), modify the UUID, e.g. change the `107` to `207`.
- Change the current directory to the Statistics repo you just cloned and start julia with `julia --project`.
- `import Statistics` will now load the files in the cloned repo instead of the Statistics stdlib.
- To test your changes, simply do `include("test/runtests.jl")`.

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: http://JuliaStats.github.io/StatsBase.jl/stable/
If you need to build Julia from source with a git checkout of Statistics, then instead use `make DEPS_GIT=Statistics` when building Julia. The `Statistics` repo is in `stdlib/Statistics`, and created initially with a detached `HEAD`. If you're doing this from a pre-existing Julia repository, you may need to `make clean` beforehand.
1 change: 0 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"

[compat]
Documenter = "0.24"
32 changes: 8 additions & 24 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
using Documenter, StatsBase, Statistics, Random, LinearAlgebra
using Documenter, Statistics

# Workaround for JuliaLang/julia/pull/28625
if Base.HOME_PROJECT[] !== nothing
Base.HOME_PROJECT[] = abspath(Base.HOME_PROJECT[])
end

makedocs(
sitename = "StatsBase.jl",
modules = [StatsBase],
pages = ["index.md",
"weights.md",
"scalarstats.md",
"robust.md",
"deviation.md",
"cov.md",
"counts.md",
"ranking.md",
"sampling.md",
"empirical.md",
"signalcorr.md",
"multivariate.md",
"misc.md",
"statmodels.md",
"transformations.md"],
strict=true,
checkdocs=:exports
)
modules = [Statistics],
sitename = "Statistics",
pages = Any[
"Statistics" => "index.md"
]
)

deploydocs(
repo = "github.com/JuliaStats/StatsBase.jl.git"
)
deploydocs(repo = "github.com/JuliaLang/Statistics.jl.git")
32 changes: 16 additions & 16 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# StatsBase.jl Documentation

```@meta
CurrentModule = StatsBase
DocTestSetup = quote
using Statistics
using Random
end
```

*StatsBase.jl* is a Julia package that provides basic support for statistics. Particularly, it implements a variety of statistics-related functions, such as scalar statistics, high-order moment computation, counting, ranking, covariances, sampling, and empirical density estimation.
# Statistics

The Statistics standard library module contains basic statistics functionality.

```@contents
Pages = ["weights.md", "scalarstats.md", "robust.md", "deviation.md", "cov.md", "counts.md", "ranking.md", "sampling.md", "empirical.md", "signalcorr.md", "misc.md", "statmodels.md", "transformations.md"]
Depth = 2
```@docs
std
stdm
var
varm
cor
cov
mean!
mean
median!
median
middle
quantile!
quantile
```


Loading

0 comments on commit 1e5d2a8

Please sign in to comment.