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?

/xvc.py/ /pypi/ /maturin/ /pytest/ /xvc-test-helper/ /codecov/ /coverage/