Skip to content

Commit

Permalink
docs generation (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar committed Jan 3, 2024
1 parent 631ed57 commit 2d9c7d4
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 38 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
- '1'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v3
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@v3
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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 -e '
using Documenter: doctest
using IteratorSampling
doctest(IteratorSampling)'
- run: julia --project=./docs ./docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

37 changes: 0 additions & 37 deletions .github/workflows/tests.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# IteratorSampling.jl

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://tortar.github.io/IteratorSampling.jl/stable)
[![codecov](https://codecov.io/github/Tortar/IteratorSampling.jl/graph/badge.svg?token=F8W0MC53Z0)](https://codecov.io/github/Tortar/IteratorSampling.jl)

This package allows to sample from any iterable in a single pass through the data,
Expand Down Expand Up @@ -40,4 +41,4 @@ BenchmarkTools.Trial: 648 samples with 1 evaluation.
6.82 ms Histogram: log(frequency) by time 8.35 ms <

Memory estimate: 78.22 KiB, allocs estimate: 4.
```
```
4 changes: 4 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
IteratorSampling = "ef79a3d2-ae9f-5cd2-ab61-e13847810a6e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4 changes: 4 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using Documenter
using IteratorSampling

makedocs(sitename="IteratorSampling docs")
5 changes: 5 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
```@docs
itsample
reservoir_sample
sortedindices_sample
```

0 comments on commit 2d9c7d4

Please sign in to comment.