Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
dbc8035
fix: ureq 3.5 drops the Mozilla root store the binary never read, 115…
lmarkmann Oct 23, 2026
84231ab
perf: Markdown descriptions are stripped without pulldown-cmark, 180 …
lmarkmann Oct 23, 2026
0b8d3ff
perf: credentials.toml is read without the toml crate, 67 to 98 KB sm…
lmarkmann Oct 23, 2026
8fa9f64
build: release archives are .tar.xz, which holds dsk next to dataseek…
lmarkmann Oct 23, 2026
cce34f5
perf: spinners and progress bars are drawn without indicatif, 83 to 8…
lmarkmann Oct 23, 2026
02cfe5f
perf: the man page is written without clap_mangen, 33 to 39 KB smalle…
lmarkmann Oct 23, 2026
15304fe
test: a bench for Markdown descriptions, which CKAN, data.gov and Ope…
lmarkmann Oct 23, 2026
11cad23
doc: binary size after the dependency replacements, measured per comm…
lmarkmann Oct 23, 2026
a98aa4c
build: webpki-root-certs 1.0.11 clears RUSTSEC-2026-0383; no released…
lmarkmann Oct 23, 2026
fc1c7c5
fix: Linux builds reject certificate paths through the distrusted emS…
lmarkmann Oct 23, 2026
0ca3249
doc: binary size note covers the trixie archive and TLS check, the fi…
lmarkmann Oct 23, 2026
732cd93
doc: std without its backtrace feature is 130 KiB smaller at the same…
lmarkmann Oct 23, 2026
02cec7c
fix: credentials.toml with a byte order mark or TOML 1.1 escapes supp…
lmarkmann Oct 26, 2026
8da8ff6
fix: Markdown descriptions keep a wrapped line that starts with a yea…
lmarkmann Oct 26, 2026
2bf4653
fix: on Windows the live progress line stays on when stdout is redire…
lmarkmann Oct 26, 2026
b3e9e19
doc: comments and docs match the rewrites, the binary size note count…
lmarkmann Oct 26, 2026
f217021
fix: a Markdown fence closes only on a run of its own mark at least a…
lmarkmann Oct 26, 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
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ jobs:
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.
# The binaries the wheel carries, archived under a name cargo binstall
# looks for: dataseek-<target>.tar.xz, or .zip on Windows. dsk is a
# copy of dataseek, and xz, unlike gzip, reaches back far enough to
# store the second copy almost free.
- name: archive
shell: bash
env:
Expand All @@ -73,8 +75,8 @@ jobs:
archive="$dir.zip"
7z a -bd "archives/$archive" "$dir" > /dev/null
else
archive="$dir.tar.gz"
tar czf "archives/$archive" "$dir"
archive="$dir.tar.xz"
tar cJf "archives/$archive" "$dir"
fi
cd archives
if command -v sha256sum > /dev/null; then
Expand Down Expand Up @@ -226,7 +228,7 @@ jobs:
REPO: ${{ github.repository }}
TAG: ${{ github.event.release.tag_name }}
run: |
gh release download "$TAG" --repo "$REPO" -p '*.tar.gz.sha256' -D sums
gh release download "$TAG" --repo "$REPO" -p '*.tar.xz.sha256' -D sums
scripts/homebrew-formula.sh "$TAG" sums > tap/Formula/dataseek.rb
- name: push
working-directory: tap
Expand Down
104 changes: 18 additions & 86 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,14 @@ anyhow = "1"
anstream = "1"
clap = { version = "4", features = ["derive", "env", "wrap_help"] }
clap_complete = "4"
clap_mangen = "0.3"
etcetera = "0.11"
indicatif = { version = "0.18", default-features = false, features = ["unicode-width"] }
pulldown-cmark = { version = "0.13", default-features = false }
quick-xml = "0.42"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tempfile = "3"
terminal_size = "0.4"
thiserror = "2"
toml = { version = "1", default-features = false, features = ["parse", "serde", "std"] }
enable-ansi-support = "0.3"

