From 365a588a0a067112e8949f0471a3a5bd94561e90 Mon Sep 17 00:00:00 2001 From: Johnny Wilson Dougherty Date: Sat, 28 Nov 2026 16:35:31 +0530 Subject: [PATCH] docs: link the README to Discussions Q&A and the issue chooser The README told a user to "open an issue" but had no link to the issue page, to Discussions, or to private security reports. SUPPORT.md asked for `report.summary()` output, and CleanReport has no summary(). The README now has a "Get help" section with the three links. SUPPORT.md asks for `fd.suggest_plan(df).to_dict()` output. tests/test_help_links.py fails if the README loses the links or if the help text names an API that freshdata does not export. --- README.md | 6 ++++++ SUPPORT.md | 2 +- tests/test_help_links.py | 28 ++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 tests/test_help_links.py diff --git a/README.md b/README.md index 6bb5ae93..5ba4f716 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,12 @@ freshdata-migrate src/ tests/ --- +## Get help + +- **Questions:** ask in [GitHub Discussions Q&A](https://github.com/FreshCode-Org/freshdata/discussions/categories/q-a). +- **Bugs:** [open an issue](https://github.com/FreshCode-Org/freshdata/issues/new/choose) with a minimal Polars or pandas snippet and the `plan.to_dict()` output you got. +- **Security reports:** use a [private advisory](https://github.com/FreshCode-Org/freshdata/security/advisories/new), not a public issue. + ## Contributing & Issues Bug reports, benchmark reproductions, and pull requests are welcome. diff --git a/SUPPORT.md b/SUPPORT.md index ce145ef8..47f55cf8 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -11,7 +11,7 @@ Issues are for reproducible bugs and concrete feature requests (there are templates for both). **Bugs:** open an issue with the bug template. The single most useful thing -you can include is a minimal DataFrame + the `fd.clean`/`report.summary()` +you can include is a minimal DataFrame + the `fd.suggest_plan(df).to_dict()` output you got vs expected. **Security / privacy reports:** do NOT open a public issue. Use diff --git a/tests/test_help_links.py b/tests/test_help_links.py new file mode 100644 index 00000000..c2c65be0 --- /dev/null +++ b/tests/test_help_links.py @@ -0,0 +1,28 @@ +"""A new user must find where to ask a question, and the help text must name real APIs.""" + +import pathlib +import re + +import freshdata as fd + +ROOT = pathlib.Path(__file__).resolve().parents[1] +REPO = "https://github.com/FreshCode-Org/freshdata" + + +def test_readme_links_to_question_and_bug_channels() -> None: + readme = (ROOT / "README.md").read_text(encoding="utf-8") + assert f"]({REPO}/discussions/categories/q-a)" in readme + assert f"]({REPO}/issues/new/choose)" in readme + + +def test_help_text_names_only_public_api() -> None: + files = [ROOT / "SUPPORT.md", *(ROOT / ".github" / "ISSUE_TEMPLATE").glob("*.yml")] + for path in files: + text = path.read_text(encoding="utf-8") + for name in re.findall(r"\bfd\.(\w+)", text): + assert name in fd.__all__, ( + f"{path.name} names fd.{name}, which freshdata does not export" + ) + assert "report.summary()" not in text, ( + f"{path.name} names CleanReport.summary(), which does not exist" + )