Comments (12)
merge and will be soon available on cran with v = 0.2.3.
from badger.
Sure think, I'll issue the PR right away. As for the CRAN release, we're dependent on the maintainer (@GuangchuangYu).
from badger.
Awesome, thanks @wleoncio !
In the meantime, I'm wrapping a fix around the function when using it within my packages:
gsub("app.codecov.io","codecov.io", ## fix domain name
badger::badge_codecov()
)
from badger.
Hi folks! Thanks for everyones efforts and investigations! Its been a while since I looked at this but the issue seemed to resolve itself when I just tried it again
Using badger::badge_codecov()
and pasting its output in my README seemed to work well: https://github.com/fontikar/ohwhaley
Recently I taught a [R packages workshop ](https://fontikar.github.io/DIY_Rpkg_GHA/#Covering_your_bases_%F0%9F%AA%A4_with_codecov)
which involved setting up CodeCov and adding a badge. The participant's badge all initially didn't render, some says unknown, but after granting third party access and waiting a little while, everyone badge was ok?
Sorry I don't have any further issues and can't provide anything reproducible either at this stage so happy for the PR to go ahead!
from badger.
Been having the same issue myself for a while. Do you know what might be going on here @GuangchuangYu ? Thanks!
from badger.
Hi @GuangchuangYu @wleoncio @rossellhayes, was wondering if any of you (or any of the other Contributors) could speak to this?
Seems to even be an issue on the README of badger
:
from badger.
What happens if you hardcode both ref
and branch
? Using the example above, I only get a valid output if I specify both:
badger::badge_codecov("rcannood/princurve", branch = "master")
#> [1] "[![](https://app.codecov.io/gh/rcannood/princurve/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rcannood/princurve)"
Created on 2023-01-12 with reprex v2.0.2
from badger.
Thanks for the reply @wleoncio
Use case 1: princurve
In the case of princurve
, I think you get the wrong output with badger::badge_codecov("princurve")
because the necessary information can't be pulled from the DESCRIPTION file, and some assumptions are made about the URL (ie omitting the owner's name rcannood
). Though leaving ref as the default yield the same result:
out1=badger::badge_codecov("rcannood/princurve", branch = "master")
out2=badger::badge_codecov("rcannood/princurve")
out1==out2
# TRUE
However, when I add the output you generated to a README.Rmd file and try to render it as markdown, it yields a broken link:
Raw markdown text
[![](https://app.codecov.io/gh/rcannood/princurve/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rcannood/princurve)
Markdown rendering
This is odd since navigating to the svg link does indeed show a valid badge:
https://app.codecov.io/gh/rcannood/princurve/branch/master/graph/badge.svg
However, it appears this repo has been deactivated on CodeCov:
https://app.codecov.io/gh/rcannood/princurve
So maybe the issue in this case is the repo being used as example? Though in theory, as long as the badge icon exists, it should still render (it'll just lead to an invalid codecov page).
Use case 2: rworkflows
Let's try with my package instead, rworkflows
.
It is currently activated on CodeCov:
https://app.codecov.io/gh/neurogenomics/rworkflows
This yields the wrong link, as it omits the owner name ("neurogenomics"):
badger::badge_codecov(ref="rworkflows")
# "[![](https://app.codecov.io/gh/rworkflows/branch/master/graph/badge.svg)](https://app.codecov.io/gh/rworkflows)"
This yields the correct link, including the owner name:
badger::badge_codecov()
# "[![](https://app.codecov.io/gh/neurogenomics/rworkflows/branch/master/graph/badge.svg)](https://app.codecov.io/gh/neurogenomics/rworkflows)"
As does specifying the owner/repo explicitly:
badger::badge_codecov(ref="neurogenomics/rworkflows)
# "[![](https://app.codecov.io/gh/neurogenomics/rworkflows/branch/master/graph/badge.svg)](https://app.codecov.io/gh/neurogenomics/rworkflows)"
The badge icon does indeed exist:
However, just like the princurve
output, the badge does not render in markdown.
This also appears to be an issue in html pages, as in my documentation website (notice the broken links in between other badges).
https://neurogenomics.github.io/rworkflows/
Is this a simple markdown syntax issue with the output of badger::badge_codecov
? If so, I can't seem to figure it out.
from badger.
Ok, so I took a look at another repo of mine where the badge works. I don't remember how I figure this out, but dropping app.
from the URL works, i.e.:
[![](https://codecov.io/gh/rcannood/princurve/branch/master/graph/badge.svg)](https://codecov.io/gh/rcannood/princurve)
yields
Doing the same for your repo also seems to work:
[![](https://codecov.io/gh/neurogenomics/rworkflows/branch/master/graph/badge.svg)](https://codecov.io/gh/neurogenomics/rworkflows)
outputs
from badger.
Ah, excellent! Thanks so much for this @wleoncio
So it seems this is just a matter of badger
updating the CodeCov domain name. Would you (or one of the other developers) possibly be able to make a push to GitHub and CRAN adding this?
from badger.
@fontikar, can you confirm that the proposal on PR #46 would solve this issue?
from badger.
That's perfectly fine, thanks for the input! Fingers crossed the fix gets merged and published soon. :)
from badger.
Related Issues (19)
- new badges HOT 1
- badger not in CRAN HOT 1
- Add support for default git branch names other than "master" HOT 1
- Question about commented-out code
- Add unit tests HOT 1
- Add CI workflow
- `Error: Default branch mismatch between local repo and remote.` persists HOT 2
- Wrong URL returned by `currentGitHubRef ` in case of multiple github URL HOT 1
- Version 0.2.0 + CRAN release? HOT 1
- codecov domain name update HOT 2
- badge_cran missing HOT 1
- Is there a way to add badges with no internet connection?
- Change to new cran checks badge URL
- `badge_github_version`: change `pkg` arg to `ref`
- badge_github_version not dynamic?
- Badge for GitHub releases
- dependency link changed
- issues with showing weekly/monthly downloads badge and number
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from badger.