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

fix: 'infinite' value cannot pass to R script #2476

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ghbore
Copy link

@ghbore ghbore commented Oct 11, 2023

Description

An Infinite value will raise an error when evoking an external R script (#2475), because the current encoding schema (snakemake/script.py REncoder::encode_value) will translate Python float("inf") into inf for R, not the expected Inf.

To fix this, two specific encoding schemes are introduced to support the correct translation of Python float("inf") to R Inf, and Python float("-inf") to R -Inf.

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

johanneskoester and others added 7 commits August 8, 2023 15:27
…he same module (snakemake#2404)

### Description

<!--Add a description of your PR here-->

### QC
<!-- Make sure that you can tick the boxes below. -->

* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [x] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).
… run-directive rules to not being executed even when enforced via e.g. -R.
@sonarcloud
Copy link

sonarcloud bot commented Oct 11, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug D 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@ghbore ghbore changed the title fix the bug #2475: 'inf' value cannot pass to R script fix: 'infinite' value cannot pass to R script Oct 11, 2023
@padix-key
Copy link
Contributor

There are also additional special values, like NaN that do not work properly in the R preamble: #2425

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.

None yet

3 participants