Giter Site home page Giter Site logo

luomus / finbif Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 73.44 MB

R interface for the Finnish Biodiversity Information Facility (FinBIF) API

Home Page: https://luomus.github.io/finbif/

License: Other

R 98.19% Makefile 1.48% CSS 0.18% HTML 0.14%
api biodiversity biodiversity-informatics biodiversity-information finbif finbif-access occurrences r-package r-programming rstats

finbif's Issues

WISH: Run checks with a random port rather than a fixed (port 36761)

Hello. This is not an end-user feature request, but rather a wish from someone who tests finbif as a reverse dependency package.

When I'm running revdep checks on future (using the revdepcheck package), each package tested is processed with the CRAN version of future and the development version of future. These two checks are run at the same time.

Now, since one of the finbif package tests opens a server on port 36761;

api <- local_app_process(app, .local_envir = teardown_env(), port = 36761)

the above two checks will compete for this port, and one will fail, e.g.

══ Failed tests ════════════════════════════════════════════════════════════════
  70   │   ── Error ('test-local-finbif_occurrence_load.R:26'): (code run outside of `test_that()`) ──
  71   │   <callr_status_error/callr_error/rlib_error_3_0/rlib_error/error/condition>
  72   │   Error: ! failed to start webfakes app process: in callr subprocess.
  73   │   Caused by error: 
  74   │   ! Cannot start webfakes web server @rweb.c:479 (server_start)
  75   │   Error log:
  76   │   [1670565560] [error] [client ] cannot bind to 127.0.0.1:36761: 98 (Address already in use)
  77   │   [1670565560] [error] [client ] Failed to setup server ports
  78   │   
  79   │   Backtrace:
  80   │       ▆
  81   │    1. ├─base::options(finbif_dl_url = api[["url"]]()) at test-local-finbif_occurrence_load.R:26:2
  82   │    2. └─api[["url"]]()
  83   │    3.   └─self$start()

Ask

Is it important that it's port 36761 here? If not, would you consider using a random port instead, e.g.

port <- sample(1024:65535, size = 1L)
api <- local_app_process(app, .local_envir = teardown_env(), port = port)

Would that work for you? That would lower the risk of port clashes.

BTW, if you're willing to introduce more dependencies, one can even make sure that the random port is free by using either:

port <- parallelly::freePort()

or

port <- port4me::port4me()

Remove usethis from Suggests?

I will soon submit usethis v2.0.0 to CRAN.

I see that usethis is in Suggests for finbif, but I don't think the package itself actually uses usethis. I see that it's used below data-raw/, but that's a development dependency. I'm wondering if you might want to remove usethis from Suggests?

Selflishly, this means finbif is no longer a revdep that I need to check or that CRAN checks whenever usethis updates.

In any case, at the moment, finbif is one of the revdep failures I see, yet I don't think this has anything to do with usethis. I'm not sure what the problem is and it's seen when checking finbif against both the CRAN and dev versions of usethis.

Here's what I'm seeing if you want to take a look:

https://github.com/r-lib/usethis/blob/9bcf5b1cedb23a3f7806f6446597c2af46fc1c25/revdep/failures.md#finbif

Presumably there is some set of conditions, fulfilled by our cloud revdep check system, for which calling get_locale() in .onLoad() does not work (?). I realize this may be of no practical relevance.

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.