-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
The Push for 90% Test Coverage #11885
Comments
There was a question elsewhere that I don't think has been answered yet about what happens when parallel workers try to write coverage data to the same cov file - I'm not sure whether or not this is happening on the buildbots. Setting the environment variable Also #11802 may make these numbers more honest (worse) when it gets merged. |
I'd be happy to try to handle the lines in |
@tkelman That was me asking, and I have a very strong suspicion that it isn't being handled, and that maybe the coverage is actually higher, because esp. heavily used things like |
I'll keep helping the best I can! 👍 for 100% |
Maybe dumb possibility: write files to |
That may be the simplest thing to do. |
@ScottPJones It would be best IMO to not mix up the testing with other PRs. That way we can fast track merging things that are focussed. |
Sounds like a good first step to me, as long as the same worker processes are used during the runtests (just in case the os could reuse the pid if the workers are forked during the testing) |
I haven't dug into how the buildbots are running things, but AFAIK we've always been measuring coverage of base with |
@timholy That's good, I'd been trying to run coverage tests on my laptop, and was getting things overwritten. It would be good to solve this though, so that we can speed up coverage testing. |
Happy to jump on |
Wonderful! Thanks so much, @davidagold. I have a weak commitment to |
My pleasure! To make things interesting, I will bet anybody a beverage of their choice (and some semblance of bragging rights) that I submit a PR with full coverage of |
Coverage has not run since June 22, and someone told me that this is because the nightly builds are failing - @staticfloat, is that true? I am pretty sure @carnaval's change hadn't made it in by that date. |
Yes it's true. I pushed out a change that will hopefully fix the nightly breakage today. We'll see I suppose. :) |
Someday @staticfloat will become so tired of my tedious "Hello, yes, it's me again, so about the coverage runs..." emails he will simply force ME to curate the buildbot! |
I've been running coverage tests manually (but haven't totally succeeded yet, because of lots of breakage with various unit tests if
|
And thus, the cycle continues. :)
This actually reminds me; the lack of this command line flag is ALSO holding up the coverage stats, since our song and dance so far has been to download the nightly generic linux tarballs (which rightly contain only |
Also, tests for JuliaLang#11885.
I would like to try number 11, |
I think many of the Keep in mind that to run the tests in your new file, you will need to add it to |
Testing integer conversions makes sense and would be a great addition, especially various tricky corner cases – i.e. making sure that converting a value equal to the largest/smallest representable number in the target type works while converting values just one more extreme raises an |
RFC: Additional string tests for #11885
My latest codecov results show us at 79.17% coverage. Keep up the great work, everyone! @dpsanders, I can't wait to see that number go up once your PR is merged. |
My PR is ready. I added some tests like those proposed by @StefanKarpinski. I may be off the radar for the next 10 days. |
One problem is that there is quote a lot of code in int.jl for 32 bit machines. Is there some way to test that? |
More tests are always useful and appreciated! You're added to the OP :) |
Question: should I include a test for a deprecation warning? |
Check out my PR #11976, where I added tests for deprecated functions. |
Thank you, Scott. I wonder, though, if I just X-Y problem'd y'all (or just On Wed, Jul 8, 2015 at 9:38 AM, Scott P. Jones [email protected]
|
It does, I was also using |
Ah, so the key is |
Okay, I think my tests are ready to go. PR here: #12086. Suggestions are of course welcome -- my working assumption is that my PR might need some iteration... |
@randyzwitch Now that my split up of |
I've mostly finished with |
Coverage has dropped to 64% for some reason https://codecov.io/github/JuliaLang/julia/base?ref=6aa15b859e1b114061439fa6640173d2978fed3d |
Seems to have dropped to 11% in the last day or so! https://codecov.io/github/JuliaLang/julia/commits |
#16501 |
I've been looking into #17990 and I was hoping to add some tests dealing with credentials and LibGit2. My current plan is to make a GitHub machine user associated with the JuliaLang org and utilize deploy keys (SSH access) and personal access tokens (HTTP access) which would have read-only access to a private JuliaLang repo. The issues I see with this plan is that it would require access to a private GitHub repo (which costs money) and that repo would be accessible by anyone with a copy to the Julia code base. Does this sound like a good plan or are there better ideas for testing credentials and LibGit2? |
I think we have free private repos in the JuliaCon org. I will verify that. |
Not sure if this the right place to report this, but code coverage dropped to 4%. 15 days ago. Something strange is going on? |
There's a chronic build failure going on that's probably related. I do wish that failing builds would report that coverage metrics are unavailable instead of reporting nonsense metrics. |
I'd be happy to try to handle the lines in printf.jl, if nobody else wants it. |
Looks like this issue should be closed, or perhaps renamed to "The Push for 95% Test Coverage" :) |
We also need to update the script to upload stdlib/*/src reports |
I think we should close this one. |
Agreed. |
The testing situation right now
The latest Codecov run shows a test coverage percentage of 83.24%. This is amazing work by all, but now let's push for that beautiful green badge, following the great work at #9493. @ViralBShah asked us to open new issues rather than keep accumulating comments over there. There are many files in Julia which are poorly covered, but some are more target-rich than others. In particular, the files / folders with the most lines missed are:
base/multi.jl
- 348 lines missedbase/pkg/entry.jl
- 284 lines missedbase/linalg/lapack.jl
-29352 lines missedbase/inference.jl
- 229 lines missedbase/printf.jl
- 234 lines missedbase/show.jl
- 170 lines missedbase/LineEdit.jl
- 199 lines missedbase/abstractarray.jl
-19619 lines missed - claimed by @davidagoldbase/REPL.jl
- 184 lines missedbase/stream.jl
- 169 lines missedbase/interactiveutil.jl
- 163 lines missed - claimed by @Rory-Finneganbase/string.jl
- 139 lines missed - claimed by @ScottPJonesbase/int.jl
-12781 lines missedlibgit2 folder
- 400 lines missedTo get to 90% coverage, we need to cover 3580 lines. If we focus on the above files, we can drastically improve their coverage and Julia's at once. I also like this set because there's a good spread across Julia functionality - linear algebra, strings, parallel processing, the REPL, etc.
Isn't That a Lot of Lines?
Yeah, it is. Luckily, we've already made great progress (we passed 80%!) thanks to a great group of new contributors. Spread out across a bunch of people, it's not so much work.
File specifics
lapack.jl
is the file I know best. There are many functions wrapped in there that "can't" be tested right now because they require matrix storage formats that Julia doesn't support, like banded or RFP. But there are also functions that do complicated factorizations that can be difficult to test without a lot of domain expertise. Linear algebra experts welcome!multi.jl
, the file in the worst state, has many methods for starting/stopping/talking to workers that have not been tested at all. Maybe this is an issue with the buildbots that @tkelman or @staticfloat can clarify more?In general the state of the REPL testing is quite poor. If someone would like to familiarize themselves with the REPL internals writing these tests would be a wonderful way to do so.
How you can help
If there's an area in the above list you have some expertise in or want to learn more about, feel free to "claim" the file and start testing the heck out of it! That's how I got involved in the linear algebra testing and it worked out pretty well 😉. The first set of tests was the hardest to write, but following the instructions in the OP of #9493 will get you most of the way there. You absolutely do not need to read the following 150+ comments! Following the Coveralls repo or the Codecov repo is a good way to track our progress, and you will be able to see your numbers go up.
If someone claims a file as their testing baby, I will check it off in the list above. If there's no checkbox, that file is up for grabs and in need of some awesome Julians, newbies or experienced, to write some tests for it!
We now have a Gitter chat-room: https://gitter.im/kshyatt/julia-coverage
"Help! I'm a first time contributor and I have no idea how to use Coveralls!"
Here's a step-by-step image guide to how I find things to test using Coveralls.
lapack.jl
here is in a bad state. Look at all those missed lines! Let's click on it and find something to test.The text was updated successfully, but these errors were encountered: