Skip to content

Commit

Permalink
Tagbot update (#156)
Browse files Browse the repository at this point in the history
* Update tagbot

* Move from Travis to github actions

* Update make.jl

* Syntax change: Truncated(..) to truncated(..)

* Documentation updates, move to html-based

* Update CompatHelper

* Structure tests better

* Update syntax

* Fix test

* Update CI

* Fix typo

* Update README.md

* Update tests and update message

* Update docs
  • Loading branch information
kahaaga authored Feb 16, 2021
1 parent 7eb2104 commit 421a576
Show file tree
Hide file tree
Showing 47 changed files with 445 additions and 247 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
name: CompatHelper

on:
schedule:
- cron: '00 * * * *'

- cron: '00 00 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.2.0]
julia-arch: [x86]
os: [ubuntu-latest]
CompatHelper:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
7 changes: 6 additions & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: TagBot
on:
issue_comment: # THIS BIT IS NEW
types:
- created
schedule:
- cron: 0 * * * *
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
- uses: JuliaRegistries/TagBot@v1.10.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
jobs:
test:
name: Tests, Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # 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'.
os:
- ubuntu-latest
arch:
- x64

steps:
# Cancel ongoing CI test runs if pushing to branch again before the previous tests
# have finished
- name: Cancel ongoing test runs for previous commits
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

# Do tests
- uses: actions/checkout@v2
- 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/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info

docs:
name: Documentation
runs-on: ubuntu-latest
steps:
# Cancel ongoing documentation build if pushing to branch again before the previous
# build is finished.
- name: Cancel ongoing documentation builds for previous commits
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

# Build docs
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- name: Install dependencies
run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- name: Generate documentation and deploy
env: # needed for pushing to gh-pages branch
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run:
julia --project=docs docs/make.jl
- name: Doctests
run: |
julia --project=docs -e '
using Documenter: doctest
using UncertainData
doctest(UncertainData)'
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "UncertainData"
uuid = "dcd9ba68-c27b-5cea-ae21-829cd07325bf"
authors = ["Kristian Agasøster Haaga <[email protected]>"]
repo = "https://github.com/kahaaga/UncertainData.jl.git"
version = "0.10.3"
version = "0.10.4"

[deps]
Bootstrap = "e28b5b4c-05e8-5b66-bc03-6f0c0a0a06e0"
Expand All @@ -26,20 +26,20 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
[compat]
Bootstrap = "^2.2"
Combinatorics = "^0.7.0, ^1"
Distributions = "0.21, 1, 0.23"
Distributions = "0.21, 1, 0.23, 0.24"
DocumenterTools = "^0.1, ^1"
DynamicalSystemsBase = "^1.3"
HypothesisTests = "0.8, 1, 0.10"
Interpolations = "^0.12, ^1"
Interpolations = "^0.12, ^1, 0.13"
IntervalArithmetic = "^0.16, ^1, 0.17"
KernelDensity = "^0.5.0, ^1"
KernelDensity = "^0.5.0, ^1, 0.6"
Measurements = "^2.1"
RecipesBase = "^0.7, ^1, 0.8"
Reexport = "^0.2, ^1"
StaticArrays = "^0.11.0, ^1"
StaticArrays = "^0.11.0, ^1, 0.12"
StatsBase = "^0.32.0, ^1, 0.33"
Unitful = "^0.17.0, ^1, 0.18"
julia = "^1.1"
julia = "^1.2"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![Build Status](https://travis-ci.com/kahaaga/UncertainData.jl.svg?branch=master)](https://travis-ci.com/kahaaga/UncertainData.jl) [![DOI](https://joss.theoj.org/papers/10.21105/joss.01666/status.svg)](https://doi.org/10.21105/joss.01666) [![DOI](https://zenodo.org/badge/160108056.svg)](https://zenodo.org/badge/latestdoi/160108056)

[![CI](https://github.com/kahaaga/UncertainData.jl/workflows/CI/badge.svg)](https://github.com/kahaaga/UncertainData.jl/actions)
[![](https://img.shields.io/badge/docs-latest_tagged-blue.svg)](https://kahaaga.github.io/UncertainData.jl/stable/)
[![](https://img.shields.io/badge/docs-dev_(master)-blue.svg)](https://kahaaga.github.io/UncertainData.jl/dev/)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.01666/status.svg)](https://doi.org/10.21105/joss.01666)
[![DOI](https://zenodo.org/badge/160108056.svg)](https://zenodo.org/badge/latestdoi/160108056)

# UncertainData.jl

Expand Down
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Expand Down
42 changes: 27 additions & 15 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@

cd(@__DIR__)
using Pkg
CI = get(ENV, "CI", nothing) == "true" || get(ENV, "GITHUB_TOKEN", nothing) !== nothing
CI && Pkg.activate(@__DIR__)
CI && Pkg.instantiate()
CI && (ENV["GKSwstype"] = "100")
using Documenter
using DocumenterTools
using DocumenterMarkdown

using UncertainData
using Distributions
using KernelDensity
Expand All @@ -11,22 +18,22 @@ using Interpolations
PAGES = [
"index.md",
"Uncertain values" => [
"uncertain_values/uncertainvalues_examples.md",
"uncertain_values/uncertainvalues_overview.md",
"uncertain_values/uncertainvalues_theoreticaldistributions.md",
"uncertain_values/uncertainvalues_kde.md",
"uncertain_values/uncertainvalues_fitted.md",
"uncertain_values/uncertainvalues_theoreticaldistributions.md",
"uncertain_values/uncertainvalues_certainvalue.md",
"uncertain_values/uncertainvalues_populations.md",
"uncertain_values/uncertainvalues_Measurements.md",
"uncertain_values/merging.md"
"uncertain_values/merging.md",
"uncertain_values/uncertainvalues_examples.md",
],
"Uncertain datasets" => [
"uncertain_datasets/uncertain_datasets_overview.md",
"uncertain_datasets/uncertain_index_dataset.md",
"uncertain_datasets/uncertain_value_dataset.md",
"uncertain_datasets/uncertain_indexvalue_dataset.md",
"uncertain_datasets/uncertain_dataset.md",
"uncertain_datasets/uncertain_indexvalue_dataset.md"
],
"Uncertain statistics" => [
"Core statistics" => [
Expand All @@ -52,10 +59,7 @@ PAGES = [
],
"Sampling constraints" => [
"sampling_constraints/available_constraints.md",

"sampling_constraints/constrain_uncertain_values.md",

"sampling_constraints/ordered_sequence_exists.md",
"sampling_constraints/sequential_constraints.md"
],

Expand Down Expand Up @@ -106,19 +110,27 @@ PAGES = [
"citing.md"
]


# %% Build docs
#PyPlot.ioff()
cd(@__DIR__)
ENV["JULIA_DEBUG"] = "Documenter"


makedocs(
modules = [UncertainData],
sitename = "UncertainData.jl documentation",
format = Markdown(),
format = format = Documenter.HTML(
prettyurls = CI,
),
pages = PAGES
)

if !Sys.iswindows()

if CI
deploydocs(
deps = Deps.pip("mkdocs==0.17.5", "mkdocs-material==2.9.4",
"python-markdown-math", "pygments", "pymdown-extensions"),
repo = "github.com/kahaaga/UncertainData.jl.git",
target = "site",
make = () -> run(`mkdocs build`)
repo = "github.com/kahaaga/UncertainData.jl.git",
target = "build",
push_preview = true
)
end
10 changes: 10 additions & 0 deletions docs/src/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@

# Changelog

## UncertainData.jl v0.10.4

### Documentation

- Changed to regular documentation template.

### Bug fixes

- Fixed type error for test.

## UncertainData.jl v0.10.3

### Improvements
Expand Down
3 changes: 3 additions & 0 deletions docs/src/citing.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Citing

If you use UncertainData.jl for any of your projects or scientific publications, please cite [this small Journal of Open Source Software (JOSS) publication](https://joss.theoj.org/papers/10.21105/joss.01666) as follows

> Haaga, (2019). UncertainData.jl: a Julia package for working with measurements and datasets with uncertainties.. Journal of Open Source Software, 4(43), 1666, https://doi.org/10.21105/joss.01666
2 changes: 1 addition & 1 deletion docs/src/implementing_algorithms_for_uncertaindata.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Extending existing algorithms for uncertain data types
# Extending existing algorithms for uncertain data types

Do you already have an algorithm computing some statistic that you want to obtain uncertainty estimates for? Simply use Julia's multiple dispatch and create a version of the algorithm function that accepts the `AbstractUncertainValue` and `AbstractUncertainDataset` types, along with a `SamplingConstraints` specifying how the uncertain values are should be resampled.

Expand Down
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ It makes workflows involving uncertain data of
[different types](uncertain_values/uncertainvalues_overview.md)
and from different sources significantly easier.

![](tutorials/imgs/BinnedResampling.svg)

## Package philosophy

Way too often in data analysis the uncertainties in observational data are ignored or not
Expand Down
1 change: 1 addition & 0 deletions docs/src/publications.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Publications/software

## Scientific papers

Expand Down
5 changes: 3 additions & 2 deletions docs/src/resampling/resampling_inplace.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# In-place resampling

```@docs
```@docs
resample!
```
```
1 change: 1 addition & 0 deletions docs/src/resampling/resampling_overview.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Overview

[Uncertain values](../uncertain_values/uncertainvalues_overview.md)
are trivially resampled by drawing random numbers from their furnishing distributions/populations.
Expand Down
9 changes: 4 additions & 5 deletions docs/src/resampling/resampling_uncertain_datasets.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# `UncertainDataset`

Collections of uncertain values are resampled by element-wise sampling the
furnishing distributions of the uncertain values in the collection. You may sample the collection as it is, or apply [sampling constraints](../sampling_constraints/available_constraints.md) that limit the
support of the individual data value distributions.

# Method documentation

The following methods will work for any collection type included in the [`UVAL_COLLECTION_TYPES`](@ref) type union.

## Single realisation
Expand Down Expand Up @@ -47,9 +46,9 @@ resample(::UVAL_COLLECTION_TYPES, ::SamplingConstraint, ::Int)
resample(x::UVAL_COLLECTION_TYPES, constraint::Vector{<:SamplingConstraint}, n::Int)
```

# Examples
## Examples

## Resampling with sampling constraints
### Resampling with sampling constraints

Consider the following example where we had a bunch of different measurements.

Expand Down Expand Up @@ -119,7 +118,7 @@ This produces the following plot:

![](resampling_uncertain_datasets.png)

## What happens when applying invalid constraints to a dataset?
### What happens when applying invalid constraints to a dataset?

In the example above, the resampling worked fine because all the constraints were
applicable to the data. However, it could happen that the constraint is not applicable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# `UncertainIndexValueDataset`

Resampling `UncertainIndexValueDataset`s is done in the same manner as for uncertain
values and `UncertainDatasets`.

Expand Down
Loading

0 comments on commit 421a576

Please sign in to comment.