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" + )