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

fix docs: unindent blocks to allow copy pasting more easily #45432

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lorenzoritter
Copy link

@lorenzoritter lorenzoritter commented May 18, 2024

Why are these changes needed?

Inconsistent indents in code samples of the Getting Started section make it harder to copy paste the code. Since this is the entry point of many users, I corrected the wrong indents so that they can copy paste the code samples more easily.

I also removed some indents in logs for consistency.

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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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: Lorenzo von Ritter <lorenzo.ritter@gmail.com>
@lorenzoritter lorenzoritter requested a review from a team as a code owner May 18, 2024 16:28
@lorenzoritter
Copy link
Author

Before and after screenshots below

  • before
    image
  • after
    image

Comment on lines 644 to 652
@ray.remote
def task_running_300_seconds():
print("Start!")
time.sleep(300)

# Create 2 tasks
tasks = [task_running_300_seconds.remote() for _ in range(2)]
@ray.remote
class Actor:
def __init__(self):
print("Actor created")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this indentation does not look correct.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks @aslonnie ! Updated.

Signed-off-by: Lorenzo von Ritter <lorenzo.ritter@gmail.com>
@anyscalesam anyscalesam added triage Needs triage (eg: priority, bug/not-bug, and owning component) docs An issue or change related to documentation labels May 23, 2024
@anyscalesam
Copy link
Collaborator

@angelinalg can you shepherd this into and merge when ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs An issue or change related to documentation triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants