diff --git a/.Rbuildignore b/.Rbuildignore index 925113a..e6404b4 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,6 +4,8 @@ # nullkomma:r:start [.]nix$ ^flake[.]lock$ +^[.]agents$ +^AGENTS[.]md$ ^[.]envrc$ ^[.]Renviron$ ^[.]Rprofile$ @@ -13,9 +15,11 @@ ^[.]github$ ^[.]vscode$ ^[.]nvim[.]lua$ +^[.]nullkomma$ ^result(-.*)?$ ^docs$ ^pkgdown$ ^coverage[.]xml$ ^pkg[.]lock$ +^docs$ # nullkomma:r:end diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c9991ca..ce46eb9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,8 +9,6 @@ concurrency: jobs: nullkomma: uses: dataheld/nullkomma/.github/workflows/ci.yml@main - with: - visibility: unlisted permissions: contents: read id-token: write diff --git a/.gitignore b/.gitignore index 8252d39..48c13fe 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,11 @@ result result-* .direnv/ /.nullkomma/cloudflare/ +/.nullkomma/processes/ .R/library/ /.nvim.lua +/.agents/skills/nullkomma-resolve-file-conflicts +/.agents/skills/nullkomma-upgrade /.vscode/extensions.json /.vscode/settings.json !man/figures/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..376a0b7 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,21 @@ + +## nullkomma + +This project's development environment comes from [nullkomma](https://github.com/dataheld/nullkomma). +Run commands inside its dev shell: +`direnv exec . `, or `nix develop --command ` without direnv. +`tasks` lists the project's workflows. + +Check your work locally, from fastest to strictest: + +1. While you work, run the narrowest task that covers the change, + e.g. `check ` or a single language task. +1. Before you report a change as done, run `tasks all`, then `nix flake check`, + and fix what fails. + `tasks all` formats, regenerates files and runs the checks in the working tree. + `nix flake check` runs the checks sandboxed, as CI does, + and sees only files that Git tracks: `git add` new files first. + +Skills for nullkomma itself are in `.agents/skills/nullkomma-*`; +if they are missing, run `nk-generate-files`. + diff --git a/README.md b/README.md index fd77c31..1dbf035 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ pak::pak("dataheld/elf") @@ -22,7 +22,7 @@ for plugin configuration and development documentation. You do not need Nix or direnv to run or develop this package. -> **Note:** +> [! NOTE] > Developing without nix provides only limited reproducibility of the environment. > The PPM date *approximates* the Nix package set: > R package versions can differ, diff --git a/flake.lock b/flake.lock index e58659f..a6f0e9b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,29 +1,5 @@ { "nodes": { - "brand": { - "inputs": { - "nixpkgs": [ - "brand", - "nullkomma", - "nixpkgs" - ], - "nullkomma": [ - "nullkomma" - ] - }, - "locked": { - "lastModified": 1792768557, - "narHash": "sha256-RO4zqZolbuOeq1G1pO8JTAHNfjMckh2I856PG/mfdlc=", - "rev": "9b30b65c6a4a782d8845a0b1f857cd5434e04940", - "revCount": 15, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/dataheld/brand/0.1.15%2Brev-9b30b65c6a4a782d8845a0b1f857cd5434e04940/01a1695a-42ef-73d2-8fa4-222bad88f84c/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/dataheld/brand/%2A" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -73,6 +49,49 @@ "type": "github" } }, + "maxheld": { + "inputs": { + "modern2-cv": "modern2-cv", + "nixpkgs": [ + "maxheld", + "nullkomma", + "nixpkgs" + ], + "nullkomma": [ + "nullkomma" + ], + "pillar": "pillar" + }, + "locked": { + "lastModified": 1793032852, + "narHash": "sha256-17Ah7o/NJb1Te81TKDDfgtSumV9QJ8RRhnNV8qE4ZP8=", + "rev": "83c05ac1282b2add9516117102c2a561d709b27e", + "revCount": 220, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/dataheld/maxheld/0.1.220%2Brev-83c05ac1282b2add9516117102c2a561d709b27e/01a1791d-37f5-7b53-b196-0de5224abeae/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/dataheld/maxheld/%2A" + } + }, + "modern2-cv": { + "flake": false, + "locked": { + "lastModified": 1730144289, + "narHash": "sha256-g26OWmYGlcMH0n0nrGxM/qXbHnQAcc16ZKRy2KaEWBw=", + "owner": "schochastics", + "repo": "modern2-cv", + "rev": "14147a8da77a7afafe9140c7ef32f2cccaddcfcb", + "type": "github" + }, + "original": { + "owner": "schochastics", + "repo": "modern2-cv", + "rev": "14147a8da77a7afafe9140c7ef32f2cccaddcfcb", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1791353474, @@ -102,21 +121,38 @@ "up": "up" }, "locked": { - "lastModified": 1792848421, - "narHash": "sha256-Afh6PbcxYPWoTOsQIzUpxug3yhPGLtgW6lD1uh791G4=", - "rev": "02a9b440a43ebbed44610e24ef5b137cc17e4553", - "revCount": 464, + "lastModified": 1793049623, + "narHash": "sha256-xAu05L+aMSxKG71q7yFUbhzW/DmY82CIH3sC7Wb7FxY=", + "rev": "cf176d7a0652e160ef0f2fbbd4ce943deb443eca", + "revCount": 533, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/dataheld/nullkomma/0.1.464%2Brev-02a9b440a43ebbed44610e24ef5b137cc17e4553/01a16e1e-d138-7d23-8baa-7b4feca285b5/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/dataheld/nullkomma/0.1.533%2Brev-cf176d7a0652e160ef0f2fbbd4ce943deb443eca/01a17a1e-5146-7da0-a4de-85d449cf8ec4/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/dataheld/nullkomma/%2A" } }, + "pillar": { + "flake": false, + "locked": { + "lastModified": 1687682392, + "narHash": "sha256-QFjaC3QfxTGGt3JcPYeuNaZMRvo7bOMIHHyqzCoEpHs=", + "owner": "xriley", + "repo": "pillar-theme", + "rev": "dbe51083f1566b748c7b3cf81f3d1069b634608e", + "type": "github" + }, + "original": { + "owner": "xriley", + "repo": "pillar-theme", + "rev": "dbe51083f1566b748c7b3cf81f3d1069b634608e", + "type": "github" + } + }, "root": { "inputs": { - "brand": "brand", + "maxheld": "maxheld", "nixpkgs": [ "nullkomma", "nixpkgs" diff --git a/flake.nix b/flake.nix index a3cd4ee..9d5ce23 100644 --- a/flake.nix +++ b/flake.nix @@ -4,8 +4,8 @@ inputs = { nullkomma.url = "https://flakehub.com/f/dataheld/nullkomma/*"; nixpkgs.follows = "nullkomma/nixpkgs"; - brand = { - url = "https://flakehub.com/f/dataheld/brand/*"; + maxheld = { + url = "https://flakehub.com/f/dataheld/maxheld/*"; inputs.nullkomma.follows = "nullkomma"; }; }; @@ -13,8 +13,12 @@ outputs = inputs: inputs.nullkomma.lib.mkFlake { inherit inputs; } { - nullkomma.r-non-nix.enable = true; - nullkomma.brand = inputs.brand; + nullkomma.r = { + enable = true; + nonNix.enable = true; + pkgdown.brand.enable = true; + }; + nullkomma.brand = inputs.maxheld; nullkomma.cloudflare = { enable = true; domain = "maxheld.de"; diff --git a/tests/testthat/test-dependencies.R b/tests/testthat/test-dependencies.R index 855e9aa..5fe99f6 100644 --- a/tests/testthat/test-dependencies.R +++ b/tests/testthat/test-dependencies.R @@ -1,7 +1,9 @@ test_that("missing package is identified", { withr::local_options(rlib_message_verbosity = "verbose") - expect_message(source_pef_elf("dependencies", "is_installed2", "missing")) - expect_false(source_pef_elf("dependencies", "is_installed2", "missing")) + expect_message( + installed <- source_pef_elf("dependencies", "is_installed2", "missing") + ) + expect_false(installed) }) test_that("present package is identified", { diff --git a/tests/testthat/test-options.R b/tests/testthat/test-options.R index 9250efa..3b693d9 100644 --- a/tests/testthat/test-options.R +++ b/tests/testthat/test-options.R @@ -1,8 +1,9 @@ test_that("locally setting options works", { options::define_option("foo", default = "bar") expect_equal(options::opt("foo"), "bar") - opt_set_local2("foo", "baz") - expect_equal(options::opt("foo"), "baz") - withr::deferred_run() + local({ + opt_set_local2("foo", "baz") + expect_equal(options::opt("foo"), "baz") + }) expect_equal(options::opt("foo"), "bar") })