← Back to all sparks
S

sofa

ANALYTICS
Velocity2.5

Easy R interface to CouchDB. Contribute to ropensci/sofa development by creating an account on GitHub.

A CouchDB client for R whose recent work is all test infrastructure, not new routes.

couchdbdatabase-clientr-packageropenscitest-infrastructure
Current state
sofa wraps the CouchDB HTTP API for R — database and document CRUD, Mango queries and indexes, design documents, replication, and attachments, organized around a Cushion connection object. Feature development effectively stopped after 0.4.0 brought CouchDB v3 compatibility in 2020. The two 2026 releases are a testing and packaging overhaul: 0.4.1 rebuilt the suite around a crul-mocked fake CouchDB so tests no longer need Cloudant or a local Docker instance, reaching 100% coverage, and 0.4.2 cleared CRAN check notes.
Where it's heading
This is a rOpenSci package being brought back to a maintainable state rather than extended. The 0.4.1 decision to mock the server is the consequential one — it decouples CI from a live CouchDB, which is what made the cross-platform GitHub Actions workflow and full coverage possible at all. Two genuine bugs surfaced in that process, in db_replicate() URL construction against non-Cloudant servers and db_alldocs(disk=) not returning the documented file path, suggesting the untested paths had drifted.
Prediction
With the test harness now self-contained, the next plausible move is catching up on CouchDB routes added since v3 rather than further infrastructure work, though nothing in these entries commits to it.

Recent moves

  1. 21d ago

    CRAN check notes and metadata corrections

    Clears the Rd lost-braces note on the GET /{db} reference, replaces deprecated .Names usage in design-search examples, and corrects a contributor ORCID. Housekeeping on top of the 0.4.1 overhaul.

    View source ↗
  2. 2mo ago

    Tests moved to a mocked CouchDB, coverage to 100%

    The substantive release of the revival: tests now run against a crul-mocked fake CouchDB instead of requiring Cloudant or Docker, coverage hits 100% across 329 assertions, and CI runs on Linux, macOS, and Windows. Two real bugs fell out of the process — db_replicate() building the wrong target URL for generic CouchDB-compatible servers, and db_alldocs(disk=) not returning the documented file path.

    View source ↗
  3. 6y ago

    CouchDB v3 support, doc_upsert() and bulk get

    The last feature release before the six-year gap, aligning the client with CouchDB v3: username/password auth throughout, doc_upsert() for update-or-create, db_bulk_get() for the _bulk_get route, a Cushion $version() method for programmatic server-version checks, and design_search_many() rerouted to the v2.2+ queries endpoint. attach_get() became defunct.

    View source ↗
  4. 8y ago

    Mango index management and batched design search

    Adds db_index, db_index_create, and db_index_delete for index management, plus design_search_many() for batching queries into a single POST. db_alldocs() gains a disk parameter that writes results to a file instead of the R session, which is the practical escape hatch for large result sets. HTTP moved from httr to crul.

    View source ↗
  5. 9y ago

    sofa v0.2.0

    A CRAN release with no documented changes beyond the publication itself. Marks the package's entry onto CRAN rather than any change in capability.

    View source ↗