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

add depedabot for dependency tracking/updating #178

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Conversation

zain-sohail
Copy link
Member

@zain-sohail zain-sohail commented Oct 13, 2023

With the discussion in PR #151 , we want automatic dependency updates every so often. Depedanbot is a tool by github to perform just this function. It creates a PR weekly (or any time duration) with all the outdated dependencies to update them, and those can be manually merged (or auto if wished).
Initally I had other ideas on how to do this but dependabot is very well integrated in github environement (see insights or security)

example is PR #179 in which dependabot suggested us a security update for numpy. For general updates, it will only do so once we merge this branch to main and then it will group all the updates in one PR (hard to test without trying).

@coveralls
Copy link
Collaborator

coveralls commented Oct 13, 2023

Pull Request Test Coverage Report for Build 6547762474

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 90.556%

Files with Coverage Reduction New Missed Lines %
sed/calibrator/energy.py 2 91.86%
Totals Coverage Status
Change from base Build 6538692896: 0.02%
Covered Lines: 4296
Relevant Lines: 4744

💛 - Coveralls

@rettigl
Copy link
Member

rettigl commented Oct 14, 2023

Well, I think there were good reasons we fixed at least some of the package versions to where they are. I tried to solve the mypy issues with the new numpy version, but couldn't, at least some of them. For, me, not worth spending the time right now. Updating packages, please automatically, dependencies, only manually.

@rettigl
Copy link
Member

rettigl commented Oct 14, 2023

As long as such PRs don't automatically come up every week again once we decide against updating, I'm also fine with that. In general, it's probably a good idea installing such a guard.

@zain-sohail
Copy link
Member Author

As long as such PRs don't automatically come up every week again once we decide against updating, I'm also fine with that. In general, it's probably a good idea installing such a guard.

The alerts can be dismissed here:
https://github.com/OpenCOMPES/sed/security/dependabot
Screenshot 2023-10-16 at 12 50 42

I will wait for PR approval if there are no additional concerns.

@zain-sohail zain-sohail requested a review from rettigl October 16, 2023 10:54
@zain-sohail zain-sohail self-assigned this Oct 16, 2023
@rettigl
Copy link
Member

rettigl commented Oct 16, 2023

As long as such PRs don't automatically come up every week again once we decide against updating, I'm also fine with that. In general, it's probably a good idea installing such a guard.

The alerts can be dismissed here: https://github.com/OpenCOMPES/sed/security/dependabot Screenshot 2023-10-16 at 12 50 42

I will wait for PR approval if there are no additional concerns.

Ah, this is good. I like this mechanism in general, let's give it a try and let's see how it goes.

Copy link
Member

@rettigl rettigl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this do what we need, i.e. update all package dependencies to the latest versions compliant with our dependency rules? Will this also update the versions in the lock file if there are no security problems, but just a version update?
What we need, is essentially a
poetry update
comitt + push poetry.lock
in the poetry environment with all options installed

@rettigl
Copy link
Member

rettigl commented Oct 16, 2023

Does this do what we need, i.e. update all package dependencies to the latest versions compliant with our dependency rules?

Most certainly not. In the np-to-1.22.0 PR, Numpy was set to 1.22.0 in the lock file, whereas it will become 1.22.4 from the pyproject.yaml file if you install via pip, or do poetry update. So no, we need something else in addition.

@zain-sohail
Copy link
Member Author

Does this do what we need, i.e. update all package dependencies to the latest versions compliant with our dependency rules? Will this also update the versions in the lock file if there are no security problems, but just a version update? What we need, is essentially a poetry update comitt + push poetry.lock in the poetry environment with all options installed

What happened in #179 is not the purpose of this PR. The security updates come seperately from dependabot because I enabled that.
This PR would do the regular weekly updates to the latest versions. Again, I can not be sure but this is what the documentation and my search on the internet has told me.

If it doesn't, it's quite trivial to update poetry lock with a cron job since we already have the infrastructure (workflows) setup.

Copy link
Member

@rettigl rettigl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you are right and this does what we want. I think it will only run if it is in main, so let's test out.

@rettigl rettigl merged commit dec4b1d into main Oct 18, 2023
2 checks passed
@rettigl rettigl deleted the dependabot-test branch October 18, 2023 20:19
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.

3 participants