-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 Sphinx warnings #1442
Fix Sphinx warnings #1442
Conversation
Fixes warnings in the .py files
@prerna135 Travis broken because flake8 detect some issues like |
gensim/models/coherencemodel.py
Outdated
@@ -113,16 +113,18 @@ class CoherenceModel(interfaces.TransformationABC): | |||
def __init__(self, model=None, topics=None, texts=None, corpus=None, dictionary=None, | |||
window_size=None, coherence='c_v', topn=10, processes=-1): | |||
""" | |||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? We're trying to use the Google Code Style consistently, let's stick to that :) CC @menshikh-iv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It gave an unexpected section title and expected indentation warning during make clean html
. And it seemed like the reST Sphinx format was being followed, according to which a keyword followed by a colon followed by some text is a description list. And an underlined keyword is a section title. Also, text in a description list should be indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prerna135 Please look at the example and check that plugin works correctly (napoleon ext for sphinx)
@menshikh-iv Fixing warnings in the .py files according to the Google Code Style. Most of the warnings were due to indentation errors.
Awesome! These sphinx errors have been a pain in the butt for a long time, thanks @prerna135 :) |
Let's continue:+1: Before: |
build succeeded, 21 warnings. Getting there. :-)
@menshikh-iv This is with reference to the above commit. It's weird that the Travis build fails since the doc2vec and word2vec files were not modified at all. They were just renamed from .rst to .inc to remove the duplicate citation errors. Any idea as to why this happened? |
@prerna135 It seems like the tests are failing due to unwanted flake8 checks being done for |
Now I'm down to, `build succeeded, 5 warnings.` However, I'm in a bit of a fix. Changing `doc2vec.rst` and `word2vec.rst` to `.inc` files removed the duplicate warnings but it also invalidates the references to these documents from my main toctree and the following warnings are produced. `apiref.rst:8: WARNING: toctree contains reference to nonexisting document u'models/doc2vec'` `apiref.rst:8: WARNING: toctree contains reference to nonexisting document u'models/word2vec'`
ping @menshikh-iv |
Good job @prerna135:
let's continue, you're almost done 👍 |
@menshikh-iv Only 1 unfathomable warning left! I can't, for the life of me, seem to figure out where this indentation error is! There seems to be some sort of problem with the mathematical formula for cosine_similarity in
|
Nice work @prerna135 🥇 |
There are many warnings when generating the Sphinx documentation for gensim, see #1192 .
The issues are due to badly formatted
.rst
markup, paper citations, indentation etc. This PR fixes them.