Coder Social home page Coder Social logo

comply to PEP8 about gensim HOT 8 CLOSED

piskvorky avatar piskvorky commented on May 10, 2024
comply to PEP8

from gensim.

Comments (8)

piskvorky avatar piskvorky commented on May 10, 2024

Scheduled for 0.8.0.

I'll probably add some wrappers to print deprecated warning when using the old names, together with hint how to fix it. To be completely removed in the next version (prolly 0.8.1).

from gensim.

piskvorky avatar piskvorky commented on May 10, 2024

Changed all function/variable names, commit 361003c3772cba677a80a57e0a7c3e648f42f6e0 .

There is no deprecated warnings, the changes weren't that many plus they're very straightforward (numTopics=>num_topics, addDocuments=>add_documents etc.).

from gensim.

piskvorky avatar piskvorky commented on May 10, 2024

reopening (forgot to change and test documentation as well :F )

from gensim.

piskvorky avatar piskvorky commented on May 10, 2024

Documentation updated in commit 88f2a3b .

All of gensim is now proper PEP8!

from gensim.

mcobzarenco avatar mcobzarenco commented on May 10, 2024

This is not the case anymore, (e.g. pyflake shows 63 warnings for models/wrappers/fasttext.py). Happy to PEP8 the whole repo and create a pr if that's cool.

from gensim.

piskvorky avatar piskvorky commented on May 10, 2024

@mcobzarenco what warnings are these? For example, we care more about readability than a strict 80-char-line limit.

But I also noticed some lapses (vertical indent in word2vec). @menshikh-iv what's the status on code style consistency in gensim?

from gensim.

menshikh-iv avatar menshikh-iv commented on May 10, 2024

@piskvorky

(math) ivan@P50:~/release/gensim$ git log | head -n5
commit e92b45d3f83ad670da9cf6ae20ae86a2a1c8558c
Author: jodevak <[email protected]>
Date:   Thu Oct 19 09:37:41 2017 +0300

    Add build_vocab_from_freq to Word2Vec, speedup scan_vocab (#1599)
(math) ivan@P50:~/release/gensim$ find gensim/ -name "*.py" | xargs flake8 --ignore=E501,E731,E12,W503,E402 --show-source
gensim/test/test_lsimodel.py:95:5: E303 too many blank lines (2)
    def testCorpusTransform(self):
    ^

from gensim.

mcobzarenco avatar mcobzarenco commented on May 10, 2024

Right, fair enough, all of the warnings were of the types you ignore above. Do you think we could we add those ignored rules to setup.cfg so they're documented and also ignored by default? I created a PR here #1636

from gensim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.