Skip to content

Commit 60b17fe

Browse files
committed
Update CI, add docs generation
Also rearrange tests.
1 parent e28ba17 commit 60b17fe

18 files changed

+447
-250
lines changed

.github/dependabot.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CI.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
version:
2828
- '1.6'
2929
- '1'
30-
- 'nightly'
30+
- 'pre'
3131
os:
3232
- ubuntu-latest
3333
arch:
@@ -61,4 +61,19 @@ jobs:
6161
fail_ci_if_error: true
6262
token: ${{ secrets.CODECOV_TOKEN }}
6363
file: lcov.info
64-
64+
docs:
65+
name: Documentation
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: julia-actions/setup-julia@v2
70+
with:
71+
version: '1'
72+
- uses: julia-actions/cache@v2
73+
- uses: julia-actions/julia-buildpkg@v1
74+
- uses: julia-actions/julia-docdeploy@v1
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
# Needed due to https://github.com/JuliaDocs/Documenter.jl/issues/1177
78+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
79+
GKSwstype: 'nul'

.github/workflows/CompatHelper.yml

+33-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,43 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
1342
env:
1443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1544
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Doc Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
# Ensure that only one "Doc Preview Cleanup" workflow is force pushing at a time
8+
concurrency:
9+
group: doc-preview-cleanup
10+
cancel-in-progress: false
11+
12+
jobs:
13+
doc-preview-cleanup:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
steps:
18+
- name: Checkout gh-pages branch
19+
uses: actions/checkout@v4
20+
with:
21+
ref: gh-pages
22+
- name: Delete preview and history + push changes
23+
run: |
24+
if [ -d "${preview_dir}" ]; then
25+
git config user.name "Documenter.jl"
26+
git config user.email "[email protected]"
27+
git rm -rf "${preview_dir}"
28+
git commit -m "delete preview"
29+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
30+
git push --force origin gh-pages-new:gh-pages
31+
fi
32+
env:
33+
preview_dir: previews/PR${{ github.event.number }}

LICENSE LICENSE.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

3-
Copyright (c) 2021-2022 Chad Scherrer <[email protected]>
3+
Copyright (c) 2021-present Chad Scherrer <[email protected]>,
4+
Oliver Schulz <[email protected]> and contributors
45

56
Permission is hereby granted, free of charge, to any person obtaining
67
a copy of this software and associated documentation files (the

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "MeasureBase"
22
uuid = "fa1605e6-acd5-459c-a1e6-7e635759db14"
3-
authors = ["Chad Scherrer <[email protected]> and contributors"]
3+
authors = ["Chad Scherrer <[email protected]>", "Oliver Schulz <[email protected]>", "contributors"]
44
version = "0.14.9"
55

66
[deps]

README.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# MeasureBase
22

3-
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMath.github.io/MeasureTheory.jl/stable)
4-
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMath.github.io/MeasureTheory.jl/dev)
5-
[![Build Status](https://github.com/JuliaMath/MeasureBase.jl/workflows/CI/badge.svg)](https://github.com/JuliaMath/MeasureBase.jl/actions)
6-
[![Coverage](https://codecov.io/gh/JuliaMath/MeasureBase.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaMath/MeasureBase.jl)
3+
[![Documentation for stable version](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaMath.github.io/MeasureBase.jl/stable)
4+
[![Documentation for development version](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaMath.github.io/MeasureBase.jl/dev)
5+
[![License](http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
6+
[![Build Status](https://github.com/JuliaMath/MeasureBase.jl/workflows/CI/badge.svg?branch=main)](https://github.com/JuliaMath/MeasureBase.jl/actions?query=workflow%3ACI)
7+
[![Codecov](https://codecov.io/gh/JuliaMath/MeasureBase.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaMath/MeasureBase.jl)
8+
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
79

8-
This (relatively) light-weight package contains core functionality of [MeasureTheory](https://github.com/JuliaMath/MeasureTheory.jl). Many packages using or defining measures do not need the full capabilities of MeasureTheory.jl itself, and can depend on this instead.
10+
11+
## Documentation
12+
13+
* [Documentation for stable version](https://JuliaMath.github.io/MeasureBase.jl/stable)
14+
* [Documentation for development version](https://JuliaMath.github.io/MeasureBase.jl/dev)
15+
16+
This package contains core definitions for (probability and non-probability) measures.

docs/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
site/

docs/Project.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
4+
5+
[compat]
6+
Documenter = "1"

docs/make.jl

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Use
2+
#
3+
# DOCUMENTER_DEBUG=true julia --color=yes make.jl local [nonstrict] [fixdoctests]
4+
#
5+
# for local builds.
6+
7+
using Documenter
8+
using MeasureBase
9+
10+
# Doctest setup
11+
DocMeta.setdocmeta!(
12+
MeasureBase,
13+
:DocTestSetup,
14+
:(using MeasureBase);
15+
recursive=true,
16+
)
17+
18+
makedocs(
19+
sitename = "MeasureBase",
20+
modules = [MeasureBase],
21+
format = Documenter.HTML(
22+
prettyurls = !("local" in ARGS),
23+
canonical = "https://juliamath.github.io/MeasureBase.jl/stable/"
24+
),
25+
pages = [
26+
"Home" => "index.md",
27+
"API" => "api.md",
28+
"LICENSE" => "LICENSE.md",
29+
],
30+
doctest = ("fixdoctests" in ARGS) ? :fix : true,
31+
linkcheck = !("nonstrict" in ARGS),
32+
warnonly = ("nonstrict" in ARGS),
33+
)
34+
35+
deploydocs(
36+
repo = "github.com/juliamath/MeasureBase.jl.git",
37+
forcepush = true,
38+
push_preview = true,
39+
)

docs/src/LICENSE.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# LICENSE
2+
3+
```@eval
4+
using Markdown
5+
Markdown.parse_file(joinpath(@__DIR__, "..", "..", "LICENSE.md"))
6+
```

docs/src/api.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# API
2+
3+
## Modules
4+
5+
```@index
6+
Order = [:module]
7+
```
8+
9+
## Types and constants
10+
11+
```@index
12+
Order = [:type, :constant]
13+
```
14+
15+
## Functions and macros
16+
17+
```@index
18+
Order = [:macro, :function]
19+
```
20+
21+
# Documentation
22+
23+
```@autodocs
24+
Modules = [MeasureBase]
25+
Order = [:module, :type, :constant, :macro, :function]
26+
```

docs/src/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# MeasureBase.jl
2+
3+
This package contains core definitions for (probability and non-probability) measures.

test/Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
33
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
44
ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
55
DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d"
6+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
67
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
78
InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112"
89
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
910
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10-
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
1111
LogarithmicNumbers = "aa2f6b4e-9042-5d33-9679-40d3a6b85899"
12+
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
1213
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1314
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1415
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"

0 commit comments

Comments
 (0)