Skip to content
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

Use Markdown formatting in docs #65

Merged
merged 6 commits into from
Sep 16, 2024

Conversation

etiennebacher
Copy link
Collaborator

@etiennebacher etiennebacher commented Sep 16, 2024

I just realized that markdown syntax is used in (part of) the docs but wasn't properly rendered (see for instance the * not rendered as bullet points in ?languages_supported). This PR fixes that and one roxygen2 warning about the deprecated usage of @docType package.


Edit: used this occasion to also update the CI workflow

@etiennebacher
Copy link
Collaborator Author

etiennebacher commented Sep 16, 2024

@vincentarelbundock wdi.dl and wdi.query have the following:

#' @export
#' @keywords internal
#' @noRd

which generates a warning Undocumented code objects. Should they be internal or exported? I guess they should be exported otherwise that would be a breaking change. If so, they could just inherit the docs from other functions but I'd like you to confirm before I spend time on this.

@vincentarelbundock
Copy link
Owner

yeah, IIRC, these were never intended to be exported. So it's a breaking change but only because of a docs issue.

I'm happy with any solution you want to implmeent

@etiennebacher
Copy link
Collaborator Author

I removed them since it's the fastest to do and they have "internal function" in the title anyway

@etiennebacher
Copy link
Collaborator Author

Do you have any idea why this fails?

library(WDI)
cache = WDIcache()
old <- WDIsearch('gdp.*capita.*constant')
new <- WDIsearch("gdp.*capita.*constant", cache = cache)

waldo::compare(old, new)
#> `attr(old, 'row.names')`: 717 11431 11433 11435 11436
#> `attr(new, 'row.names')`: 692 12372 12374 12376 12377
#> 
#> old vs new
#>                                                            name
#>   old[1, ] GDP per capita, PPP (constant 2011 international $) 
#>   old[2, ] GDP per capita (constant 2015 US$)                  
#>   old[3, ] GDP per capita (constant LCU)                       
#> - old[4, ] GDP per capita, PPP (constant 2017 international $) 
#> + new[4, ] GDP per capita, PPP (constant 2021 international $) 
#>   old[5, ] GDP per capita, PPP (constant 1987 international $) 
#> 
#> old$name vs new$name
#>   "GDP per capita, PPP (constant 2011 international $) "
#>   "GDP per capita (constant 2015 US$)"
#>   "GDP per capita (constant LCU)"
#> - "GDP per capita, PPP (constant 2017 international $)"
#> + "GDP per capita, PPP (constant 2021 international $)"
#>   "GDP per capita, PPP (constant 1987 international $)"

My guess is that we should update data/WDI_data.RData but I don't know how. (Sorry, I thought this would be a routine PR)

@vincentarelbundock
Copy link
Owner

Yep, I think that's the problem.

I pushed a new search cache and added a note to the readme to indicate how to do it.

@vincentarelbundock vincentarelbundock merged commit 0396682 into vincentarelbundock:main Sep 16, 2024
5 checks passed
@vincentarelbundock
Copy link
Owner

Thanks!

@etiennebacher etiennebacher deleted the md-docs branch September 16, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants