Git Product home page Git Product logo

Comments (11)

giovana-morais avatar giovana-morais commented on September 18, 2024 2

hey there! i've talked to @anapaulagomes and i'd like to take this issue. (:

from model_bakery.

giovana-morais avatar giovana-morais commented on September 18, 2024 2

hey @berinhard and @anapaulagomes !
I've just added black to our pre-commit file, tested it and some files were reformatted. πŸš€

now I'm trying to add it to Travis as well, but I never did this before and I'm kinda lost... should I add it to .travis.yml file? if so, where should I place it?

also, I thought about creating a CONTRIBUITING file or a section like that in the README, so we could explain a few things like "you have to add your ssh key to github, otherwise pre-commit won't work" (at least I had this problem hahah). what do you think? ☺️

from model_bakery.

giovana-morais avatar giovana-morais commented on September 18, 2024 2

Awesome! I've learned a lot so far. 😊

A few days ago, I've added black to tox.ini file and I tried to do tox -e black. It seemed to work fine. Also skipping pydocstyle helped me debug a lot. πŸ‘

Right now I'm trying to correct the tests/ files in some way that both black and flake8 will pass the test, because apparently they are conflicting (when one succeeds, the other one fails). If all works, I'll separate the black job.

Thanks for all the support! ❀️

from model_bakery.

anapaulagomes avatar anapaulagomes commented on September 18, 2024 1

That's great, @giovana-morais! Yes, you should add this command to the section script (https://github.com/model-bakers/model_bakery/blob/master/.travis.yml).

The contribution guide is a great idea but I think we already have one in place in our docs: https://model-bakery.readthedocs.io/en/latest/#contributing-to-model-bakery. It may need to be updated though... πŸ€” About this issue specifically, I think it's out of scope of this project.

Feel free to ping me if you have any questions. I'm commenting from my phone so I apologise if something is missing. Thank you!

from model_bakery.

berinhard avatar berinhard commented on September 18, 2024 1

Thanks @anapaulagomes for helping with this! I was traveling for the last few days with my family and I only got back to work today. Thanks @giovana-morais for all the effort as well!

from model_bakery.

anapaulagomes avatar anapaulagomes commented on September 18, 2024 1

Done #42. βœ”οΈ

from model_bakery.

anapaulagomes avatar anapaulagomes commented on September 18, 2024

Nice! I think would be nice to add it to Travis as well, @berinhard.

from model_bakery.

berinhard avatar berinhard commented on September 18, 2024

Sure @giovana-morais! Feel free to tackle this one and thanks for your help πŸ‘

from model_bakery.

giovana-morais avatar giovana-morais commented on September 18, 2024

Done! I added it before tox checks and now I'm running Travis CI in my branch to see if everything is okay in the build. I'm not sure if it's the best way to do so, but anyways. ahahah

I'm only having some trouble now because after black reformatted the source files, flake8 and pydocstyle are failing. Did this happen before? I can't commit the formatted files because of this. Sorry to bother D:

EDIT: I found out that when I try to build with Python 3.5 , pip install black won't work. Higher versions than that work, but then fail because the scripts are not formatted (yay!). Is there anything you know I can do to solve this?

from model_bakery.

anapaulagomes avatar anapaulagomes commented on September 18, 2024

Done! I added it before tox checks and now I'm running Travis CI in my branch to see if everything is okay in the build. I'm not sure if it's the best way to do so, but anyways. ahahah

No worries, I think you're in the right path. :)

I'm only having some trouble now because after black reformatted the source files, flake8 and pydocstyle are failing. Did this happen before? I can't commit the formatted files because of this. Sorry to bother D:

So, I've checked and seems that flake8 is failing on our tests module at least. Would you be kind to fix the issues there? About pydocstyle, I'd say to skip it this time - only because to solve it we'd have to add comments to many public methods. You can skip it using SKIP=pydocstyle before your git commit command (like SKIP=pydocstyle git commit -m "").

EDIT: I found out that when I try to build with Python 3.5 , pip install black won't work. Higher versions than that work, but then fail because the scripts are not formatted (yay!). Is there anything you know I can do to solve this?

I'm glad that it works! πŸŽ‰ Just now I realized that I suggested you to add to the script section. Sorry about that. The ideal place would be tox.ini file, like we did for flake8:

model_bakery/tox.ini

Lines 1 to 6 in e57b42f

[tox]
envlist =
py35-django{111,20,21,22}-{postgresql,sqlite}
py36-django{111,20,21,22}-{postgresql,sqlite}
py37-django{111,20,21,22}-{postgresql,sqlite}
flake8

and https://github.com/model-bakers/model_bakery/pull/39/files

BUT it will run for every job... And still break for 3.5. So, I left a comment about this in my PR (#39 (comment)) (cc @amureki, @berinhard). Since I'm not a Travis knight, let's put this part on hold and see what they say.

Good job so far! @giovana-morais

from model_bakery.

anapaulagomes avatar anapaulagomes commented on September 18, 2024

Ok, now (thanks to @amureki) we have separated job for flake8 (#40). You can use the same structure for black, @giovana-morais. 😬

from model_bakery.

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.