-
Notifications
You must be signed in to change notification settings - Fork 54
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
Introducing pylint in our workflow #278
Introducing pylint in our workflow #278
Conversation
OK, I figured this did not work out as in my fork due to permissions granted to the GITHUB_TOKEN. Is it reasonable to adjust these, in order to post the score as comment or are you aware of another way? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## RC_v1.5.x #278 +/- ##
=============================================
+ Coverage 56.79% 56.89% +0.09%
=============================================
Files 20 20
Lines 3435 3438 +3
=============================================
+ Hits 1951 1956 +5
+ Misses 1484 1482 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I'm happy for us to adjust these. For adding the coverage bot, I ended up doing my work in a branch of the main repo rather than on a personal fork; that might be helpful here? |
That's a good point @freemansw1, will do! |
@JuliaKukulies Do you want this in v1.5.0, or are you happy to wait for a later release? |
@freemansw1 later release, thanks for asking! This is really not urgent and that will give me some time to figure out how to do that the smartest way |
Like #258 we can introduce workflow actions independently of releases, correct? |
That makes sense, yes! |
Hej all, this is also nearly ready! @fziegner has a nice working version there. Workflow: Fabian is updating his PR onto Julias fork. After Julia has accepted this PR should be ready to be reviewed. |
fixed score comparison of branches and added short description
@fziegner do you know why the linting fails here? |
From the comments earlier this year it looks like it was already changed but can you check if the Workflow has Write access? (https://stackoverflow.com/a/76199390) |
This was indeed changed, and I can confirm "Workflows have read and write permissions in the repository for all scopes." |
OK, I think I figured out the issue. See my discussion in #373 |
We can either close this PR or modify it to just be the enhanced linting. Your choice, @fziegner @JuliaKukulies |
This PR addresses #273 and adds a
pylint
check in the github actions.pylint
is run on PRs to theRC_*
branch and the resulting score is posted as a comment to the respective PR. The full length output of the linting can be seen in the details of the action.In addition, I fixed the unused import issues in our modules. The resulting score for the entire tobac package is currently 8.78/10 (if conventions are disabled ) and 6.72/10 if not -- not so bad actually.
What I did not manage to implement, though, was to compare the score of PRs to previous scores (i.e. the score of the current
main
. This would be valuable because it would tell contributors if the score has deteriorated. Given that the python environment is re-installed with every action, the previous scores are not stored. I tried both caching of the python environment as well as runningpylint
onmain
within the steps of an action, but both did not seem to work. Any ideas on how to achieve this?