Repository navigation
Add an export formats page (1.13.81) - #21
Merged
Merged
Conversation
export-formats.html explains how to export matches, fixtures, players, rankings and tournaments to CSV, JSON Lines or Parquet with livetennisapi-export 0.1.0. It is a guide in the GUIDES list. The page says when each format fits. It lists the six datasets with the endpoint and the plan each needs, as the package states them. It also covers paging, how nested fields become dotted columns and when the file is written. The pandas, DuckDB and R examples were run against files the package's own writers produced from its test fixtures. Versions were pandas 3.1.1 with pyarrow 26.0.1, DuckDB 2.0.0, and R 4.6.2 with arrow 26.0.1. _export_drift fails the build when the page names an endpoint the spec does not define. It also fails when the page size differs from the spec's limit maximum. The docs menu, the docs home, the sitemap, llms.txt and the README link the page. Nothing on the wire changed.
The column table named four fixtures fields the Fixture schema does not document. They are gone. The fixtures row now lists fields the schema has. _export_drift resolves every listed column against the schema of its endpoint. A name the spec does not document at that path stops the build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/export-formats.html, a guide to exporting tennis data to CSV, JSON Lines or Parquet withlivetennisapi-export0.1.0. Spec version 1.13.81, with a changelog entry. Nothing on the wire changed.What is on the page
matches,fixtures,players,player,rankings,tournaments) with the endpoint each reads and the plan each needs. The plans are the package's, and the History wording formatchesfollows the spec.meta.has_more,--max-rowsand--page-size.playersends one request for each id.The page is a guide in
GUIDES, built likeai-sdk.htmlanderrors-and-rate-limits.html. It adds no new component. Two cells carrywhite-space:nowrapso a short code word is not split across lines.Where the facts come from
Every statement was read from the package source (
datasets.py,writers.py,cli.py) and its tests. The published 0.1.0 wheel is identical to the repository'ssrc/.A new check,
_export_drift, stops the build in three cases. One is a dataset endpoint the spec does not define. Another is a page size that differs from the spec'slimitmaximum. The last is a listed column the spec's schema for that endpoint does not document.Examples, run before publishing
I had no API key, so nothing called the live API. The package's own writers wrote sample files from its test fixtures. I then ran the code blocks taken from the built page against those files.
score.setsscore.setswrite_csvfrom the packageChecks run
python scripts/build_reference.py --check: generated docs are currentsh scripts/truthcheck.sh: truthcheck OKlint.yml: OK, 48 paths, 49 operations, 66 schemasnpx @redocly/cli@latest lint openapi.yaml: validThe README's table of packages gains a row for the export package.
The page copy, the changelog entry and this text were linted with
hw_lint.py.After merge
The page goes live at https://docs.livetennisapi.com/export-formats.html once the docs are published again from main. PRs #15 and #16 also change
scripts/build_reference.py, and #15 changesdocs/index.html. Whichever merges later needs a rebase and a rebuild of the generated pages.