Code Monkey home page Code Monkey logo

Comments (10)

Delgan avatar Delgan commented on August 23, 2024 1

I was a little worried that adding tox would clutter the repository needlessly and badly integrate with Travis, but thanks to tox-travis this is not the case. Using tox is best practice anyway, so there is no reason not to use it.

Thanks for the suggestion! A PR would be much appreciated when you have a little time, as you are surely more used to tox than I am. 🙂

from loguru.

Delgan avatar Delgan commented on August 23, 2024 1

Cool.
I will also add some flake8 and pytest settings along the way: do you prefer to have them in setup.cfg (or maybe pyproject.toml), or within tox.ini then?

I wish to limit the number of files and settings to the bare minimum. If it can fit into the tox.ini, it's perfect.

How would the integration of flake8 looks like? This is very useful to improve overall code quality, on the other hand I don't want the CI tests to fail because of styling issues.

from loguru.

blueyed avatar blueyed commented on August 23, 2024

Cool.
I will also add some flake8 and pytest settings along the way: do you prefer to have them in setup.cfg (or maybe pyproject.toml), or within tox.ini then?

from loguru.

blueyed avatar blueyed commented on August 23, 2024

Going with tox.ini then.
I would just add some config for flake8, we do not have to inforce it, but it helps already when editing files (I am checking Python files using it by default). What max-line-length do you prefer?

from loguru.

Delgan avatar Delgan commented on August 23, 2024

Yes, flake8 integration for local development is something definitely missing in my workflow. This will be of great help, thank you!

The max-line-length should be 100.

from loguru.

qcoumes avatar qcoumes commented on August 23, 2024

@blueyed I can do it if you're too busy.

from loguru.

blueyed avatar blueyed commented on August 23, 2024

@qcoumes
Yeah, please go ahead. Thanks!

from loguru.

qcoumes avatar qcoumes commented on August 23, 2024

Alright !

@Delgan Do you want flake8 to be ran on tests/ ? Do you want travis to fail if flake8 fails on loguru/ ?

from loguru.

Delgan avatar Delgan commented on August 23, 2024

Thank you for taking care of this @qcoumes! :)

As I never really used them, I don't know how the integration of tox and flake8 will look like. Maybe start with just loguru/ and ignoring tests/ linting? There is quite a lot of files under tests/, and I never paid much attention to write clean code for the tests. I guess it may generate a whole bunch of warnings, I don't know if it worth the effort fixing them all.

One thing is for sure, I don't want flake8 failure to trigger travis build failure. It should help developers identify potential problems and improving code quality, but it should not be mandatory and should not punish contributors.

from loguru.

Delgan avatar Delgan commented on August 23, 2024

Closing as it has been fixed. 👍

from loguru.

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.