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

rix: Reproducible Environments with Nix #624

Closed
1 of 20 tasks
b-rodrigues opened this issue Jan 27, 2024 · 4 comments
Closed
1 of 20 tasks

rix: Reproducible Environments with Nix #624

b-rodrigues opened this issue Jan 27, 2024 · 4 comments

Comments

@b-rodrigues
Copy link

b-rodrigues commented Jan 27, 2024

Submitting Author Name: Bruno Rodrigues
Submitting Author Github Handle: @b-rodrigues
Other Package Authors Github handles: @philipp-baumann
Repository: https://github.com/b-rodrigues/rix
Submission type: Pre-submission
Language: en


  • Paste the full DESCRIPTION file inside a code block below:
Package: rix
Title: Rix: Reproducible Environments With Nix
Version: 0.5.1.9000
Authors@R: c(
    person("Bruno", "Rodrigues", , "bruno@brodrigues.co", role = c("aut", "cre"),
           comment = c(ORCID = "0000-0002-3211-3689")),
    person("Philipp", "Baumann", , "baumann-philipp@protonmail.com", role = "aut",
           comment = c(ORCID = "0000-0002-3194-8975"))
  )
Description: Provides helper functions to create reproducible development
    environments using the Nix package manager.
License: GPL (>= 3)
URL: https://b-rodrigues.github.io/rix/
BugReports: https://github.com/b-rodrigues/rix
Depends: 
    R (>= 2.10)
Imports: 
    codetools,
    httr,
    jsonlite,
    sys,
    utils
Suggests: 
    knitr,
    rmarkdown,
    stringr,
    testthat
VignetteBuilder: 
    knitr
Config/fusen/version: 0.5.2
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3

Scope

  • Please indicate which category or categories from our package fit policies or statistical package categories this package falls under. (Please check an appropriate box below):

    Data Lifecycle Packages

    • data retrieval
    • data extraction
    • data munging
    • data deposition
    • data validation and testing
    • workflow automation
    • version control
    • citation management and bibliometrics
    • scientific software wrappers
    • field and lab reproducibility tools
    • database software bindings
    • geospatial data
    • text analysis

    Statistical Packages

    • Bayesian and Monte Carlo Routines
    • Dimensionality Reduction, Clustering, and Unsupervised Learning
    • Machine Learning
    • Regression and Supervised Learning
    • Exploratory Data Analysis (EDA) and Summary Statistics
    • Spatial Analyses
    • Time Series Analyses
  • Explain how and why the package falls under these categories (briefly, 1-2 sentences). Please note any areas you are unsure of:

The package's aim is to help users define reproducible development environment which can then be built using the Nix package manager. These environments will contain all the required software.

  • Who is the target audience and what are scientific applications of this package?

Anyone that needs reproducibility.

There is no other package, as far as we know, that accomplishes the same thing. This package generates Nix expressions and by itself will not generate the reproducible development environment. This environment will need to be built using Nix. To achieve the same thing, Docker+renv (for example) should be used.

Not applicable.

  • Any other questions or issues we should be aware of?:

We will likely not be able to reach the 75% of unit test coverage. This is mainly for two reasons:

We were wondering if we could have an exemption of this requirement? We could likely install Nix on GA runners so that the tests that require Nix could pass, but I don't know if we could solve the issue with covr::package_coverage(). We use skip_covr() for now.

Here's the output of test coverage on GA:

> test_check("rix")
GitHub Actions workflow file save to: /tmp/Rtmp81tuqn
[ FAIL 0 | WARN 0 | SKIP 2 | PASS 10 ]

══ Skipped tests (2) ═══════════════════════════════════════════════════════════
• nix_shell_available() is not TRUE (1): 'test-find_rev.R:123:3'
• On covr (1): 'test-find_rev.R:97:3'

[ FAIL 0 | WARN 0 | SKIP 2 | PASS 10 ]
> 

Here's the coverage:

Running specific tests for package ‘rix’
  Running ‘testthat.R’
rix Coverage: 28.83%
R/find_rev.R: 26.95%
R/tar_nix_ga.R: 66.67%
R/detect_os.R: 75.00%
R/detect_versions.R: 100.00%

and here's the pkgcheck action complaining:

Running Pkgcheck...
Error: Package coverage is 28.8% (should be at least 75%).

If Nix is available, all tests pass locally with devtools::test(), but computing the coverage fails because of that one test that for some reason fails with covr::package_cover() (which now has a skip, as explained), if Nix is not available, the test that requires Nix gets also skipped.

@b-rodrigues
Copy link
Author

We’ve added some more tests:

image

more than this will be tricky though.

@jhollist
Copy link
Member

@b-rodrigues Just wanted to confirm that this is on our radar. {rix} looks really interesting.

The editorial board is having some discussions about the rix package and we will get back to you shortly!

@b-rodrigues
Copy link
Author

Hi, thanks for letting us know! There's no rush we are still ironing out some bugs 🪲🪲

@jhollist
Copy link
Member

jhollist commented Feb 1, 2024

@b-rodrigues We have had a chance to discuss your pre-submission inquiry. The gist of our discussion was that, {rix} looks really interesting and has an obvious use case for reproducibility, and {rix} best fit is in the workflow automation category.

We would like to invite you to make a full submission. A few things to keep in mind in that full submission.

First, as long as tests are adequate and they run locally, not running on CI is fine, just make sure to document how to demonstrate local coverage in the packages CONTRIBUTING. Second, it might be possible to add Nix to the RO build system but we would need to look a little more closely at it. @mpadge will be doing that and will follow up with you.

One quick logistical note, my stint as Editor in Chief has come to an end. @ldecicco-USGS just started her rotation and she will take over for me!

Thank you again for this pre-submission!

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

No branches or pull requests

2 participants