Add update tool
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.
Thank you! Looks like a very interesting and useful solution. I'm going to try it myself!
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.
If you don't mind me asking, what does this solve that a
pip install --upgrade dissect
won't do?
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:
- editable installs of (some or all) dissect git repositories
- modified or non-strict
pyproject.tomldissect 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.
Hi @JSCU-CNI , please open an issue and attache this PR so we can schedule a review into our sprints.
Hi @JSCU-CNI, can you address the review comments or otherwise say if this PR is still necessary for you?