Skip to content

Commit 1e5d2a8

Browse files
committed
Merge branch 'master' into StatsBase2021
2 parents 0a17953 + 54f9b0d commit 1e5d2a8

File tree

10 files changed

+2140
-115
lines changed

10 files changed

+2140
-115
lines changed

.ci/test_and_change_uuid.jl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@static if Base.VERSION >= v"1.6"
2+
using TOML
3+
using Test
4+
else
5+
using Pkg: TOML
6+
using Test
7+
end
8+
9+
# To generate the new UUID, we simply modify the first character of the original UUID
10+
const original_uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
11+
const new_uuid = "20745b16-79ce-11e8-11f9-7d13ad32a3b2"
12+
13+
# `@__DIR__` is the `.ci/` folder.
14+
# Therefore, `dirname(@__DIR__)` is the repository root.
15+
const project_filename = joinpath(dirname(@__DIR__), "Project.toml")
16+
17+
@testset "Test that the UUID is unchanged" begin
18+
project_dict = TOML.parsefile(project_filename)
19+
@test project_dict["uuid"] == original_uuid
20+
end
21+
22+
write(
23+
project_filename,
24+
replace(
25+
read(project_filename, String),
26+
r"uuid = .*?\n" => "uuid = \"$(new_uuid)\"\n",
27+
),
28+
)

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
version:
15-
- '1.0'
1615
- '1' # automatically expands to the latest stable 1.x release of Julia
1716
- 'nightly'
1817
os:
@@ -41,6 +40,10 @@ jobs:
4140
${{ runner.os }}-test-${{ env.cache-name }}-
4241
${{ runner.os }}-test-
4342
${{ runner.os }}-
43+
<<<<<<< HEAD
44+
=======
45+
- run: julia --color=yes .ci/test_and_change_uuid.jl
46+
>>>>>>> master
4447
- uses: julia-actions/julia-buildpkg@v1
4548
- uses: julia-actions/julia-runtest@v1
4649
- uses: julia-actions/julia-processcoverage@v1
@@ -52,8 +55,20 @@ jobs:
5255
runs-on: ubuntu-latest
5356
steps:
5457
- uses: actions/checkout@v2
58+
<<<<<<< HEAD
5559
- uses: julia-actions/julia-buildpkg@latest
5660
- uses: julia-actions/julia-docdeploy@latest
61+
=======
62+
- uses: julia-actions/setup-julia@v1
63+
with:
64+
version: '1'
65+
- run: |
66+
julia --project=docs -e '
67+
using Pkg
68+
Pkg.develop(PackageSpec(path=pwd()))
69+
Pkg.instantiate()'
70+
- run: julia --project=docs docs/make.jl
71+
>>>>>>> master
5772
env:
5873
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5974
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

LICENSE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
StatsBase.jl is licensed under the MIT License:
1+
Statistics.jl is licensed under the MIT License:
22

3-
> Copyright (c) 2012-2016: Dahua Lin, Simon Byrne, Andreas Noack,
4-
> Douglas Bates, John Myles White, Simon Kornblith, and other contributors.
3+
> Copyright (c) 2012-2016: Jeff Bezanson, Stefan Karpinski, Viral B. Shah,
4+
> Dahua Lin, Simon Byrne, Andreas Noack, Douglas Bates, John Myles White,
5+
> Simon Kornblith, and other contributors.
56
67
> Permission is hereby granted, free of charge, to any person obtaining
78
> a copy of this software and associated documentation files (the

Project.toml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,13 @@
1-
name = "StatsBase"
2-
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
3-
authors = ["JuliaStats"]
4-
version = "0.33.10"
1+
name = "Statistics"
2+
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
53

64
[deps]
7-
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
8-
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
95
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10-
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
11-
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
12-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
13-
SortingAlgorithms = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
146
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
15-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
16-
StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
17-
18-
[compat]
19-
DataAPI = "1"
20-
DataStructures = "0.10, 0.11, 0.12, 0.13, 0.14, 0.17, 0.18"
21-
Missings = "0.3, 0.4, 1.0"
22-
SortingAlgorithms = "0.3, 1.0"
23-
StatsAPI = "1"
24-
julia = "1"
257

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

3212
[targets]
33-
test = ["Dates", "DelimitedFiles", "StableRNGs", "Test"]
13+
test = ["Random", "Test"]

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
## StatsBase.jl
1+
# Statistics.jl
22

3-
*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.
3+
[![Build status](https://github.com/JuliaLang/Statistics.jl/workflows/CI/badge.svg)](https://github.com/JuliaLang/Statistics.jl/actions?query=workflow%3ACI+branch%3Amaster)
44

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

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

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

15-
[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
16-
[docs-stable-url]: http://JuliaStats.github.io/StatsBase.jl/stable/
16+
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.

docs/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3-
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
43

54
[compat]
65
Documenter = "0.24"

docs/make.jl

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
1-
using Documenter, StatsBase, Statistics, Random, LinearAlgebra
1+
using Documenter, Statistics
22

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

88
makedocs(
9-
sitename = "StatsBase.jl",
10-
modules = [StatsBase],
11-
pages = ["index.md",
12-
"weights.md",
13-
"scalarstats.md",
14-
"robust.md",
15-
"deviation.md",
16-
"cov.md",
17-
"counts.md",
18-
"ranking.md",
19-
"sampling.md",
20-
"empirical.md",
21-
"signalcorr.md",
22-
"multivariate.md",
23-
"misc.md",
24-
"statmodels.md",
25-
"transformations.md"],
26-
strict=true,
27-
checkdocs=:exports
28-
)
9+
modules = [Statistics],
10+
sitename = "Statistics",
11+
pages = Any[
12+
"Statistics" => "index.md"
13+
]
14+
)
2915

30-
deploydocs(
31-
repo = "github.com/JuliaStats/StatsBase.jl.git"
32-
)
16+
deploydocs(repo = "github.com/JuliaLang/Statistics.jl.git")

docs/src/index.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# StatsBase.jl Documentation
2-
3-
```@meta
4-
CurrentModule = StatsBase
5-
DocTestSetup = quote
6-
using Statistics
7-
using Random
8-
end
9-
```
10-
11-
*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.
1+
# Statistics
122

3+
The Statistics standard library module contains basic statistics functionality.
134

14-
```@contents
15-
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"]
16-
Depth = 2
5+
```@docs
6+
std
7+
stdm
8+
var
9+
varm
10+
cor
11+
cov
12+
mean!
13+
mean
14+
median!
15+
median
16+
middle
17+
quantile!
18+
quantile
1719
```
18-
19-

0 commit comments

Comments
 (0)