Repository navigation
[Data] Deprecate read_clickhouse and write_clickhouse in favor of community-maintained ray-clickhouse - #66308
richardliaw wants to merge 4 commits into
Conversation
…munity-maintained ray-clickhouse Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Richard Liaw <[email protected]>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Richard Liaw <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: Richard Liaw <[email protected]>
|
@dstrodtman i'm seeing a CI failure from docs build - can you help advise on how to fix? |
Signed-off-by: Richard Liaw <[email protected]>
|
@richardliaw The Read the Docs build is passing. The red check is premerge's Switching to "ray.data.read_api.read_unity_catalog",
"ray.data.dataset.Dataset.write_clickhouse",
"ray.data.read_api.read_clickhouse",You could also drop the ClickHouse sections from One more thing that doesn't fail CI: .. deprecated:: X.Y
``read_clickhouse`` is deprecated. Use the `ray-clickhouse <https://github.com/jiangxt2/ray-clickhouse>`_ package instead. |
#66612) ## Why The [API policy](https://docs.ray.io/en/latest/ray-contribute/api-policy.html) says deprecated APIs must be documented. The docs-side half of `doc: check API doc consistency`, added in #64420, did the opposite: it failed any documented autosummary or autoclass entry that resolved to a `@Deprecated` object. That's what blocked #66308, which deprecates `read_clickhouse` and `write_clickhouse` and leaves them documented with a deprecation notice, which is what the policy asks for. Teams have been working around the rule instead. Ray Data kept its deprecated APIs in `tracked_doc_debt` under a comment asking for them to be removed from the docs. ## What - `API.split_resolvable_and_broken_doc_apis` no longer flags deprecated objects. It still fails documented names that don't resolve and documented names that resolve to private objects (`_foo` or `._internal.`), with the existing override-hook and `__all__` re-export exemptions unchanged. - It returns `(unresolved, private)` instead of `(unresolved, non_public)`, and the error output says "private" instead of "deprecated / private." - `API.introspect_annotation_type` is removed. The deprecated check was its only caller. The inherited-annotation behavior it tested is still covered through `Module` in `test_module.py`. - The four Ray Data `tracked_doc_debt` entries for deprecated APIs are removed: `AggregateFn`, `Dataset.iter_tf_batches`, `Dataset.to_random_access_dataset`, and `read_unity_catalog`. All four are `@Deprecated` in source, so the entries only existed to get around this rule. Out of scope: the policy also implies the code-side check should *require* deprecated APIs to be documented. Today that check skips them. There are about 90 `@Deprecated` decorators under `python/ray`, many on undocumented methods, so turning that on is a per-team burndown and belongs in a follow-up. ## Duplicate check No open PR touches this rule. I searched open PRs for `api_policy_check`, `cmd_check_api_discrepancy`, and "API doc consistency" together with deprecation. #66308 is the PR this unblocks, not a duplicate. ## Testing ``` python -m pytest ci/ray_ci/doc/test_api.py ci/ray_ci/doc/test_cmd_check_api_discrepancy.py ci/ray_ci/doc/test_module.py 40 passed pre-commit run --files <changed files> # ruff, black, docstyle, import order: all passed ``` I didn't run the checker end to end against a real Ray install. This PR's `doc: check API doc consistency` step does that, and should pass with the four Data exemptions removed. This PR was written with AI assistance (Claude Code). I reviewed the change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
ray-project#66612) ## Why The [API policy](https://docs.ray.io/en/latest/ray-contribute/api-policy.html) says deprecated APIs must be documented. The docs-side half of `doc: check API doc consistency`, added in ray-project#64420, did the opposite: it failed any documented autosummary or autoclass entry that resolved to a `@Deprecated` object. That's what blocked ray-project#66308, which deprecates `read_clickhouse` and `write_clickhouse` and leaves them documented with a deprecation notice, which is what the policy asks for. Teams have been working around the rule instead. Ray Data kept its deprecated APIs in `tracked_doc_debt` under a comment asking for them to be removed from the docs. ## What - `API.split_resolvable_and_broken_doc_apis` no longer flags deprecated objects. It still fails documented names that don't resolve and documented names that resolve to private objects (`_foo` or `._internal.`), with the existing override-hook and `__all__` re-export exemptions unchanged. - It returns `(unresolved, private)` instead of `(unresolved, non_public)`, and the error output says "private" instead of "deprecated / private." - `API.introspect_annotation_type` is removed. The deprecated check was its only caller. The inherited-annotation behavior it tested is still covered through `Module` in `test_module.py`. - The four Ray Data `tracked_doc_debt` entries for deprecated APIs are removed: `AggregateFn`, `Dataset.iter_tf_batches`, `Dataset.to_random_access_dataset`, and `read_unity_catalog`. All four are `@Deprecated` in source, so the entries only existed to get around this rule. Out of scope: the policy also implies the code-side check should *require* deprecated APIs to be documented. Today that check skips them. There are about 90 `@Deprecated` decorators under `python/ray`, many on undocumented methods, so turning that on is a per-team burndown and belongs in a follow-up. ## Duplicate check No open PR touches this rule. I searched open PRs for `api_policy_check`, `cmd_check_api_discrepancy`, and "API doc consistency" together with deprecation. ray-project#66308 is the PR this unblocks, not a duplicate. ## Testing ``` python -m pytest ci/ray_ci/doc/test_api.py ci/ray_ci/doc/test_cmd_check_api_discrepancy.py ci/ray_ci/doc/test_module.py 40 passed pre-commit run --files <changed files> # ruff, black, docstyle, import order: all passed ``` I didn't run the checker end to end against a real Ray install. This PR's `doc: check API doc consistency` step does that, and should pass with the four Data exemptions removed. This PR was written with AI assistance (Claude Code). I reviewed the change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
…EXAMPLE doctests (#67209) ## Description Converts the never-run `.. testcode::` / `:skipif: True` examples for Ray Data's external-service sinks and the Hive reader to `>>>` doctests. Each docstring is flagged once with the docstring-level `# doctest: +SKIP_EXAMPLE` from #66753. The change touches only docstrings: - **`python/ray/data/dataset.py`**: 10 blocks in `write_iceberg`, `write_delta`, `write_webdataset`, `write_snowflake`, `write_mongo`, `write_bigquery`, `write_clickhouse`, `write_turbopuffer` (2 blocks), and `write_kafka`. - **`python/ray/data/read_api.py`**: the `read_hive` example. - **`python/ray/data/_internal/datasource/turbopuffer_datasink.py`**: the 3 `TurbopufferDatasink` examples. Each example needs a service, credentials, or a bucket that CI doesn't have, so they stay render-only, as before. The flag is stripped at render time by both Sphinx (`trim_doctest_flags`) and griffe. The conversion follows the rules from #67080: same code in the same order, blank lines inside a block dropped, and top-level comments as `>>> #` lines. Two docstrings needed something other than the flag: - **The `Dataset` class docstring runs its example now.** That docstring also holds 10 runnable `>>>` examples, and `+SKIP_EXAMPLE` skips a whole docstring, so it would have stopped them from running. Instead, only the two lines that use placeholder paths, `read_parquet("s3://bucket/path")` and `write_csv("s3://bucket/output")`, carry `# doctest: +SKIP`. The `range` and `from_items` lines run. - **`write_csv`'s example had an unterminated string**, `"s3://bucket/folder/)`. It was already `+SKIP`, so nothing ever parsed it. The closing quote is now in place, so the docstring parses with the stock doctest parser. The `:skipif: True` blocks left in `dataset.py` after this PR are in #67202 (`join`) and #67207 (`streaming_split`). ## Related issues Related to #66753, #67080, #67202, and #67207. ## Additional information **Not a duplicate.** I searched open PRs for each method name, `turbopuffer`, `SKIP_EXAMPLE`, and `testcode skipif data`. #67202 and #67207 are my own and convert other methods in `dataset.py`. Two open PRs edit text these examples sit next to, so whichever PR lands second needs a small rebase: - #66192 edits the `write_iceberg` example's content, adding a REST catalog write. This PR changes only the example's form. - #66308 adds a deprecation notice to `write_clickhouse`, next to its example. #67114 and #67168 change `read_api.py` but not the `read_hive` docstring example. **Tests run** - `ci/ray_ci/doc/check_docstring_only.py --base upstream/master`: "3 file(s), docstrings only." - `ci/ray_ci/doc/run_docstring_examples.py` on the three files, in an aarch64 image with the Ray nightly at `093faf5583e` and the changed files mounted over the installed ones. None of the three files changed between that commit and this PR's base. Result: 85 docstrings run and 1 failed, with 16 skipped for `+SKIP_EXAMPLE` and 5 for an omitted library (torch, torchvision, TensorFlow, `tensorflow_datasets`). All 13 converted docstrings report `SKIP (+SKIP_EXAMPLE)`, and `Dataset` and `Dataset.write_csv` pass. The one failure is `read_videos`, which this PR doesn't touch. It needs `decord`, which has no aarch64 wheel. The run installed `datasketches`, `Pillow`, `crc32c`, `soundfile`, and `fastavro`, which the base image lacks. Without them, six more untouched docstrings fail on the missing import. - Every `>>>` example in the three files compiles with the stock `doctest` parser once `SKIP_EXAMPLE` is registered. - `pre-commit run --files` on the three files: all hooks pass, including ruff, black, pydoclint, and the Ray docstyle check. The PR carries the `docstring-only` label, and its commit carries an `@rtd-build` line for the Read the Docs preview. AI assistance (Claude Code) was used for this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
|
This pull request has been automatically closed because there has been no more activity in the 14 days Please feel free to reopen or open a new pull request if you'd still like this to be addressed. Again, you can always ask for help on our discussion forum or Ray's public slack channel. Thanks again for your contribution! |
Summary
read_clickhouseandwrite_clickhousein favor of the community-maintainedray-clickhousepackage.@Deprecated(warning=True)to both APIs so users get a runtime deprecation warning... deprecated::directives pointing toray-clickhouse.Test plan
read_clickhouse/write_clickhouse🤖 Generated with Claude Code