Closed Mews closed 1 month ago
[!IMPORTANT]
Review skipped
Review was skipped as selected files did not have any reviewable changes.
Files selected but had no reviewable changes (1)
* tox.iniYou can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
This update enhances the development and continuous integration process for the Seluj78/flask-utils
repository. Key changes include the addition of flake8-bugbear
verification in linting, new dependencies in requirements-dev.txt
, a new GitHub Actions workflow for coverage using Codecov, and a Codecov badge in the README. These improvements aim to ensure code quality and provide better insights into test coverage.
File | Change Summary |
---|---|
.github/workflows/linting.yml |
Added a verification step for flake8 to ensure it picks up flake8-bugbear by running flake8 --version . |
requirements-dev.txt |
Added new packages: coverage , flake8-bugbear , and pytest-cov . Maintained existing packages. |
.github/workflows/coverage.yml |
Introduced a new workflow named "Coverage" that runs on PRs and pushes to the main branch, using tox and uploading reports to Codecov. |
README.md |
Added Codecov badge to display test coverage status. |
In code we trust, with linting tight,
Flake8-bugbear joins the fight.
Coverage reports, now we see,
With badges shining, proud and free.
Dependencies strong, our tests will run,
In Python's world, our work is done.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Hi there ! Thank you for the PR @Mews !
On the code side, it looks great to me ! 🙌
As for the commits, I would like you to adhere to the guideline (you can use scripts/lint-commits.sh
to check if they match).
Also I prefer to use rebase instead of merge to update branches. Could you do this and then we'll be able to merge your PR 🔥
Hi, sorry but this is my first time opening a pr and I'm still learning this git stuff so I'm not entirely sure how to fix those. Did I understand correctly that the commit messages should follow some sort of format? If so, is there some way to edit the commit messages or how do I proceed? Also I don't know what you mean by using rebase instead of merge. Sorry for the trouble
Hi, sorry but this is my first time opening a pr and I'm still learning this git stuff so I'm not entirely sure how to fix those. Did I understand correctly that the commit messages should follow some sort of format? If so, is there some way to edit the commit messages or how do I proceed? Also I don't know what you mean by using rebase instead of merge. Sorry for the trouble
Hey no worries, I'm happy to help ! We all had to learn at some point !
So yes that is correct. I personally like my commits to follow a format, which you can find described here. You can also find examples of commit messages following the rules here
As for editing a commit, I recommend you search online either how to do an interactive rebase (git rebase -i
) or use a UI editor which would allow you do to this easily.
Same thing for merge
vs rebase
, I advise you search online for what the difference are and how you can rebase your branch onto main
:)
I am not trying to be rude/lazy by not responding to your questions directly :) The biggest thing you can learn to be a good software engineer is searching yourself ;) Do let me know if you get stuck
@Seluj78
Maybe I'm wrong but it looks like I can only change the messages on commits that haven't been pushed?
I tried using git commit --amend -m "the message..."
and then git rebase --continue
but it didn't change any message, and then I tried using github desktop but it looks like there's no option for that either
Also I'm a bit confused about what you said about preferring rebase instead of merge to update branches. I probably understood it wrong, but isn't that something that you would have to do on your side?
Also, I was gonna change the commit messages to the following
CI/CD: Verify flake8 is picking up flake8-bugbear
and
Chore: Add flake8-bugbear to dev requirements
I couldn't really figure out how to run the lint-commits.sh
script so I'd just like to confirm that these messages are okay
Update: I think I figured out how to do it from this article https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message#commit-has-not-been-pushed-online
However, doing git rebase -i HEAD~3
opens some sort of text editor. I am able to replace pick
with reword
as per the article's instructions, but then I dont know how to save the file
@Seluj78 Okay I managed to change the commit messages! Now I just need help with that rebase vs merge thing
@Seluj78 Okay I managed to change the commit messages! Now I just need help with that rebase vs merge thing
That's great !
Indeed, you can do an interactive rebase to reword the commits like you did, which is perfect ! And yes, renaming your latest commit is easier since you can simply do git commit --amend
:)
Now as for rebase vs merge, if you look at https://github.com/Seluj78/flask-utils/pull/22/commits and https://github.com/Seluj78/flask-utils/pull/22/files you can see that you have merged
into this branch extra stuff that is not needed. A merge will add the changes on top of what you've made, whereas a rebase will place your new changes on top, which is what we want to have a nice history.
What you need to do it checkout your main
branch, update it from my remote (search on google how to update forked remote branch), then checkout your branch against, and do a git rebase main
and it will do it magically. Then all you need to do is git push --force
. More info can be found here: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
I don't think it did what it was supposed to ngl
I did git checkout main
git fetch upstream
git rebase upstream/main
git checkout add-flake8-bugbear
git rebase main
and git push --force
Hmm indeed it does seem to have removed your changes. Do you remember what you did to do it again ? What I would advise you to do is:
main
git log
and compare it to https://github.com/Seluj78/flask-utils/commits/main/ to make sure you have the same thing (same commits)Yeah I'll just make the branch again :P
Created this pull request in regards to issue #9
Changes
Summary by CodeRabbit
New Features
Chores
coverage
,flake8-bugbear
, andpytest-cov
.flake8-bugbear
is properly utilized.