Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a817766
doc: the README opens with a banner of every source dataseek searches
lmarkmann Oct 7, 2026
ba8ab33
doc: the README installs straight from GitHub and its example comment…
lmarkmann Oct 7, 2026
f1b7794
doc: the README shows the CI status and the latest release
lmarkmann Oct 7, 2026
b8c85e8
fix: status lines say 1 source, 1 result and "was still downloading i…
lmarkmann Oct 7, 2026
8fb4da8
fix: search result facts are separated by a single-spaced bar
lmarkmann Oct 7, 2026
9ce61b8
fix: the searching line counts only the sources that will be asked an…
lmarkmann Oct 7, 2026
a40d564
feat: result descriptions on a terminal are cut between 40 and 80 col…
lmarkmann Oct 7, 2026
8f081c5
fix: flags with a fixed set of values name them in their help once, a…
lmarkmann Oct 7, 2026
3000ff7
fix: the man page describes every option and closes with EXAMPLES, EX…
lmarkmann Oct 7, 2026
e0cb8cd
feat: dsk man opens the page in man on a terminal, and drops out of t…
lmarkmann Oct 7, 2026
4898ecd
feat: the bare overview has Search, Upkeep and Shell headings, the sa…
lmarkmann Oct 7, 2026
f949c3d
fix: dsk man writes the page it opens to a temporary file with a rand…
lmarkmann Oct 7, 2026
d20054c
feat: the cache budget reads as 30 MB and DATASEEK_CACHE_MAX_MB sets …
lmarkmann Oct 7, 2026
72726dc
feat: dsk completion on a terminal says where to save the script inst…
lmarkmann Oct 7, 2026
9ee5fb8
refactor: the hidden --jq flag is gone, so completions stop offering …
lmarkmann Oct 7, 2026
b865235
doc: the README says why dataseek exists, shows a real search, and co…
lmarkmann Oct 7, 2026
a9e7be9
feat: dsk inspect fits the terminal: wrapped fields, a file count and…
lmarkmann Oct 7, 2026
cca49b7
feat: dsk doctor wraps long details under their column on a terminal
lmarkmann Oct 7, 2026
55cb975
feat: dsk sources sizes its columns to their content and wraps its no…
lmarkmann Oct 7, 2026
0a53bc5
feat: dsk help environment wraps each variable's meaning on a terminal
lmarkmann Oct 7, 2026
cef3fee
fix: the User-Agent names the repository next to the contact address
lmarkmann Oct 7, 2026
0da47f9
doc: dataseek is licensed under MIT or Apache-2.0
lmarkmann Oct 7, 2026
3d0a37c
doc: the ADR index holds decisions and the watch list
lmarkmann Oct 7, 2026
af30d8e
feat: dsk sources shows the notices FRED and the Census Bureau ask fo…
lmarkmann Oct 7, 2026
421fd64
doc: the terms table gives each source's registry effect as it stands
lmarkmann Oct 7, 2026
708ca3a
fix: a source that keeps answering 429 rests for 10 minutes instead o…
lmarkmann Oct 7, 2026
3bd81b4
refactor: dsk sources writes its table and builds its notes in separa…
lmarkmann Oct 7, 2026
471475e
doc: the README installs from crates.io, cargo-binstall and uv, and r…
lmarkmann Oct 7, 2026
4ca4814
fix: a source's error text can no longer carry escape sequences to th…
lmarkmann Oct 7, 2026
e9cc1fd
build: the crate is ready for crates.io, packaging only what building…
lmarkmann Oct 7, 2026
4550e45
build: a PyPI wheel carries dataseek and dsk, and each GitHub release…
lmarkmann Oct 7, 2026
a6129d5
doc: a security policy, a contributing guide and a pull request templ…
lmarkmann Oct 7, 2026
6c3c6b5
build: each release attaches dataseek and dsk for Linux, macOS and Wi…
lmarkmann Oct 7, 2026
a8c9763
doc: the security policy leaves supported versions open, and the READ…
lmarkmann Oct 7, 2026
3613a4d
doc: the supply-chain gates move to reference/supply-chain.md so they…
lmarkmann Oct 7, 2026
255bd4e
ci: aarch64 Linux wheels build on manylinux_2_28, whose GCC can assem…
lmarkmann Oct 7, 2026
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
15 changes: 15 additions & 0 deletions .github/pr-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Summary

