Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix Deprecated annotation indentation #31532

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Jan 9, 2023

Signed-off-by: Kai Fricke kai@anyscale.com

Why are these changes needed?

Our Documentation build job currently returns errors like this:

/ray/python/ray/air/checkpoint.py:docstring of ray.air.checkpoint.Checkpoint.from_object_ref:9: WARNING: Content block expected for the "warning" directive; none found.

The reason for this is the Deprecated annotation that adds a warning block to the __doc__ property to be rendered in our documentation.

The code is faulty: A misplaced newline character in the DEPRECATED message block removes the proper indentation:

        Returns:
            If called by a driver, this returns the job ID. If called in
            a task, return the job ID of the associated driver.

        .. warning::
            
    DEPRECATED: This API is deprecated and may be removed in future Ray releases.
Use get_job_id() instead

Additionally, newline characters in the deprecation message are also not indented correctly:

        Returns:
            If called by a driver, this returns the job ID. If called in
            a task, return the job ID of the associated driver.

        .. warning::

            DEPRECATED: This API is deprecated and may be removed in future Ray releases.
Use get_job_id() instead

This PR fixes both problems:

        Returns:
            If called by a driver, this returns the job ID. If called in
            a task, return the job ID of the associated driver.

        .. warning::

            DEPRECATED: This API is deprecated and may be removed in future Ray releases.
            Use get_job_id() instead
        

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
@scv119 scv119 merged commit b8def34 into ray-project:master Jan 9, 2023
@krfricke krfricke deleted the doc/fix-deprecated-annotation branch January 9, 2023 18:36
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
Our Documentation build job currently returns errors like this:

/ray/python/ray/air/checkpoint.py:docstring of ray.air.checkpoint.Checkpoint.from_object_ref:9: WARNING: Content block expected for the "warning" directive; none found.
The reason for this is the Deprecated annotation that adds a warning block to the __doc__ property to be rendered in our documentation.

The code is faulty: A misplaced newline character in the DEPRECATED message block removes the proper indentation:

        Returns:
            If called by a driver, this returns the job ID. If called in
            a task, return the job ID of the associated driver.

        .. warning::
            
    DEPRECATED: This API is deprecated and may be removed in future Ray releases.
Use get_job_id() instead
Additionally, newline characters in the deprecation message are also not indented correctly:

        Returns:
            If called by a driver, this returns the job ID. If called in
            a task, return the job ID of the associated driver.

        .. warning::

            DEPRECATED: This API is deprecated and may be removed in future Ray releases.
Use get_job_id() instead
This PR fixes both problems:

        Returns:
            If called by a driver, this returns the job ID. If called in
            a task, return the job ID of the associated driver.

        .. warning::

            DEPRECATED: This API is deprecated and may be removed in future Ray releases.
            Use get_job_id() instead
        
Signed-off-by: Kai Fricke <kai@anyscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants