Conversation
| deps = | ||
| pytest | ||
| pytest-forked | ||
| -e . |
There was a problem hiding this comment.
because this line is -e . instead of -e .[all], the extensions (atari-py, box2d-py, mujoco-py) will not be installed, and respective tests will be skipped.
robertnishihara
left a comment
There was a problem hiding this comment.
This looks good to me! Thanks for doing that.
gym/envs/classic_control/cartpole.py
Outdated
| @@ -1,3 +1,4 @@ | |||
| # coding=UTF-8 | |||
There was a problem hiding this comment.
is it better to just remove the fancy symbols for this file? Also what error does this actually fix?
There was a problem hiding this comment.
@christopherhesse I am using Python 2.7 and fired up a fresh virtual env. I installed gym by cloning the repository and doing pip install -e .. Then I get this when trying to make the environment:
seita@machine:~/gym-test$ ipython
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
Type "copyright", "credits" or "license" for more information.
IPython 5.8.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import gym
In [2]: gym.__version__
Out[2]: '0.11.0'
In [3]: env = gym.make('CartPole-v0')
File "/home/seita/gym/gym/envs/classic_control/cartpole.py", line 26
2 Pole Angle -24° 24°
^
SyntaxError: Non-ASCII character '\xc2' in file /home/seita/gym/gym/envs/classic_control/cartpole.py on line 27, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
If possible I recommend removing all the degree symbols and other stuff that is causing the error.
There was a problem hiding this comment.
there are unicode symbols for degrees in the cartpole description (and python2 complains about it unless encoding is specified explicitly). But you make a good point, it is probably simpler to just remove those symbols. Let me see if I can do that without readability suffering too much
christopherhesse
left a comment
There was a problem hiding this comment.
LGTM, only one minor question.
|
@DanielTakeshi @robertnishihara should be all clear now |
* add py27 test environment (sans box2d and atari) * skip mujoco tests if mujoco_py not present * re-enable python3 tests * remove unicode symbols * remove more unicode symbols
add tests of bare gym (without extensions) with python2.7. Mainly ensures that there is no syntactic incompatibility with python 2.7.