Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
350 changes: 350 additions & 0 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Renovate

on:
schedule:
- cron: '7 15 * * *'
workflow_dispatch:
inputs:
logLevel:
description: Renovate log level
default: info

concurrency:
group: renovate
cancel-in-progress: false

permissions:
contents: read

jobs:
renovate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Run Renovate
uses: renovatebot/github-action@v46.3.7
with:
configurationFile: config.js
token: ${{ secrets.RENOVATE_TOKEN }}
env:
LOG_LEVEL: ${{ inputs.logLevel || 'info' }}
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# .github
Organisation profile and shared Renovate preset for go-scikit

Shared defaults for this organisation.

`default.json` is the Renovate preset every repository here extends with
`{"extends": ["github>go-scikit/.github"]}`. `config.js` and
`.github/workflows/renovate.yml` run Renovate for this organisation only, with
the `RENOVATE_TOKEN` secret.

Minor and patch Go dependency updates merge themselves once the tests pass.
**The Go toolchain does not.** `go1.27.0` miscompiles on loong64
([golang/go#81000](https://github.com/golang/go/issues/81000), bisected on real
hardware to `3fdac6780b`), and a repository without a loong64 lane sees nothing
wrong with the bump. A library that breaks is one library; a toolchain that
breaks is every architecture at once.

`profile/README.md` is the organisation's public profile.
39 changes: 39 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Renovate for this organisation, and only this one.
//
// One organisation is a few repositories, so a run never comes near the five
// thousand API requests an hour a token has. A shared runner over hundreds of
// organisations does, and then it walks the list in the same order every time
// and the tail is never reached — silently, while the head keeps producing
// pull requests and the whole thing looks like it works. That is why this is
// here rather than in a fleet-wide runner.
//
// Each repository extends default.json beside this file, which is where the
// policy lives.
module.exports = {
platform: 'github',
// The account blocks pushes that expose a non-noreply email, and Renovate's
// default author is bot@renovateapp.com. Left alone, every branch push is
// rejected and the run still reports success.
gitAuthor: 'tannevaled <tannevaled@users.noreply.github.com>',
autodiscover: true,
autodiscoverFilter: ['go-scikit/**'],
onboarding: false,
requireConfig: 'optional',
dependencyDashboard: true,
repositoryCache: 'enabled',
// default.json beside this file is a PRESET, and a preset reaches a
// repository only through an `extends` that names it. Sitting in the
// organisation applies it to nothing: with onboarding:false and
// requireConfig:'optional', a repository carrying no config file runs on
// Renovate's factory defaults and says so only at debug level --
// "No renovate config file found". Measured 2026-09-03: 77 of the 835
// repositories across the 117 organisations that run Renovate were in that
// state, so the Go toolchain guard in default.json had never been in force
// on any of them.
inheritConfig: true,
inheritConfigRepoName: '{{parentOrg}}/.github',
inheritConfigFileName: 'default.json',
// Loud when absent. Left at its default of false, Renovate proceeds silently
// when the file is missing -- the same failure, one level up.
inheritConfigStrict: true,
};
40 changes: 40 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":semanticCommits"
],
"postUpdateOptions": [
"gomodTidy",
"gomodUpdateImportPaths"
],
"packageRules": [
{
"description": [
"One pull request per repository for everything non-breaking, rather than one per dependency. Merging them singly means every merge rebases the others and restarts their checks: one run over an organisation of 34 repositories updated 109 branches and merged 2. Grouped, a repository needs one round of checks instead of dozens."
],
"matchUpdateTypes": [
"minor",
"patch",
"digest"
],
"groupName": "dependencies",
"groupSlug": "deps",
"automerge": true
},
{
"description": [
"Never auto-merge the Go toolchain, and never let it ride in somebody else's group. A rule that says automerge:false for one dependency is defeated by grouping, because Renovate decides automerge per BRANCH: go 1.27.0 rode into seven repositories inside a branch called renovate/github-actions, whose other dependency was actions/setup-go. Ungrouped, it gets a branch of its own and this setting governs it. It matters because go1.27.0 miscompiles on loong64 (golang/go#81000, bisected on real hardware to 3fdac6780b): go-gfx/gfx fails that lane and stayed open only because the lane failed, which is the CI gate holding rather than this rule. A repository without such a lane sees nothing."
],
"matchManagers": [
"gomod",
"github-actions"
],
"matchDepNames": [
"go"
],
"automerge": false,
"groupName": null
}
]
}
100 changes: 100 additions & 0 deletions profile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<p align="center"><img src="https://raw.githubusercontent.com/go-scikit/brand/main/social/go-scikit.png" alt="go-scikit" width="720"></p>

