Skip to content

Linter R3: Seeded Randomness #1316

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

Open
Ellpeck opened this issue Feb 13, 2025 · 0 comments
Open

Linter R3: Seeded Randomness #1316

Ellpeck opened this issue Feb 13, 2025 · 0 comments
Labels
flowr linter Related to the linter that we're implementing on top of the search api

Comments

@Ellpeck
Copy link
Member

Ellpeck commented Feb 13, 2025

Combination of the query functions from #1313 and #1315:

Q.calls("our set of random consumer functions")
  .with(Info.LastCall, { callName: 'our set of random producer AND consumer functions' })
  .with(Info.Arguments)
  
// ensure that all last calls are sufficiently linked to a previous producer function 
// OR linked to a previous consumer function that is sufficiently linked again

With "our set of random functions" resulting from a csv or similar data store of functions that produce and consume randomness:

function, package, type,    condition
set.seed, base,    produce, constant_argument
runif,    stats,   consume                   
isample,  ...,     both                       

Because loops and functions like isample can create an arbitrary amount of random numbers, it both produces and consumes randomness!

@Ellpeck Ellpeck added the flowr linter Related to the linter that we're implementing on top of the search api label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flowr linter Related to the linter that we're implementing on top of the search api
Projects
None yet
Development

No branches or pull requests

1 participant