-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 doc warnings #287
Comments
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/mclennan_tourky.py:docstring of quantecon.game_theory.mclennan_tourky.mclennan_tourky:18: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/normal_form_game.py:docstring of quantecon.game_theory.normal_form_game.NormalFormGame:10: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/normal_form_game.py:docstring of quantecon.game_theory.normal_form_game.Player.best_response:6: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/normal_form_game.py:docstring of quantecon.game_theory.normal_form_game.Player.best_response:17: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/normal_form_game.py:docstring of quantecon.game_theory.normal_form_game.Player.best_response:34: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/normal_form_game.py:docstring of quantecon.game_theory.normal_form_game.Player.payoff_vector:12: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/random.py:docstring of quantecon.game_theory.random.covariance_game:24: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/game_theory/random.py:docstring of quantecon.game_theory.random.random_game:17: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/core.py:docstring of quantecon.markov.core.MarkovChain.is_aperiodic:0: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/core.py:docstring of quantecon.markov.core.MarkovChain.num_recurrent_classes:3: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/core.py:docstring of quantecon.markov.core.MarkovChain.recurrent_classes:0: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/core.py:docstring of quantecon.markov.core.mc_sample_path:27: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/ddp.py:docstring of quantecon.markov.ddp.DiscreteDP.operator_iteration:12: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/ddp.py:docstring of quantecon.markov.ddp.DiscreteDP.operator_iteration:13: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/random.py:docstring of quantecon.markov.random.random_discrete_dp:45: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/random.py:docstring of quantecon.markov.random.random_markov_chain:27: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/random.py:docstring of quantecon.markov.random.random_stochastic_matrix:26: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/random.py:docstring of quantecon.markov.random.random_stochastic_matrix:31: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/random/utilities.py:docstring of quantecon.random.utilities.probvec:20: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/random/utilities.py:docstring of quantecon.random.utilities.sample_without_replacement:24: WARNING: Block quote ends without a blank line; unexpected unindent.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/compute_fp.py:docstring of quantecon.compute_fp.compute_fixed_point:57: WARNING: Block quote ends without a blank line; unexpected unindent. |
/Applications/anaconda/lib/python3.6/site-packages/quantecon/markov/ddp.py:docstring of quantecon.markov.ddp.DiscreteDP:85: WARNING: Inline substitution_reference start-string without end-string.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/quad.py:docstring of quantecon.quad.quadrect:13: WARNING: Inline emphasis start-string without end-string.
/Applications/anaconda/lib/python3.6/site-packages/quantecon/quad.py:docstring of quantecon.quad.quadrect:13: WARNING: Inline strong start-string without end-string. |
Thanks @oyamad. This is helpful. I will add a review of readthedocs to my list. |
The page: http://quanteconpy.readthedocs.io/en/latest/game_theory/lemke_howson.html doesn't seem to be bringing the docstring through. http://quanteconpy.readthedocs.io/en/latest/game_theory/mclennan_tourky.html on readthedocs |
And this page: Also this page has not been updated: |
These pages display the docstrings locally on my machine. |
I guess this line has to be updated. Does any process update this file |
This is looking better: http://quanteconpy.readthedocs.io/en/rtd-env-update/ |
Very good. What is the difference between "stable" and "latest"? I thought "stable" is from the released version and "latest" from |
we just had the same thought :). I am looking into that now in the rtd setup. I agree. I think stable should be the latest release and latest should be master. |
ah ha. So the adjustments we've made to documentation isn't contained in |
|
|
For example, in http://quanteconpy.readthedocs.io/en/latest/game_theory/lemke_howson.html: Do we really need the |
See #291 where |
Another task
Some of this has now been addressed:
|
The Warning message
to
But I don't know if it's a proper way, as usually there is no such empty line in most of docstrings. |
The problem is that the list of parameter types is too long that def random_game(nums_actions, random_state=None):
"""
...
Parameters
----------
...
random_state : scalar(int) or np.random.RandomState, optional(default=None) would exceed the maximum line length 72 for docstrings. One option is to shorten the description to random_state : int or np.random.RandomState, optional(default=None) or random_state : scalar(int) or np.random.RandomState, optional |
It seems that docs of Numpy are using the latter one, and declare the default value in the detailed descriptions of parameters. Should I apply this modification to the files with warning messgaes? |
What are the other cases that yield the |
I have checked all the |
Other than these warnings, the only one left is
And this is caused by using |
@shizejin Will you change all the |
There is one more in compute_fp.py. Please change method : str in {'iteration', 'imitation_game'},
optional(default='iteration')
Method of computing an approximate fixed point to method : str in {'iteration', 'imitation_game'}, optional
Method of computing an approximate fixed point
(default='iteration') |
Regarding Please change random_state : scalar(int) or np.random.RandomState,
optional(default=None) to random_state : int or np.random.RandomState, optional(default=None) (I think this looks better.) |
Changes have been done. Other than cases that can be solved by changing
How to deal with these? |
Hey @shizejin and @oyamad. Just letting you know I am running some setup workshops today for some new QuantEcon RA's. So I won't get to look into this issue until tomorrow (most likely). I wonder if there is a |
method : str in {'value_iteration', 'vi', 'policy_iteration',
'pi', 'modified_policy_iteration', 'mpi'},
optinal(default='policy_iteration')
Solution method. to method : str, optinal(default='policy_iteration')
Solution method, str in {'value_iteration', 'vi',
'policy_iteration', 'pi', 'modified_policy_iteration',
'mpi'}. and format : str in {'bsr', 'csr', 'csc', 'coo', 'lil', 'dia', 'dok'},
optional(default='csr')
Sparse matrix format. Relevant only when sparse=True. to format : str, optional(default='csr')
Sparse matrix format, str in {'bsr', 'csr', 'csc', 'coo', 'lil',
'dia', 'dok'}. Relevant only when sparse=True.
data : array_like(Player) or array_like(int, ndim=1) or
array_like(float, ndim=2 or N+1) to data : array_like of Player, int (ndim=1), or float (ndim=2 or N+1) Thanks! |
Sure. I have done these changes. Also, in the opponents_actions : array_like(int or array_like(float)) or
array_like(int, ndim=1) or scalar(int) to opponents_actions : array_like(int or array_like(float)) or int I omit "array_like(int, ndim=1)" as I think it is included in "array_like(int or array_like(float))", and otherwise I can not shorten the sentence to be under 79. Do you think this change is acceptable? Now that there is no any warning message, I will do PR if you think it's okay. |
"array_like(int, ndim=1)" should have been "array_like(float, ndim=1)". What about just opponents_actions : scalar(int) or array_like |
Looks concise and accurate. Should I do PR based on this? |
Example: https://github.com/QuantEcon/QuantEcon.py/blob/master/quantecon/cartesian.py#L16
Change
Parameters:
toParameters
The text was updated successfully, but these errors were encountered: