-
Notifications
You must be signed in to change notification settings - Fork 224
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
CI: Install dvc via uv in the "GMT Tests" workflow #3695
Conversation
c398edc
to
aa06f58
Compare
- name: Install dvc | ||
run: | | ||
uv venv | ||
source .venv/bin/activate | ||
uv pip install dvc | ||
uv pip list | ||
|
||
# Pull baseline image data from dvc remote (DAGsHub) | ||
- name: Pull baseline image data from dvc remote | ||
run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ | ||
run: | | ||
source .venv/bin/activate | ||
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can combine the "Install dvc" and "Pull baseline image data from dvc remote" steps into one step "Setup DVC and pull baseline image data from dvc remote", so we don't have to source .venv/bin/activate
twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just keep this as is, since I'm assuming this will be a temporary workaround until conda-forge's dvc
supports Python 3.13. We might want to revert the changes here after a few months, so best to have two separate steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wish that setup-dvc
was faster on Windows, but ok to go with this here.
- name: Install dvc | ||
run: | | ||
uv venv | ||
source .venv/bin/activate | ||
uv pip install dvc | ||
uv pip list | ||
|
||
# Pull baseline image data from dvc remote (DAGsHub) | ||
- name: Pull baseline image data from dvc remote | ||
run: dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ | ||
run: | | ||
source .venv/bin/activate | ||
uv run dvc pull --no-run-cache --verbose && ls -lhR pygmt/tests/baseline/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just keep this as is, since I'm assuming this will be a temporary workaround until conda-forge's dvc
supports Python 3.13. We might want to revert the changes here after a few months, so best to have two separate steps.
dvc is a complex package that has ~40 direct dependencies (https://github.com/iterative/dvc/blob/007041bfe953db08b832ddea2d3adeaeb74eec95/pyproject.toml#L33). The complicated dvc dependency tree sometimes causes failures or version conflicts e.g., #2468, #2338, #1544.
In #3490, we're trying to add the Python 3.13 support to PyGMT. That PR is stale because some dvc dependencies don't have 3.13 support yet (#3490 (comment)), and we may have to wait for a few more days or months.
Since dvc is a dev dependency, we don't have to wait for the conda-forge updates. This PR tries to install dvc in other ways. I've tried the following options:
pip
pip
on Linux/macOS andchoco
/winget
on Windowsuv
It turns out that installing dvc on Linux/macOS only takes ~10 seconds, but on Windows, options 1-3 take 60 seconds, except for option 4, which takes ~10 seconds on all platforms.
The CI job runs (https://github.com/GenericMappingTools/pygmt/actions/runs/12389452771/job/34582514750?pr=3695) for commit 83bb2d7 show that, with changes in this PR, we can continue the Python 3.13 support in PR #3490.