[target.'cfg(unix)'.dependencies]
signal-hook = { version = "0.4", default-features = false }
Expand All @@ -64,14 +61,16 @@ signal-hook = { version = "0.4", default-features = false }
# have for Windows or macOS, so this split is what lets ADR 0002's
# cross-checks compile (ADR 0011). Every platform trusts the OS's root
# certificates; platform-verifier gives rustls the system store (ADR 0014).
# src/http.rs picks the matching provider.
# Neither ureq feature set bundles Mozilla roots, which PlatformVerifier
# never reads; src/http.rs picks the matching provider.
[target.'cfg(any(windows, target_os = "macos"))'.dependencies]
ureq = { version = "3", default-features = false, features = ["json", "gzip", "native-tls"] }
ureq = { version = "3.5", default-features = false, features = ["json", "gzip", "native-tls-no-default"] }

# rustls itself only to tell a refused certificate from a dead host.
# rustls itself to hand ureq ring's provider and to tell a refused
# certificate from a dead host.
[target.'cfg(not(any(windows, target_os = "macos")))'.dependencies]
rustls = { version = "0.23", default-features = false, features = ["std"] }
ureq = { version = "3", features = ["json", "platform-verifier"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
ureq = { version = "3.5", default-features = false, features = ["json", "gzip", "rustls-no-provider", "platform-verifier"] }

[features]
# Re-exports for benches/ and the relevance example only; unstable and
Expand All @@ -85,6 +84,8 @@ criterion = { version = "5", package = "codspeed-criterion-compat", default-feat
insta = { version = "1", features = ["filters"] }
predicates = "3"
proptest = "1"
# The relevance example reads its queries file.
toml = { version = "1", default-features = false, features = ["parse", "serde", "std"] }

# A local HTTPS server under a private root, for the test that Linux trusts
# what SSL_CERT_FILE names; rustls with ring is already in the build there.
Expand Down
5 changes: 5 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ extend-ignore-re = [
"has\\(\"nd\"\\)",
"Burnt Area \\(BA\\)",
"census for BA 44/45",
# HTML entity names, decoded in src/record.rs.
"\"curren\"",
"caf&eacute;",
# The ELF section of dynamic relocation records.
"\\.rela\\.dyn",
]
36 changes: 31 additions & 5 deletions benches/search.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! The CPU side of a search, by stage: parsing downloaded catalogs, loading
//! a cached catalog, searching it, fusing the per-source lists and cleaning
//! remote text. Network time dwarfs all of it; these exist so a change that
//! makes one stage grow faster than its input shows up before a user waits
//! on it (ADR 0012).
//! remote text, Markdown descriptions included. Network time dwarfs all of
//! it; these exist so a change that makes one stage grow faster than its
//! input shows up before a user waits on it (ADR 0012).
//!
//! Inputs are synthetic, shaped after real responses (ECB's SDMX-ML dataflow
//! list, Eurostat's table of contents, 2026-10-06) and built from a word list
Expand All @@ -25,8 +25,8 @@ use criterion::{
criterion_main,
};
use dataseek::internals::{
Cache, Dataset, Kind, catalog_search, clean, eurostat_toc, merge,
sdmx_dataflows, weigh,
Cache, Dataset, Kind, catalog_search, clean, eurostat_toc, from_markdown,
merge, sdmx_dataflows, weigh,
};

#[rustfmt::skip]
Expand Down Expand Up @@ -179,6 +179,18 @@ fn html(bytes: usize) -> String {
paragraph.repeat(bytes.div_ceil(paragraph.len()))
}

/// A CKAN `notes` field: a heading, a list, links, emphasis, code and an
/// image, the marks `from_markdown` strips.
fn markdown(bytes: usize) -> String {
let section = "## Sea surface temperature\n\n\
Monthly **gridded** fields from [NOAA ERSST](https://example.org/sst) \
and _partners_, with `sst_anomaly` in kelvin.\n\n\
- Coverage: 1854 to present\n\
- Resolution: 2 degrees\n\
![map](https://example.org/map.png)\n\n";
section.repeat(bytes.div_ceil(section.len()))
}

/// Prose whose ampersands start no entity, as in "R&D" or "Q&A", and which
/// has no semicolon to end one.
fn ampersands(bytes: usize) -> String {
Expand Down Expand Up @@ -303,6 +315,20 @@ fn sanitize(c: &mut Criterion) {
}
group.finish();

let mut group = c.benchmark_group("markdown");
for bytes in [200, 2_000, 20_000] {
let text = markdown(bytes);
group.throughput(Throughput::Bytes(text.len() as u64));
group.bench_with_input(
BenchmarkId::from_parameter(bytes),
&text,
|b, text| {
b.iter(|| from_markdown(black_box(text)));
},
);
}
group.finish();

let mut group = c.benchmark_group("clean/ampersands");
for bytes in [2_000, 20_000] {
let text = ampersands(bytes);
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0017-release-builds-on-a-platform-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PyPI wheels and `cargo binstall` both need prebuilt binaries for Linux (x86_64,

## Decision

`.github/workflows/release.yml` runs when a GitHub release is published, which release-plz does when its release PR merges. One job per target builds the wheel with maturin, on a machine of the target's OS (Linux aarch64 in maturin's cross container), and archives the same binaries as `dataseek-<target>.tar.gz` (`.zip` on Windows) with a SHA-256 file. The archives are attested and attached to the release; the wheels and an sdist go to PyPI with `uv publish` through trusted publishing. A pull request that changes the release build runs the builds and publishes nothing. CI stays one Linux job.
`.github/workflows/release.yml` runs when a GitHub release is published, which release-plz does when its release PR merges. One job per target builds the wheel with maturin, on a machine of the target's OS (Linux aarch64 in maturin's cross container), and archives the same binaries as `dataseek-<target>.tar.xz` (`.zip` on Windows) with a SHA-256 file. The archives are attested and attached to the release; the wheels and an sdist go to PyPI with `uv publish` through trusted publishing. A pull request that changes the release build runs the builds and publishes nothing. CI stays one Linux job.

## Consequences

Expand Down
8 changes: 1 addition & 7 deletions docs/adr/watchlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ Trigger: published documentation and terms for the API, or the v2 indicator list

## Nightly size levers

`-Zfmt-debug=none` (-224 KiB), `-Zlocation-detail=none` (-96 KiB) and the `optimize_for_size` std feature through `build-std` (-288 KiB) all shrink the release binary further ([measurement](../bench/2026-10-07-binary-size.md)). Parked because `rust-toolchain.toml` pins stable and a release profile cannot set them there.
`-Zfmt-debug=none` (-224 KiB), `-Zlocation-detail=none` (-96 KiB) and the `optimize_for_size` std feature through `build-std` (-288 KiB) all shrink the release binary further ([measurement](../bench/2026-10-07-binary-size.md)). So does `build-std` with std's `backtrace` feature left out (-130 KiB on macOS, search speed unchanged, [measurement](../bench/2026-10-23-binary-size.md)): panics still unwind and print their message, but `RUST_BACKTRACE=1` prints no frames. Parked because `rust-toolchain.toml` pins stable and a release profile cannot set them there.

Trigger: any of them stabilizes as a `[profile]` key or a stable `-C` flag. Re-run `just bloat --what-if --levers=<that lever>` before adopting it.

## ureq without the bundled root store on macOS and Windows

`src/http.rs` verifies through the platform's trust store there, yet ureq's `native-tls` feature also links `webpki-root-certs`. `native-tls-no-default` would drop it, but ureq 3.4.2 compiles its native-tls connector only under `native-tls`, so that build panics on the first HTTPS request.

Trigger: a ureq release whose native-tls connector works under `native-tls-no-default`. A live `dataseek search` on macOS is the test, because no test here makes a real TLS connection.
Loading
Loading