From e75e1de4c127747527befc131d143361eddddae3 Mon Sep 17 00:00:00 2001 From: Antonin RAFFIN Date: Wed, 10 Nov 2021 16:54:20 +0000 Subject: [PATCH] Fix indentation in RL tips doc (#657) * Update rl_tips.rst indent fix to make if done and its following statement work * Fix indentation and update changelog * Skip type check for python 3.9 Co-authored-by: paulg --- .github/workflows/ci.yml | 2 ++ docs/guide/rl_tips.rst | 18 +++++++++--------- docs/misc/changelog.rst | 3 ++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6626122..75ce35a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,8 @@ jobs: - name: Type check run: | make type + # Skip Type Check for python 3.9, see https://github.com/python/typed_ast/issues/169 + if: ${{ matrix.python-version != 3.9 }} - name: Check codestyle run: | make check-codestyle diff --git a/docs/guide/rl_tips.rst b/docs/guide/rl_tips.rst index d75d347..f3315a9 100644 --- a/docs/guide/rl_tips.rst +++ b/docs/guide/rl_tips.rst @@ -194,15 +194,15 @@ If you want to quickly try a random agent on your environment, you can also do: .. code-block:: python - env = YourEnv() - obs = env.reset() - n_steps = 10 - for _ in range(n_steps): - # Random action - action = env.action_space.sample() - obs, reward, done, info = env.step(action) - if done: - obs = env.reset() + env = YourEnv() + obs = env.reset() + n_steps = 10 + for _ in range(n_steps): + # Random action + action = env.action_space.sample() + obs, reward, done, info = env.step(action) + if done: + obs = env.reset() **Why should I normalize the action space?** diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index b6bfd2a..adb669c 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -30,6 +30,7 @@ Documentation: ^^^^^^^^^^^^^^ - Add highway-env to projects page (@eleurent) - Add tactile-gym to projects page (@ac-93) +- Fix indentation in the RL tips page (@cove9988) Release 1.3.0 (2021-10-23) @@ -835,4 +836,4 @@ And all the contributors: @ShangqunYu @PierreExeter @JacopoPan @ltbd78 @tom-doerr @Atlis @liusida @09tangriro @amy12xx @juancroldan @benblack769 @bstee615 @c-rizz @skandermoalla @MihaiAnca13 @davidblom603 @ayeright @cyprienc @wkirgsn @AechPro @CUN-bjy @batu @IljaAvadiev @timokau @kachayev @cleversonahum -@eleurent @ac-93 +@eleurent @ac-93 cove9988