<!-- What changes for someone running dsk, and why. Link the issue if there is one. -->

## Release line

<!-- The conventional title this lands under, e.g. `fix: ...`. It becomes the changelog line. -->

## Checklist

- [ ] `just ci` passes
- [ ] Tests cover the change; a new or changed adapter has a `parse` test against a recorded fixture
- [ ] Changed snapshots were stepped through with `just review`
- [ ] Docs are current: `docs/reference/contract.md` for flags or output, an ADR for a decision, ADR 0004 and `docs/synthesis/terms.md` for a new source
- [ ] Re-recorded fixtures are trimmed, carry no key, and have every personal e-mail address replaced
186 changes: 186 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Release builds once release-plz has published a GitHub release: a wheel and
# a binary archive per platform, the archives attached to the release and the
# wheels sent to PyPI. release-plz owns the version, the tag and crates.io
# (docs/reference/release.md). One machine per platform, because these are the
# only jobs that must run on macOS and Windows (ADR 0017). A pull request that
# changes the release build runs the builds without publishing anything.
name: release

on:
release:
types: [published]
pull_request:
paths:
- .github/workflows/release.yml
- pyproject.toml

permissions: {}

jobs:
build:
name: build ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
native: true
# ring's ARM assembly needs a GCC that defines __ARM_ARCH, which the
# manylinux2014 cross image's GCC does not.
- runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
manylinux: 2_28
- runner: macos-latest
target: aarch64-apple-darwin
native: true
- runner: macos-latest
target: x86_64-apple-darwin
- runner: windows-latest
target: x86_64-pc-windows-msvc
native: true
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: wheel
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
maturin-version: v1.15.0
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
args: --release --locked --out dist
# The binaries the wheel carries, archived under the name cargo binstall
# looks for: dataseek-<target>.tar.gz, or .zip on Windows.
- name: archive
shell: bash
env:
TARGET: ${{ matrix.target }}
NATIVE: ${{ matrix.native }}
run: |
dir="dataseek-$TARGET"
ext=""
[[ $TARGET == *windows* ]] && ext=".exe"
mkdir -p "$dir" archives
cp "target/$TARGET/release/dataseek$ext" "target/$TARGET/release/dsk$ext" README.md LICENSE-MIT LICENSE-APACHE "$dir/"
if [[ $TARGET == *windows* ]]; then
archive="$dir.zip"
7z a -bd "archives/$archive" "$dir" > /dev/null
else
archive="$dir.tar.gz"
tar czf "archives/$archive" "$dir"
fi
cd archives
if command -v sha256sum > /dev/null; then
sha256sum "$archive" > "$archive.sha256"
else
shasum -a 256 "$archive" > "$archive.sha256"
fi
if [[ $NATIVE == true ]]; then
"../$dir/dataseek$ext" --version
fi
- name: upload wheel
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheel-${{ matrix.target }}
path: dist/*.whl
if-no-files-found: error
- name: upload archive
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: archive-${{ matrix.target }}
path: archives/*
if-no-files-found: error

sdist:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: build
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
with:
maturin-version: v1.15.0
command: sdist
args: --out dist
- name: upload
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: sdist
path: dist/*.tar.gz
if-no-files-found: error

assets:
if: github.event_name == 'release'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
id-token: write
attestations: write
steps:
- name: harden runner
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: download
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: archive-*
path: archives
merge-multiple: true
- name: attest
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: archives/dataseek-*
- name: attach
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" archives/* --repo "$REPO" --clobber

# PyPI's trusted publisher names this workflow file and the pypi
# environment; uv exchanges the job's OIDC token, so no PyPI token exists.
pypi:
if: github.event_name == 'release'
needs: [build, sdist]
runs-on: ubuntu-latest
timeout-minutes: 10
environment: pypi
permissions:
id-token: write
steps:
- name: harden runner
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- name: download wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: wheel-*
path: dist
merge-multiple: true
- name: download sdist
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sdist
path: dist
- name: uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: 0.12.21
enable-cache: false
- name: publish
run: uv publish --trusted-publishing always dist/*
50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contributing

Bug reports, fixes and new sources are welcome. For anything larger than a fix, open an issue first, so the idea is settled before the code is written. Report vulnerabilities privately, as [`docs/SECURITY.md`](docs/SECURITY.md) describes.

## Setup

[`docs/reference/setup.md`](docs/reference/setup.md) lists the toolchain and the tools the recipes call. Run `prek install` once, so formatting, clippy, `cargo-shear` and `typos` run on every commit.

## While you work

```sh
just check # fmt --check, clippy -D warnings, tests, doctests
just test <filter> # a subset of the tests
just review # step through changed help and output snapshots
just ci # everything CI gates on; run it before opening a pull request
```

A green `just ci` means a green CI run on your platform.

## Commits and pull requests

Write [conventional commits](https://www.conventionalcommits.org). The prefix decides what gets released: `feat:` cuts a minor release, `fix:`, `perf:` and `refactor:` a patch, `doc:`, `build:` and `chore:` only reach the changelog, and `test:` and `ci:` stay out of it. The full table is in [`docs/reference/release.md`](docs/reference/release.md).

Each subject becomes a line in the changelog, so write it for someone who runs `dsk`, not for a reviewer: "fix: a 403 with a spent quota reads as rate limited, not as rejected credentials" rather than "fix: map 403 to RateLimited". A pull request with several commits is merged with a merge commit, so make each commit stand on its own.

Leave the version in `Cargo.toml` and `docs/CHANGELOG.md` alone; the release tooling writes both.

## Tests

No test touches the network. Each adapter splits its request from a pure `parse`, and each `parse` is tested against a real response recorded in `tests/fixtures/sources/`, with the expected record read off the fixture by hand, never pasted from the code's own output.

When you record or re-record a fixture, never send a key, trim the arrays to a few rows, and replace any person's e-mail address with `contact@example.org`. The exact steps, and where each kind of test belongs, are in [`docs/reference/development.md`](docs/reference/development.md). Commit any new file proptest writes to `proptest-regressions/`.

## Code

The lints in `Cargo.toml` deny `unwrap`, `expect`, `panic!`, indexing, unchecked arithmetic and direct printing outside tests. Write code that satisfies them rather than adding an `allow`. Results go to stdout only through `src/output.rs`, and everything else to stderr through `src/ui.rs`. [`docs/reference/contract.md`](docs/reference/contract.md) defines the flags, streams, errors and exit codes, and a change to any of them is a change to that document.

## Adding a source

A source is one row in `SOURCES` in `src/sources.rs` and at most one module under `src/sources/`. Before writing a module, check whether a protocol adapter (CKAN, Dataverse, NADA, Socrata, STAC, SDMX, EBI) already covers it; then the source is only a row ([ADR 0005](docs/adr/0005-one-adapter-per-shared-protocol.md)).

A source is complete with:

- a recorded fixture and a `parse` test against it
- its row in the source table of [ADR 0004](docs/adr/0004-every-source-is-searched.md)
- its row in [`docs/synthesis/terms.md`](docs/synthesis/terms.md), quoting the provider's terms that allow a public tool to query it this way

## Proposing something bigger

Read [`docs/adr/`](docs/adr/) first: it records why dataseek is built the way it is. [`docs/adr/watchlist.md`](docs/adr/watchlist.md) lists what is parked and the trigger that would bring each item back; if your idea is there, say what has changed.
12 changes: 9 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
name = "dataseek"
version = "0.7.0"
description = "Search for datasets from the terminal"
license = "MIT OR Apache-2.0"
repository = "https://github.com/lmarkmann/dataseek"
readme = "README.md"
keywords = ["dataset", "search", "open-data", "research", "cli"]
categories = ["command-line-utilities", "science"]
edition = "2024"
rust-version = "1.99"
publish = false
# What `cargo install` needs to build; tests, fixtures, benches and docs stay
# in the repository.
include = ["/src", "/build.rs", "/README.md", "/LICENSE-MIT", "/LICENSE-APACHE"]

[lints.rust]
unsafe_code = "forbid"
Expand Down Expand Up @@ -68,8 +74,8 @@ rustls = { version = "0.23", default-features = false, features = ["std"] }
ureq = { version = "3", features = ["json", "platform-verifier"] }

[features]
# Re-exports for benches/ and the relevance example only; see the internals
# module in src/lib.rs.
# Re-exports for benches/ and the relevance example only; unstable and
# outside semver, see the internals module in src/lib.rs.
internals = []

[dev-dependencies]
Expand Down
Loading
Loading