devlog 12
๐ข What are todayโs plans?
๐ I think we can start by improving xvc.py. Releasing I mean. Yesterday we finished our work with the Rust library.
๐ข Then we can start to look at the GUI I believe. We can replace that 3 column view with a table and preview. It will be much easier that way.
๐ Yep. Letโs finish and release the Python version first. Then weโll go on to GUI.
๐ข Letโs take a look at the PRs first.
ghpl
36 Bump pyo3 from 0.22.2 to 0.23.3 dependabot/cargo/pyo3-0.23.3 OPEN 2024-12-04T03:52:03Z
gh pr close 36
โ Closed pull request iesahin/xvc.py#36 (Bump pyo3 from 0.22.2 to 0.23.3)
๐ข We already have upgraded to pyo3 0.23. No need for this. Letโs create a PR for the current branch.
git push --set-upstream origin v0.6.13
ghpC --fill
https://github.com/iesahin/xvc.py/pull/37
๐ We can also tag and push the tags
๐ข Iโd like to have some more coverage for certain parts of the code. Letโs add some tests.
๐ It looks we lack the storage tests mainly. They need configuration to add keys to Github and we already skip some of these even in the Rust code.
๐ข Umm, I see. We also need a way to measure coverage. Could we do this with codecov, I wonder.
๐ I found an example here: https://github.com/codecov/example-python/blob/main/.github/workflows/ci.yml It needs coverage
and pytest-cov
in the requirements.
๐ข Letโs try this then.
๐ Added coverage.yml file. Itโs simpler than the other Github action. Need to update the token now.
๐ข There is an issue with installing the requirements.
๐ I forgot to add sudo to apt-get. Will take care of it now.
๐ข Letโs check the run.
ghrl
in_progress Release v0.6.13 coverage v0.6.13 pull_request 12556590550 2m31s 2024-12-31T06:59:58Z
in_progress Release v0.6.13 publish-to-pypi v0.6.13 pull_request 12556590548 2m31s 2024-12-31T06:59:58Z
...
๐ It takes a while and we still didnโt add the CODECOV_TOKEN.
๐ข Letโs add it and after that we need to take a look at this blink configuration. It adds letters after the selection.
๐ Added the secret and configured xvc.py for coverage. There is an error with the build though. Maybe the command we should be using is maturin develop
instead of build
to make Xvc available for the env.
๐ข Letโs update and try it then.
๐ maturin develop
requires a virtual environment.
๐ข I checked the options for build
and I think there is an option but letโs search first.
๐ I searched but it looks like we can just pass an --out
directory or install xvc
from target/wheels/
directory. The second option requires less maintenance.
๐ข Ok. Letโs add a step to the action then.
๐ Now, letโs wait for the run to finish with gh run watch
๐ข It failed. Letโs take a look at the logs:
ghrl
completed failure Release v0.6.13 coverage v0.6.13 pull_request 12556939836 3m26s 2024-12-31T07:38:54Z
gh run view 12556939836 --log-failed
๐ It looks some of the tests are failing. Letโs run the tests locally.
๐ข We should run with --forked
option and it looks we have a test to update with xvc file list.
๐ Updated the test and I noticed we forgot to supply the new --show-directories
option in the Python interface.
๐ข Yep. Passing these options as command line option in string is not robust. Itโs very easy to forget things. I think we should start using CLI structs directly but itโs not time yet.
๐ I agree. Itโs one of the goals for building a GUI actually.
๐ข The tests failed again.
ghrl | rg failure
completed failure Release v0.6.13 coverage v0.6.13 pull_request 12557031091 3m49s 2024-12-31T07:51:19Z
gh run view 12557031091 --log-failed
๐ There is a Git error now. We need to add Git user and email to the action.
๐ข Added those and watching the results again now.
๐ Why do you think the publish action work always? It can only run with the main branch I think. No need to run it with other pushes.
๐ข Yes, letโs configure it now.
ghrl | rg failure
completed failure Release v0.6.13 coverage v0.6.13 pull_request 12557083393 3m21s 2024-12-31T07:59:18Z
gh run view 12557083393 --log-failed
๐ It looks we also need xvc-test-helper
in the path. Letโs cargo install it and add it to path.
๐ข Added .cargo/bin
to path like
- name: Add cargo bin to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
and installed the helper with cargo install xvc-test-helper
.
๐ By the way, Github Copilot is hallucinating about a method to update path.
๐ข I searched and it may not be hallucinating. We can use ::add-path::
command with echo
it looks. This is new to me.
๐ The tests failed again.
ghrl | rg failure
completed failure Release v0.6.13 coverage v0.6.13 pull_request 12557208723 3m34s 2024-12-31T08:12:09Z
gh run view 12557208723 --log-failed
๐ข file().list()
had a mistake and we need to install rg for the tests.
๐ Watching the test run. In the meantime, maybe we can reviewโฆ
๐ข Failed again.
ghrl | rg failure
completed failure Release v0.6.13 coverage v0.6.13 pull_request 12557294105 3m46s 2024-12-31T08:21:17Z
gh run view 12557294105 --log-failed
๐ Added db.commit()
to two places in the code. This should pass now.
๐ข Yeah!
ghrl | head -n 1
completed success Release v0.6.13 coverage v0.6.13 pull_request 12557509836 3m46s 2024-12-31T08:44:33Z
gh run view 12557509836
โ v0.6.13 coverage iesahin/xvc.py#37 ยท 12557509836
Triggered via pull_request about 4 minutes ago
JOBS
โ linux in 3m36s (ID 35010253915)
ANNOTATIONS
! ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
linux: .github#1
For more information about the job, try: gh run view --job=35010253915
View this run on GitHub: https://github.com/iesahin/xvc.py/actions/runs/12557509836
๐ I canโt see a coverage report on codecov.io though.
๐ข It says no coverage report is generated. Letโs test to generate xml files locally.
๐ The option in the docs seems incorrect. --cov-branch
doesnโt produce anything.
๐ข Letโs wait the run again.
๐ Should we add a badge to the Readme?
๐ข It wonโt show much but yeah, letโs make it.
๐ The results are in and it shows 100% coverage. This means, it doesnโt actually test anything.
๐ข We need Rust coverage for this. Letโs search it.
๐ I found this: https://github.com/cjermain/rust-python-coverage It runs cargo llvm-cov with the project and measures test coverage. But we donโt have any Rust tests.
๐ข It looks we donโt need Rust tests. cargo llvm-cov
can check coverage with the Python as well.
$ cargo llvm-cov show-env --export-prefix
export RUSTFLAGS=" -C instrument-coverage --cfg coverage --cfg trybuild_no_target"
export LLVM_PROFILE_FILE="/home/.../rust-python-coverage/target/rust-python-coverage-%m.profraw"
export CARGO_INCREMENTAL="0"
export CARGO_LLVM_COV_TARGET_DIR="/home/.../rust-python-coverage/target"
๐ข Letโs take a look at what remained for 0.6.13.
๐ I think there is nothing left. Python must be published when we merged the PR.
๐ข Letโs take a look by searching xvc python
๐ pypi page is https://pypi.org/project/xvc/ and it still reports the version as 0.6.11. There must be something.
๐ข Now letโs take a look at
https://github.com/iesahin/xvc.py
๐ The run seems to be OK though.
https://github.com/iesahin/xvc.py/actions/runs/12557780141/job/35010938462
๐ข Maybe the version in pyproject.toml is still 0.6.11 and we forgot to update it?
tmux new-window -c $HOME/github.com/iesahin/xvc.py/ nvim
๐ There is no version string in ~/github.com/iesahin/xvc.py/pyproject.toml . Itโs dynamic.
๐ข Then, letโs try to publish from local now.
๐ The iex username requires an email verification.
๐ข It looks I publish xvc through iesahin account, not iex. Maybe I can add both accounts to the project.
๐ There seems to be no errors in PyPi site.
๐ข Updating the token. Letโs add the token to pass to run maturin publish
๐ Weโre receiving invalid or non-existent authentication information. Upgraded maturin to see if it fixes the issue.
๐ข We can also double check the key.
๐ Uploaded successfully from the local. Letโs check the job again.
๐ข There release job was skipped because we didnโt tagged after merge. https://github.com/iesahin/xvc.py/actions/runs/12557780141/job/35011303045 That was the reason, it looks.
๐ I should be more careful which is run and which is skipped.
๐ข Maybe we can relax the condition. We do this rarely. Maybe republishing is all right?
๐ Yep, removed that. The jobs are running now. Letโs watch them to see what happens when we publish some of the packages.
๐ข In the meantime letโs experiment with searching commands file with fzf-lua
๐ It requires to experiment more but we can start from https://github.com/ibhagwan/fzf-lua/wiki/Advanced#interactive-shell-command
๐ข The xvc publish jobs failed, btw
ghrl
completed failure Remove if condition from release publish-to-pypi v0.6.13 push 12568863716 15m26s 2025-01-01T08:30:03Z
gh run view 12568863716 --log-failed
...
Release Run actions/download-artifact@v4.1.7 Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
...
๐ It was using an older version of upload-artifact.
๐ข Rerunning the job and it looks it runs for both push to main
and tag with v0.6.13
. We can turn off push to main
I believe.
๐ There was a missing upload-artifact again. Fixed and updated the tags.
ghrl completed failure update upload-artifacts publish-to-pypi main push 12569060915 14m39s 2025-01-01T08:57:22Z
ghrf 12569060915
๐ข There are conflicts with uploaded artifacts now. We may need to clean up the artifacts manually.
๐ The conflicts were not about inter-workflow names. The names were conflicting because all files were named wheel. I added platform and target to the names to avoid conflicts.
๐ข Letโs wait then. Maybe it will work this time. Could you search for a Lua console for Neovim.
๐ Letโs try this one: return { โyarospace/lua-console.nvimโ, lazy = true, keys = โ`โ, opts = {}, }
๐ข I couldnโt make it run but wonโt spend much time ATM. How about the jobs?
ghrl
completed failure update upload artifact names publish-to-pypi v0.6.13 push 12569298414 13m57s 2025-01-01T09:27:00Z
ghrf 12569298414
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9180510Z ##[group]Run actions/download-artifact@v4
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9182098Z with:
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9182859Z name: wheels
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9183843Z merge-multiple: false
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9184817Z repository: iesahin/xvc.py
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9185820Z run-id: 12569298414
Release Run actions/download-artifact@v4 2025-01-01T09:40:52.9186903Z ##[endgroup]
Release Run actions/download-artifact@v4 2025-01-01T09:40:53.1937617Z Downloading single artifact
Release Run actions/download-artifact@v4 2025-01-01T09:40:53.4694769Z ##[error]Unable to download artifact(s): Artifact not found for name: wheels
Release Run actions/download-artifact@v4 Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact.
Release Run actions/download-artifact@v4 For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
๐ Now the download doesnโt work.
๐ข Update it to download using patterns
๐ Did so and letโs take a look the jobs again
ghrl
completed failure added pattern to download .github/workflows/publish.yml main push 12569456859 0s 2025-01-01T09:49:19Z
ghrv 12569456859
X main .github/workflows/publish.yml ยท 12569456859
Triggered via push about 3 minutes ago
X This run likely failed because of a workflow file issue.
For more information, see: https://github.com/iesahin/xvc.py/actions/runs/12569456859
๐ข The line with the pattern was said to be broken.
๐ Removed it and recommit.
ghrl
โ
completed success remove pattern to download all publish-to-pypi v0.6.13 push 12569509435 14m41s 2025-01-01T09:58:49Z
๐ข And now this completes v0.6.13
release.
๐ Weโll see how it will work next time.
๐ข Yep. Letโs move on to GUI for now. Is that ok with you?