Hello, which is the “suggested” workflow to “patch” someone else package and (hopefully) automatically issue a pull request on the package ? I see that PkgDev no longer ship with a “submit(package)” function…
What I often do is
- fork the package on GitHub
] dev --local(in Julia) the fork (alternatively you can
git cloneand create a temp environment manually)
using Revise, using <ThePackage>
- Fix the package src code. Revise will automatically track the changes such that you can try out everything in the REPL interactively.
- After things are fixed, add a new test that tests the now corrected behavior.
git checkout -b myfixbranch, followed by
git add <files>and
git commit -m "my awesome fix".
git push --set-upstream origin myfixbranch(origin is my fork).
- Open the fork on GitHub and click on the green create pull request button that appears at the very top automatically.
Thank you… this should indeed work, but there isn’t any “shortcut” to avoid manually fork/clone/push ?
If I recall correctly, in the pre-1.0 era one could simply do:
- pkg> develop pkgName
- [patch, commit & test]
- using PkgDev; PkgDev.submit(pkgName)
EDIT: I can see there is already an other thread on this exact question… on that thread it is stated that “Once PkgDev is ready for 1.0 we hopefully have that workflow again” … but it was in 2018 :-/
By the way, is there any difference between
] dev pkgName and
] develop pkgName ?
In theory, if you’re following test-driven development, you should add the unit test before you correct the bug.
Of course I can’t say that I consistently follow this maxim…