Giter Club home page Giter Club logo

Comments (25)

sboysel avatar sboysel commented on May 29, 2024 3

Thanks @AdeelK93! Seems strange bad endpoints would be tolerated like that. Since there are relatively few, I suppose we could hardcode them and forgo status code checking.

from fredr.

DavisVaughan avatar DavisVaughan commented on May 29, 2024 2

Maybe start here https://github.com/r-lib/actions/blob/master/README.md

And usethis::use_tidy_github_actions()

I can have a look next week to set things up if that would help

from fredr.

sboysel avatar sboysel commented on May 29, 2024 2

@thsavage @AdeelK93 @mhollander thanks for your interest in the package! Yes, I would be open to reducing some of the testing suite for the sake of getting fredr back on CRAN. I can make the changes in master to resubmit to CRAN and continue to iron out the testing issues in a development branch. I will be able to put some more time to this in the coming weeks. Appreciate everyone's patience.

from fredr.

sboysel avatar sboysel commented on May 29, 2024 2

Thanks to everyone for their interest in and support of fredr. Even more thanks for everyone's patience as we have worked to get fredr and its cumbersome testing suite back on CRAN since it was dropped in April.

Wanted to update everyone on the amazing efforts of @DavisVaughan in preparing fredr for a 2.0.0 release and getting back on CRAN. All credit should go to Davis for keeping fredr up to date with the CRAN and GitHub packaging ecosystems. Davis's work can be previewed in the release candidate #84 .

We are releasing the package shortly and a summary of changes can be viewed here. All modifications are internal and there should be no breaking changes. I will update everyone on this issue once fredr is officially back on CRAN. Let us know if you have any feedback or run into any issues.

from fredr.

AdeelK93 avatar AdeelK93 commented on May 29, 2024 1

Is the CRAN rejection due to the tests failing? I could be totally off, but from looking at it, it looks like test_docs.R lines 8 and 9 are failing because GETting a bad documentation endpoint like https://fred.stlouisfed.org/docs/api/fred/foo.html would once give a non-200 status code, but now yields a 200.

Big fan of your work! I use fredr all the time

from fredr.

sboysel avatar sboysel commented on May 29, 2024 1

@AdeelK93 @DavisVaughan I'm considering changing fredr_docs() to just fredr_docs() <- function() utils::browseURL(url = "https://api.stlouisfed.org/docs/fred/"). I feel like this is easily the least practical function in the package and this simplification would be more user and maintainer friendly.

from fredr.

sboysel avatar sboysel commented on May 29, 2024 1

Change to fredr_docs() was merged in #77. Will close this issue when fredr is back on CRAN (i.e. must address #73 before resubmitting).

from fredr.

thsavage avatar thsavage commented on May 29, 2024 1

First, let me thank for developing this API. I have used it extensively for teaching purposes. And I know finance practitioners have found it very valuable. The deprecated version now is no longer useable with R 4.0.2 (and I'm surprised by how many changes have been pushed out by CRAN in the summer of 2020). Any chance that you will do another build?

from fredr.

DavisVaughan avatar DavisVaughan commented on May 29, 2024

That’s fine by me - is that the only failure?

from fredr.

sboysel avatar sboysel commented on May 29, 2024

Yes. Other than the entire test suite taking over 20 minutes for all the endpoints.

I'll try messing around with nealrichardson/httptest to see if we can cache requests in the package. If I'm understanding the documentation correctly, this amounts to

  1. Running the requests wrapped in capture_requests() once (caches responses in tests/testthat/)
  2. Wrapping all calls to test_that() in the test suite with with_mock_api()

from fredr.

DavisVaughan avatar DavisVaughan commented on May 29, 2024

I think that sounds pretty nice. The biggest thing for me would be "sometimes I actually want to run the tests against the live API. how do i do that?" The answer seems to be:
https://github.com/nealrichardson/httptest#how-do-i-switch-between-mocking-and-real-requests

So what might be nice is to have it set up so that 99% of the time we test against the mocked/cached requests, but we then have an env var that we can set to test against the real live FRED api. CRAN would always run against the mocked tests, but we could have a Github Actions build that runs on a cron job (maybe 1 time a week?) that would run against the live API by setting the env var. That would notify us if anything fails, without putting the package in danger of being removed from CRAN. We would also have the standard set of Github Action builds that run against the mocked requests

from fredr.

sboysel avatar sboysel commented on May 29, 2024

Ok sounds good. Github Actions is less familiar to me. Is this the right documentation? https://help.github.com/en/actions/reference/events-that-trigger-workflows

from fredr.

sboysel avatar sboysel commented on May 29, 2024

Discussion of mock API can be moved to #73. Just added some notes on some issues I'm facing to that issue.

from fredr.

mhollander avatar mhollander commented on May 29, 2024

Is there an update on getting fredr back on CRAN?

from fredr.

sboysel avatar sboysel commented on May 29, 2024

@mhollander We've been trying to overhaul/improve the testing suite to be more CRAN friendly in #79 but, consistent with most of my development experience, introduced more issues along the way. In a nutshell, the full testing suite consists of many calls to the FRED API and have been timing out and/or failing since introducing the mocking framework. Unfortunately, I haven't had as much time to work on FOSS stuff recently but I will revisit when I can and then resubmit to CRAN. Any PRs to that end are welcome and appreciated.

from fredr.

mhollander avatar mhollander commented on May 29, 2024

Thank you for the comment. I completely understand that you don't have time for FOSS recently. Getting the tests to work is beyond my knowledge (and I don't have much FOSS time myself!). For now, I'm just installing from github. I hope one day to be able to help out.

from fredr.

AdeelK93 avatar AdeelK93 commented on May 29, 2024

I know it's sloppy, but would you be open to cutting out some of the tests in order to get this back on CRAN, if issues with the testing suite are still holding this project back?

from fredr.

alexWhitworth avatar alexWhitworth commented on May 29, 2024

My $0.02 is there's no need to rush getting it back on CRAN, since it's easy enough to install from either source or GitHub.

@sboysel -- are you able to provide an overview of the test suite problems? I'd be happy to submit a PR if given some general direction to get started. But I'm lazy and I don't want to wade through the code w/o such an overview :)

from fredr.

thsavage avatar thsavage commented on May 29, 2024

@sboysel: From one economist to another, again my gratitude for what you have done. (I remember the busy days of grad school, which is your first commitment.)

The ability to ingest data in the first class of a semester allows me to teach an immersion class rather than the traditional econometrics class. The ability to do time series storytelling really empowers the masters student.

from fredr.

mhollander avatar mhollander commented on May 29, 2024

from fredr.

thsavage avatar thsavage commented on May 29, 2024

Indeed. Many thanks.

from fredr.

Fredo-XVII avatar Fredo-XVII commented on May 29, 2024

from fredr.

yanlesin avatar yanlesin commented on May 29, 2024

Thanks a lot for getting this back on CRAN! I was following it as well, great learning experience! Thanks @DavisVaughan and @sboysel!

from fredr.

sboysel avatar sboysel commented on May 29, 2024

fredr is now back on CRAN! Will be merging #84 into master shortly and drafting a GitHub release of 2.0.0. Thanks for bearing with us!

from fredr.

thsavage avatar thsavage commented on May 29, 2024

Great work. Thank you very much.

from fredr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.