julia icon indicating copy to clipboard operation
julia copied to clipboard

Shortcut to test a local package

Open gitboy16 opened this issue 1 year ago • 5 comments

Hi, I think it would be nice to have something like:

julia --test-package=folder

To test a local package (a bit like cargo test in the rust world). Is it something that you would consider? Thank you

Related discussion: https://discourse.julialang.org/t/test-a-local-package/109974

gitboy16 avatar Feb 09 '24 10:02 gitboy16

I would say a possible plan is when https://github.com/JuliaLang/Pkg.jl/pull/3772 is landed, to make an app for Pkg itself and then this would be something just like pkg test

KristofferC avatar Feb 09 '24 10:02 KristofferC

Thank you @KristofferC . I hope we will be able to specify the path of the local package/library.

gitboy16 avatar Feb 09 '24 17:02 gitboy16

Note that you can just do julia folder/test/runtests.jl

stevengj avatar Feb 13 '24 19:02 stevengj

That doesn't set up the test environment

IanButterworth avatar Feb 13 '24 19:02 IanButterworth

In the meantime I just added the functionality to my "personal" juliaup version and I can make it work with different version of Julia. If you are interested let me know. I can post the code.

gitboy16 avatar Feb 13 '24 23:02 gitboy16

@KristofferC would you be open to the proposal in my very first comment if I do the PR? Thank you

gitboy16 avatar Mar 01 '24 18:03 gitboy16

Hi, I was wondering if you have any feedback please? Is ok to do a PR? Or are you against it? I really think it would be great to have an option for that. Thank you.

gitboy16 avatar Mar 11 '24 21:03 gitboy16

There will be a Pkg CLI app based on https://github.com/JuliaLang/Pkg.jl/pull/3772. Until then you can for example use https://github.com/fredrikekre/jlpkg

fredrikekre avatar Mar 11 '24 22:03 fredrikekre