stumpy
stumpy copied to clipboard
Add additional checks to `min.py`
Currently, min.py finds and returns the minimum python, numba, numpy, and scipy versions that are compatible with the minimum supported python (i.e., NOT end-of-life). This is super handy but we can/should take this a step further and also have this script check the necessary files (i.e., pyproject.toml, requirements.txt, environment.yml, .github/worflows/github-actions.yml, and README.md) to detect whether those files have mismatches or need to be updated as well.
Note that we don't necessarily want to change these files by default but, instead, be able to first CHECK and notify the user of all of the mismatches. Then possibly add an argparse flag like -force or something that will automatically make the changes to those files.
@seanlaw I can take a crack at this one!
To clarify the request - the way I see it is as follows (please let me know if not the case)...
min.pyshould check all relevant files for minimum versions ofpython,numba,numpyandscipy- The relevant files are
pyproject.toml,requirements.txt,environment.yml,.github/workflows/github-actions.ymlandREADME.md - After
min.pychecks it should only notify the user if they require an updated version of any of the above packages across the above files - not updating those files to reflect the required version (for example ifnumbahas an incorrectly listed version onrequirements.txtthenmin.pywould only notify the user this is the case - not updatingrequirements.txt) - Then
argparsewould allow the user to explicitly force an update to those files?
@joehiggi1758 That sounds about right. Once the minimum supported python, numba, numpy, and scipy versions are determined by min.py (this is super fast), then, by default, also print all of the files (and line numbers like grep -n?? ) where we will need to also update this the version numbers.
For now, let's ignore the -force part and only focus on identifying the places where we would need to update files. I think that will get us pretty far (and may possibly be sufficient).
Sounds great - I'm on it!
@seanlaw hey Sean - hope you're having a wonderful day!
QQ - do I need to create a unit test for min.py when I make this contribution?
I'm about 95% done writing the new function and will likely create a PR by mid-week!
@joehiggi1758 Good question! No, you do not need to write a unit test as this script is mostly for us developers. Additionally, it's code coverage is omitted from the coverage reporting along with other accessory helper scripts that we employ that are never seen by STUMPY users