refactor: switch to uv for dependency management and build - #240
Conversation
nclarkz
left a comment
There was a problem hiding this comment.
Couple of updates due to failing github checks
Code reviewDocumentationAny new code includes all the following forms of documentation:
Functionality
Final approval (post-review)The author has responded to my review and made changes to my satisfaction.
Review commentsCurrently not passing github actions checks, that needs to be rectified prior to merging. Work is forked rather than branched, so need to clone the separate repo to test it works my end once it is passing the checks, would be worth branching rather than forking in the future for ease of peer review. Will need to update some of the documentation to reflect differing instructions for uv:
|
|
Something that's occurred to me because I've been looking at pandas versions for something else: your For reference, the big difference in pandas 3.0 is that it uses a |
- Add PD901 to ruff ignore list (fixes failing precommit checks) - Switched PR workflow to use uv sync/uv run pytest - Switched deploy workflow to use uv publish - Reverted ruff-suggested code changes in parser.py and test_utils.py - Restored isort in pre-commit-config.yaml - Update docs: branch_and_deploy_guide.md and contribution_guide.md for uv
|
@nclarkz Updated branch_and_deploy_guide.md (bump2version is updated to manual version update in init.py] and contribution_guide.md (done a full rewrite of setup section to use uv sync --group dev, uv run pytest, uv run pre-commit install) |
|
@coatet checked the uv.lock and it resolves correctly per Python version: pandas 2.0.3 only for Python <3.9, pandas 2.3.3 for 3.9–3.10, and pandas 3.0.2 for Python ≥3.11. Since the pyproject.toml has no version pin on pandas, uv.lock won't constrain downstream users. they willl resolve their own pandas version when they pip install rdsa-utils. The lock file only applies to development. |
coatet
left a comment
There was a problem hiding this comment.
@humnabaa Looks all good now! The CI/CD is failing for two reasons which should be quick to fix:
- The
ruff-formatpre-commit check is failing onhelpers/pyspark_log_parser/parser.pybecause of some odd reformatting. I've pointed it out below and think it should just be reverted. - All the builds are failing because Github Actions can't access our Artifactory, since that's where the uv.lock says to find the packages. This is correct for users but won't work for CI/CD. The solution I've used for this is to tell Github Actions to re-solve the dependencies using PyPi just before the sync. Adding
uv lock --default-index https://pypi.org/simplejust before theuv syncstep should fix it.
…ate lockfile to PyPI
Co-authored-by: Tom Coates-ONS <116095393+coatet@users.noreply.github.com>
Description
Please include a summary of the changes.
Closes #238
Type of change
Checklist: