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 update tool #64

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add update tool #64

wants to merge 7 commits into from

Conversation

JSCU-CNI
Copy link

@JSCU-CNI JSCU-CNI commented Sep 9, 2024

This PR adds an update utility to the dissect meta package and fixes #70. The goal is to provide users with one simple method of updating the dissect suite, no matter the installation method. The updater relies on the pyproject.toml dependencies definition.

We are open for better solutions. This script has worked well for us for some time, but perhaps we can find a better way to create a unified update solution.

@cecinestpasunepipe
Copy link

Thank you! Looks like a very interesting and useful solution. I'm going to try it myself!

@JSCU-CNI
Copy link
Author

Thanks @cecinestpasunepipe, please let me know what you think. I've added some more features in 2e09e83 and 6faacb7. Output should now show version changes and we now support editable git install updates too.

@Schamper Schamper self-requested a review September 10, 2024 11:13
@pyrco
Copy link
Contributor

pyrco commented Sep 12, 2024

If you don't mind me asking, what does this solve that a

pip install --upgrade dissect

won't do?

@JSCU-CNI
Copy link
Author

If you don't mind me asking, what does this solve that a pip install --upgrade dissect won't do?

That's a valid question, thanks for asking @pyrco. This is primarily helpful for installations with either:

  1. editable installs of (some or all) dissect git repositories
  2. modified or non-strict pyproject.toml dissect dependencies

If you have installed dissect using a "regular" pip install dissect, and you want to update to the latest non-pre release of dissect, this tool will still work for you, but you could indeed also use pip install -U dissect directly.

Unfortunately running pip install -U dissect will not cut it if you depend on for example dev versions of packages. If the defined version(s) in the pyproject.toml dependencies dict are broad (e.g. foo>1.0.0.dev,<2.0.0.dev) and pip has a local cache, pip will not even look in the remote registry for a newer version. Iterating over every dependency fixes that. This seems to be intended pip behaviour unfortunately.

We have had some hard to identify issues in the past due to some dependencies being out-of-date and some being up-to-date due to the described pip dependency resolving. This helper utility aims to remove these struggles once and for all by providing a unified known-good updating method, no matter the installation method (git+editable, pypi) or dependency definition (regular or modified) that was used.

@EinatFox
Copy link

EinatFox commented Oct 2, 2024

Hi @JSCU-CNI , please open an issue and attache this PR so we can schedule a review into our sprints.

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.

Add update tool
5 participants