I configured CI as python -m pytest -v --cov-report term --cov=./src and codecov after success.
I would like to get the final coverage order by (sorted by) Cover column in descending order (from 100% at the top and 0% at the bottom). However, I can not find such options.
Is it possible? I've taken a look at codecov --help, but also didn't help.
Is there any option to achieve the desired result?
If you go to the Files tab on the commit page in Codecov, you can view all the files in expanded by clicking the button on the top right corner. Then, just click on Coverage to sort by that field.
An open-source example:
https://codecov.io/gh/nodejs/node/list/289d6cf26f56e0d948dee7b3983228472bfb317d/
Click the file-type selector to expand files
Click coverage to sort by value
Related
I am using the pendant drop plug in (http://www.msc.univ-paris-diderot.fr/~daerr/misc/pendent_drop.html) to get the surface tension of droplets. It produces a table of results in a window called Results, however, it does not have the usual file, save as etc options. Also, when I try the getResults and nResults command in macro it doesnt give me any results and says the number of results is .
Do I need to edit the plug in to be able to output the results? My aim is to output the results as a csv file.
Pendent Drop is an ImageJ2-style plugin that generates a SciJava Table. In an up-to-date Fiji installation, you can save such tables using File > Export > Table....
The macro functions getResults and nResults do not work on those tables, because they require an ImageJ1 ResultsTable window.
See also this topic on the image.sc forum. In general, questions like this one are much better asked on https://forum.image.sc (see also the description of the imagej tag).
I have to parse some Lab Reports and I am using Tesseract to extract data from them. I have encountered an issue that Tesseract does not correctly recognize the text if I pass entire page's image. But if I pass a small subsection of page (from Test Report covering the entire table till *****) it is able to read all the text correctly.
In the formal case (when I pass the entire image) it produces some random text output of English words which do not make sense. Part of text is as follows:
Command I ran: tesseract -l eng report.png out
Refierence No : assurcAN, 98941-EU
5:er Nu (SKU) , 95942, 95943
Labelled age gwup “aw
Quamny 20 pweces
Fackagmg pmwosd Yes
Vendor
Manmamurer
But when I pass the subsection, I get accurate results.
What might be the issue here? How do I fix it?
See the sample report image:
When used as a mergetool for Git, what is the equivalent in vimdiff to kdiff3's "Select Lines(s) From A/B/C"? Is there a shortcut for that like Ctrl+1/2/3 in kdiff3?
Based on the Vim Reference Manual section for vimdiff, there are no built-in commands with the full functionality of Ctrl+1/2/3 in vimdiff. What I mean by "full functionality" is that in kdiff3 you could do the commands Ctrl+2, Ctrl+3, Ctrl+1 in that order, and in the merged version you end up with the diff lines from buffer B followed by the lines from buffer C followed by the lines from buffer A.
There is, however, a command for performing a more limited version of the functionality available in kdiff3. If you only want to use lines from one of your input files, then the command [count]do is available, where [count] is typically 1,2, or 3 depending on which vim buffer you want to pull the lines from. (do stands for "diff obtain".)
For example, if you had the following merge situation:
then you could move your cursor to the merge conflict in the bottom buffer and type 1do if you wanted "monkey", 2do if you wanted "pig", or 3do if you wanted "whale".
If you do need to grab lines from multiple buffers when merging with vimdiff, then my recommendation would be to set the Git config option merge.conflictstyle to diff3 (git config merge.conflictstyle diff3) so that the common ancestor appears in the merged buffer of the file, as shown in the screenshot above. Then just move the lines around to your liking using vim commands and delete the diff notations and any unused lines.
Lcov has genhtml tool which converts the lcov coverage info file into HTML report. It is possible to color code the results table- indicating low, medium and high coverage with following lcov configuration file options:
genhtml_hi_limit
genhtml_med_limit
However these limits seem to apply globally to all types of coverage metrics i.e. line, function and branch. Is there a way to set individual limits for the line, function and branch coverage metrics? Or can this be achieved with CSS somehow?
Although genhtml documentation describes only about the global limits, on inspecting the source, there is following limits than can be set in lcovrc file to set colors specific to coverage types.
genhtml_branch_hi_limit, genhtml_branch_med_limit
genhtml_function_hi_limit, genhtml_function_med_limit
When I run Apple's Automator to simply cut a bunch of images in their size Automator will also reduce the quality of the files (jpg) and they get blurry.
How can I prevent this? Are there settings that I can take control of?
Edit:
Or are there any other tools that do the same job but without affecting the image quality?
If you want to have finer control over the amount of JPEG compression, as kopischke said you'll have to use the sips utility, which can be used in a shell script. Here's how you would do that in Automator:
First get the files and the compression setting:
The Ask for Text action should not accept any input (right-click on it, select "Ignore Input").
Make sure that the first Get Value of Variable action is not accepting any input (right-click on them, select "Ignore Input"), and that the second Get Value of Variable takes the input from the first. This creates an array that is then passed on to the shell script. The first item in the array is the compression level that was given to the Automator Script. The second is the list of files that the script will do the sips command on.
In the options on the top of the Run Shell Script action, select "/bin/bash" as the Shell and select "as arguments" for Pass Input. Then paste this code:
itemNumber=0
compressionLevel=0
for file in "$#"
do
if [ "$itemNumber" = "0" ]; then
compressionLevel=$file
else
echo "Processing $file"
filename="$file"
sips -s format jpeg -s formatOptions $compressionLevel "$file" --out "${filename%.*}.jpg"
fi
((itemNumber=itemNumber+1))
done
((itemNumber=itemNumber-1))
osascript -e "tell app \"Automator\" to display dialog \"${itemNumber} Files Converted\" buttons {\"OK\"}"
If you click on Results at the bottom, it'll tell you what file it's currently working on. Have fun compressing!
Automator’s “Crop Images” and “Scale Images” actions have no quality settings – as is often the case with Automator, simplicity trumps configurability. However, there is another way to access CoreImage’s image manipulation facilities whithout resorting to Cocoa programming: the Scriptable Image Processing System, which makes image processing functions available to
the shell via the sips utility. You can fiddle with the most minute settings using this, but as it is a bit arcane in handling, you might be better served with the second way,
AppleScript via Image Events, a scriptable faceless background application provided by OS X. There are crop and scale commands, and the option of specifying a compression level when saving as a JPEG with
save <image> as JPEG with compression level (low|medium|high)
Use a “Run AppleScript” action instead of your “Crop” / “Scale” one and wrap the Image Events commands in a tell application "Image Events" block, and you should be set. For instance, to scale the image to half its size and save as a JPEG in best quality, overwriting the original:
on run {input, parameters}
set output to {}
repeat with aPath in input
tell application "Image Events"
set aPicture to open aPath
try
scale aPicture by factor 0.5
set end of output to save aPicture as JPEG with compression level low
on error errorMessage
log errorMessage
end try
close aPicture
end tell
end repeat
return output -- next action processes edited files.
end run
– for other scales, adjust the factor accordingly (1 = 100 %, .5 = 50 %, .25 = 25 % etc.); for a crop, replace the scale aPicture by factor X by crop aPicture to {width, height}. Mac OS X Automation has good tutorials on the usage of both scale and crop.
Eric's code is just brilliant. Can get most of the jobs done.
but if the image's filename contains space, this workflow will not work.(due to space will break the shell script when processing sips.)
There is a simple solution for this: add "Rename Finder Item" in this workflow.
replace spaces with "_" or anything you like.
then, it's good to go.
Comment from '20
I changed the script into a quick action, without any prompts (for compression as well as confirmation). It duplicates the file and renames the original version to _original. I also included nyam's solution for the 'space' problem.
You can download the workflow file here: http://mobilejournalism.blog/files/Compress%2080%20percent.workflow.zip (file is zipped, because otherwise it will be recognized as a folder instead of workflow file)
Hopefully this is useful for anyone searching for a solution like this (like I did an hour ago).
Comment from '17
To avoid "space" problem, it's smarter to change IFS than renaming.
Back up current IFS and change it to \n only. And restore original IFS after the processing loop.
ORG_IFS=$IFS
IFS=$'\n'
for file in $#
do
...
done
IFS=$ORG_IFS