Skip to content
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

pre-commit flow for CI and standalone run #63

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vborchsh
Copy link
Contributor

@vborchsh vborchsh commented Oct 8, 2023

More contributors are here and I bring pre-commit formatter to CI to keep code in the same style. I think this might be useful for such a project. But we need to format WHOLE THE CODE.

So, I decided to leave this responsibility to @catkira as an owner and main contributor :) From my point it's better to include formatting as early as possible, otherwise it will be more and more painful.

I see several steps:

  1. Format the whole code with pre-commit run -a
    1.1 There are several exclude folders, and they won't affected
  2. Push this massive change to repos
  3. Check if pre-commit CI hooks works fine

I checked all of them, but we need to check hat everything is smooth in the main repo (here).

PS. The exact rules is point for discussion or modification. I've bring more or less default styles partially from cocotb CI flow.

@catkira
Copy link
Owner

catkira commented Oct 8, 2023

yes, that's a good idea.

@catkira
Copy link
Owner

catkira commented Oct 8, 2023

@vborchsh where is the screen width and indent configured?

@vborchsh
Copy link
Contributor Author

vborchsh commented Oct 9, 2023

@vborchsh where is the screen width and indent configured?

I've added line length=120 for example.

About indents - I'm not sure, flack8/black formatters are uncompromising here... But for me it's completely fine. Less settings - less pain.

@catkira
Copy link
Owner

catkira commented Nov 3, 2023

The problem with this PR is that the contributions will not be shown correctly anymore on Github. One would have to make a separate script that calculates contributions by not taking into account this commit. I would wait with this commit until this script is added, because I don't want to take away the visibility of contributions from other people.

But we can already add a commit hook that is active for new changes only - if that is possible.

@vborchsh
Copy link
Contributor Author

vborchsh commented Nov 3, 2023

The problem with this PR is that the contributions will not be shown correctly anymore on Github. ...

The commits statistic will be fine. The only issue is addition/deletions statistic right? And the later you do the worse it will :) Btw github has no option to exclude commits from contributors statistic, so I see no outs. Anyway, its up to you. Let's wait for possible workaround or fixes of this issue.

@catkira
Copy link
Owner

catkira commented Nov 3, 2023

The problem with this PR is that the contributions will not be shown correctly anymore on Github. ...

The commits statistic will be fine. The only issue is addition/deletions statistic right? And the later you do the worse it will :) Btw github has no option to exclude commits from contributors statistic, so I see no outs. Anyway, its up to you. Let's wait for possible workaround or fixes of this issue.

Yes Github cannot do it, other projects therefore of a separate file that how much each user contributed, for example this
https://github.com/analogdevicesinc/libiio/blob/main/Contributors.md

@vborchsh
Copy link
Contributor Author

vborchsh commented Nov 3, 2023

Also, you can expand this file: https://github.com/vborchsh/py3gpp/blob/master/pyproject.toml (authors) in automatic way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants