r-lib-ir 0.4.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- r_lib_ir-0.4.0.data/scripts/ir.exe +0 -0
- r_lib_ir-0.4.0.data/scripts/rx.exe +0 -0
- r_lib_ir-0.4.0.dist-info/METADATA +166 -0
- r_lib_ir-0.4.0.dist-info/RECORD +7 -0
- r_lib_ir-0.4.0.dist-info/WHEEL +4 -0
- r_lib_ir-0.4.0.dist-info/licenses/LICENSE +21 -0
- r_lib_ir-0.4.0.dist-info/sboms/ir.cyclonedx.json +1869 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: r-lib-ir
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Classifier: Environment :: Console
|
|
5
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
6
|
+
Classifier: Programming Language :: Rust
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Summary: Run portable R scripts, render Quarto documents, and launch R package tools.
|
|
9
|
+
Keywords: r,quarto,reproducibility
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
13
|
+
Project-URL: Documentation, https://r-lib.github.io/ir/
|
|
14
|
+
Project-URL: Homepage, https://r-lib.github.io/ir/
|
|
15
|
+
Project-URL: Issues, https://github.com/r-lib/ir/issues
|
|
16
|
+
Project-URL: Repository, https://github.com/r-lib/ir
|
|
17
|
+
|
|
18
|
+
# ir
|
|
19
|
+
|
|
20
|
+
`ir` runs self-describing R scripts and renders or previews Quarto sources.
|
|
21
|
+
|
|
22
|
+
Put the packages and R version next to the code, then run the file.
|
|
23
|
+
`ir` resolves the requirements, prepares a cached package library, and starts R with that library ready to use.
|
|
24
|
+
|
|
25
|
+
```r
|
|
26
|
+
#!/usr/bin/env -S ir run
|
|
27
|
+
#| packages:
|
|
28
|
+
#| - dplyr
|
|
29
|
+
#| - tidyr==1.3.1
|
|
30
|
+
#| r-version: ">= 4.3"
|
|
31
|
+
#| isolated: true
|
|
32
|
+
#| exclude-newer: "2024-02-01"
|
|
33
|
+
|
|
34
|
+
airquality |> tidyr::drop_na(Ozone) |> dplyr::count(Month)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
ir run script.R
|
|
39
|
+
./script.R
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This records a last-known-good environment: tidyr is pinned to the version
|
|
43
|
+
tested with the script, while the snapshot date selects dplyr and the
|
|
44
|
+
transitive dependencies.
|
|
45
|
+
|
|
46
|
+
Full documentation: <https://r-lib.github.io/ir/>
|
|
47
|
+
|
|
48
|
+
## Why use it?
|
|
49
|
+
|
|
50
|
+
- **The file explains itself.** R and Python package requirements live in the script or document, not in a separate setup note.
|
|
51
|
+
- **Fast by design.** `ir` keeps package setup direct and reuses cached resolutions and libraries when the same requirements are seen again.
|
|
52
|
+
- **Reproducibility is explicit.** Use frontmatter `r-version`, `--r-version`, or `IR_R_VERSION` to select R by version. Use `--rscript` or `IR_RSCRIPT` only when you need a machine-local Rscript override. Use `--exclude-newer`, `IR_EXCLUDE_NEWER`, or frontmatter `exclude-newer` to resolve the default CRAN and Bioconductor repositories from Posit Package Manager snapshots as of a specific date. Without another R selector, the date selects the latest R minor released by then. When `r-version` can match more than one R minor, the date limits selection to minor versions released by then.
|
|
53
|
+
- **It works with normal R habits.** Forward `Rscript` options, render or preview Quarto documents, evaluate inline expressions, or use `--with` for one-off packages.
|
|
54
|
+
- **Package tools are easy to try.** Run package executables with `rx`, or install persistent launchers backed by a durable tool store.
|
|
55
|
+
|
|
56
|
+
`ir` is designed to be small, fast, and predictable: resolve once, reuse cached libraries aggressively, and avoid making you manage a project directory for a one-file workflow.
|
|
57
|
+
|
|
58
|
+
## Common commands
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
ir run script.R
|
|
62
|
+
ir run --vanilla script.R
|
|
63
|
+
ir render report.qmd --to html
|
|
64
|
+
ir preview report.qmd
|
|
65
|
+
ir run --with cli -e 'cli::cli_alert_success("works")'
|
|
66
|
+
ir run --with BiocGenerics -e 'library(BiocGenerics)'
|
|
67
|
+
ir run --r-version 4.3 script.R
|
|
68
|
+
ir run --exclude-newer 2024-02-01 script.R
|
|
69
|
+
rx btw --help
|
|
70
|
+
ir tool run --from btw btw --help
|
|
71
|
+
ir tool install btw
|
|
72
|
+
ir cache dir
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Bioconductor packages use their bare package names.
|
|
76
|
+
pak selects the Bioconductor release compatible with the selected R.
|
|
77
|
+
|
|
78
|
+
## Install
|
|
79
|
+
|
|
80
|
+
Install from PyPI with `uv`:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
uv tool install r-lib-ir
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This installs both `ir` and `rx`. If the `uv` tool executable directory is
|
|
87
|
+
not already on `PATH`, run `uv tool update-shell`.
|
|
88
|
+
|
|
89
|
+
Install a pre-built binary on Linux or macOS:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
curl -fsSL https://raw.githubusercontent.com/r-lib/ir/main/scripts/install.sh | sh
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Install on Windows with Scoop using the `r-bucket` bucket:
|
|
96
|
+
|
|
97
|
+
```powershell
|
|
98
|
+
scoop bucket add r-bucket https://github.com/cderv/r-bucket.git
|
|
99
|
+
scoop install ir
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Alternatively, install the Windows binary directly from PowerShell:
|
|
103
|
+
|
|
104
|
+
```powershell
|
|
105
|
+
irm https://raw.githubusercontent.com/r-lib/ir/main/scripts/install.ps1 | iex
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The direct installers download the latest release and install `ir` and `rx` into `~/.local/bin` on Unix or `$HOME\bin` on Windows.
|
|
109
|
+
On macOS, the default `~/.local/bin` directory is added to `~/.zprofile` when needed.
|
|
110
|
+
On Windows, the install directory is added to the user `PATH`.
|
|
111
|
+
On Linux, the installer tells you if the install directory is not on `PATH`.
|
|
112
|
+
If `rig` is not on `PATH`, the installers print platform-specific rig install guidance.
|
|
113
|
+
Set `IR_NO_MODIFY_PATH=1` to skip PATH changes.
|
|
114
|
+
Set `IR_INSTALL_DIR` to choose another directory.
|
|
115
|
+
|
|
116
|
+
You can also build from source with Rust:
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
cargo build --release
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This builds `target/release/ir` and `target/release/rx`.
|
|
123
|
+
|
|
124
|
+
## Development setup
|
|
125
|
+
|
|
126
|
+
To install the system dependencies needed to build the project and run tests on
|
|
127
|
+
a new machine, run:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
scripts/install-dev-deps.sh
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
On Windows PowerShell, run:
|
|
134
|
+
|
|
135
|
+
```powershell
|
|
136
|
+
.\scripts\install-dev-deps.ps1
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The setup scripts install Rust, Python, rig, the current R release, R 4.3 for
|
|
140
|
+
the version-selection and documentation example tests, and Quarto. They do not
|
|
141
|
+
run tests or pre-warm package caches. Pass `--dry-run` on Unix or `-DryRun` on
|
|
142
|
+
Windows to inspect the plan.
|
|
143
|
+
|
|
144
|
+
## Requirements
|
|
145
|
+
|
|
146
|
+
- `R` / `Rscript` on `PATH`, or `--rscript`/`IR_RSCRIPT`, when R is not selected by version or date.
|
|
147
|
+
- `rig` on `PATH` when using `r-version`, `IR_R_VERSION`, `--r-version`, or date-only `exclude-newer` R selection.
|
|
148
|
+
- `quarto` on `PATH`, or `IR_QUARTO`, when rendering or previewing `.qmd`, `.Rmd`, or R script files.
|
|
149
|
+
|
|
150
|
+
On first use, `ir` prepares its resolver tooling in its cache, so you do not need to pre-install pak or renv.
|
|
151
|
+
|
|
152
|
+
## Learn more
|
|
153
|
+
|
|
154
|
+
For command details, configuration, and edge cases, see:
|
|
155
|
+
|
|
156
|
+
- [Scripts](https://r-lib.github.io/ir/run.html)
|
|
157
|
+
- [Quarto rendering and preview](https://r-lib.github.io/ir/quarto.html)
|
|
158
|
+
- [Package tools](https://r-lib.github.io/ir/tools.html)
|
|
159
|
+
- [Cache management](https://r-lib.github.io/ir/cache.html)
|
|
160
|
+
- [Install and configuration](https://r-lib.github.io/ir/config.html)
|
|
161
|
+
- [CLI reference](https://r-lib.github.io/ir/reference.html)
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
MIT. See [LICENSE](LICENSE).
|
|
166
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
r_lib_ir-0.4.0.data/scripts/ir.exe,sha256=4xzN6T54poN91Yn1ZIX4WBp_F0dkLHwzbwkcvNM1zAQ,1631744
|
|
2
|
+
r_lib_ir-0.4.0.data/scripts/rx.exe,sha256=uu53BmjE7ybpXK16sglykbj5JwUIEaEC_hVy4dR_d2w,231936
|
|
3
|
+
r_lib_ir-0.4.0.dist-info/METADATA,sha256=ZiZhYLFNy4EXh8TI3zXMlLsd-62pNIjhCDSdHPYbmBQ,6201
|
|
4
|
+
r_lib_ir-0.4.0.dist-info/WHEEL,sha256=2zDlIYIdD4m4N3p5DVEG3iJhGLdhsBQgdH-FqVkAur8,94
|
|
5
|
+
r_lib_ir-0.4.0.dist-info/licenses/LICENSE,sha256=GZbj0QcO8x46s2gechBTqFpoaoGWyQcwICB-Pj0-tpQ,1097
|
|
6
|
+
r_lib_ir-0.4.0.dist-info/sboms/ir.cyclonedx.json,sha256=fiG0KQ8TUxCs7rZm8rbIEWEH0r3ujD4YxHQjtA106vI,58566
|
|
7
|
+
r_lib_ir-0.4.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Posit Software, PBC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|