# go-scikit

🌐 **[Website](https://go-scikit.github.io)**

**The scientific stack for Go, in pure Go (CGO=0): N-dimensional arrays, FFTs, numerical methods, statistics, labelled tables, figures and notebooks.**

go-scikit is the umbrella over seven organisations. Each is a library, or a
few, with its own site, documentation and release cycle; together they cover
what a Python notebook reaches for in NumPy, SciPy, pandas and matplotlib. No
cgo and no C libraries: one `go build` gives a static binary, and it
cross-compiles like any other Go program. Where a library is slower or less accurate than its
Python reference, its documentation says so.

## The organisations

| Organisation | What it is | Site | Docs |
|---|---|---|---|
| [**go-ndarray**](https://github.com/go-ndarray) | N-dimensional arrays in 13 dtypes with NumPy 2 promotion, broadcasting and strided views; `linalg` is `numpy.linalg`, `fft` is `numpy.fft`, `random` is `numpy.random` with NumPy's numbers for the same seed | [site](https://go-ndarray.github.io/) | [docs](https://go-ndarray.github.io/docs/) |
| [**go-fft**](https://github.com/go-fft) | the `numpy.fft` / `scipy.fft` equivalent: complex and real transforms of any length, N-D, DCT and DST, single precision, no FFTW | [site](https://go-fft.github.io/) | [docs](https://go-fft.github.io/docs/) |
| [**go-numerics**](https://github.com/go-numerics) | numerical methods: optimisation and root finding (`optimize`), quadrature and ODE solvers (`integrate`), special functions (`special`) | [site](https://go-numerics.github.io/) | [docs](https://go-numerics.github.io/docs/) |
| [**go-statistics**](https://github.com/go-statistics) | probability distributions with every method of SciPy's frozen distributions, descriptive statistics and statistical tests (`stats`) | [site](https://go-statistics.github.io/) | [docs](https://go-statistics.github.io/docs/) |
| [**go-dataframe**](https://github.com/go-dataframe) | labelled columnar tables: Series, DataFrame and Index, CSV, Arrow and Parquet, group-by, joins, reshaping, time series | [site](https://go-dataframe.github.io/) | [docs](https://go-dataframe.github.io/docs/) |
| [**go-plot**](https://github.com/go-plot) | matplotlib-class figures to SVG and PNG, with matplotlib's object model and defaults and real TeX in the labels | [site](https://go-plot.github.io/) | [docs](https://go-plot.github.io/docs/) |
| [**go-notebook**](https://github.com/go-notebook) | Go notebooks: a Markdown file whose `go` blocks are cells, compiled to a real program, ordered by what each cell uses, re-running only what changed | [site](https://go-notebook.github.io/) | [docs](https://go-notebook.github.io/docs/) |

## How the pieces fit

```
go-notebook a notebook is a Markdown file; every library below is usable in a cell
─────────────────────────────────────────────────────────────────────────────────────
go-numerics go-statistics go-dataframe go-plot
optimize, distributions, labelled tables figures, SVG and PNG
integrate, statistics,
special tests
─────────────────────────────────────────────────────────────────────────────────────
go-ndarray arrays, numpy.linalg, numpy.random go-fft numpy.fft, scipy.fft
```

go-ndarray is the bottom: the libraries above take and return its arrays, and
draw random numbers from its generator. go-ndarray's `fft` package runs on
go-fft. go-statistics takes its special functions and optimisers from
go-numerics; go-dataframe's numeric columns are go-ndarray arrays, and its
`dfplot` package draws with go-plot. A go-notebook cell can use any of them,
and shows an array, a frame or a figure through its `Display` method.

## What is measured

Each claim below is from the library's own README or documentation, which
says how it was measured.

- **Accuracy against mpmath.** go-statistics measures every distribution
function in ULPs against [mpmath](https://mpmath.org), with SciPy measured
on the same points: the error is at or below SciPy's in 1473 of 1479
regions, and the six exceptions are under 4.5 ulp
([accuracy.md](https://github.com/go-statistics/stats/blob/main/docs/accuracy.md)).
go-numerics' special functions: about 250 000 points in 419 regions over
62 functions, at or below SciPy's error in 418 regions
([accuracy.md](https://github.com/go-numerics/special/blob/main/docs/accuracy.md)).
- **NumPy's numbers for the same seed.** go-ndarray's `random` is
`numpy.random`: `SeedSequence`, PCG64, MT19937, Philox, SFC64 and 40
samplers, bit-exact against NumPy 2.5.3 on x86-64, with the few ULP-level
exceptions listed ([random.md](https://github.com/go-ndarray/ndarray/blob/main/docs/random.md)).
On it, go-statistics' draws of 17 distributions, Dirichlet and multinomial
are bit-identical to SciPy's, and its means, variances, 13 quantile methods
and histograms are NumPy's bit for bit
([rvs-table.md](https://github.com/go-statistics/stats/blob/main/docs/rvs-table.md)).
- **The reference algorithm's path.** go-numerics ports QUADPACK, MINPACK,
L-BFGS-B and SciPy's ODE solvers statement by statement: 116 of 124 fixture
integrals take SciPy's exact subdivision path and 110 of 120 `solve_ivp`
runs its exact steps ([integrate](https://github.com/go-numerics/integrate)),
and 36 of 38 `Minimize` runs SciPy's exact path
([optimize](https://github.com/go-numerics/optimize)).
- **The Python reference's answers.** go-ndarray's `linalg` is checked against
NumPy 2.5.3 on 1,040 cases; go-dataframe against pandas 3.0 on 173 recorded
cases; go-plot's tick locations and labels on 408 axes of real figures are
matplotlib's, every location bit for bit
([design.md](https://github.com/go-plot/plot/blob/main/docs/design.md)).
- **Speed, both ways.** At v0.27.0 go-fft is faster than FFTW on all 24 rows
on Neoverse-N1 and at or above numpy.fft and scipy.fft on all 24 rows on
every host measured ([BENCHMARKS.md](https://github.com/go-fft/fft/blob/main/BENCHMARKS.md)).
go-ndarray against NumPy 2.5.3 and OpenBLAS: faster on reductions and
the `*Into` forms of elementwise operations, slower on `MatMul` against 16-thread OpenBLAS
from 512² ([perf.md](https://github.com/go-ndarray/ndarray/blob/main/docs/perf.md)).
go-statistics against SciPy, rows where SciPy is faster included
([perf.md](https://github.com/go-statistics/stats/blob/main/docs/perf.md)).
polars is faster than go-dataframe on most of the operations measured
([perf.md](https://github.com/go-dataframe/dataframe/blob/main/docs/perf.md)).

## Repositories here

| Repo | What it is |
|------|------------|
| [**go-scikit.github.io**](https://github.com/go-scikit/go-scikit.github.io) | the portal (Hugo): the stack, one card per organisation, a first notebook |
| [**brand**](https://github.com/go-scikit/brand) | logo, icons and social images; the mark is the stack, written by a Go program |
| [**.github**](https://github.com/go-scikit/.github) | this profile and the shared Renovate preset |

The libraries themselves live in their organisations above. Everything is
BSD-3-Clause.
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>go-scikit/.github"]
}
Loading