Skip to content

Comments

Phase 1: Make cf_ids the single source of ID resolution#50

Closed
jefferis wants to merge 5 commits intomasterfrom
feature/phase1-cf-ids-resolver
Closed

Phase 1: Make cf_ids the single source of ID resolution#50
jefferis wants to merge 5 commits intomasterfrom
feature/phase1-cf-ids-resolver

Conversation

@jefferis
Copy link
Contributor

@jefferis jefferis commented Feb 6, 2026

Summary

  • Change cf_ids expand default to TRUE
  • Add 'expanded' attribute to cidlist objects to track resolution state
  • Add check_expanded() to verify IDs have been resolved before use
  • cf_partners and cf_meta now check for expanded IDs instead of calling expand_ids
  • c.cidlist checks inputs are expanded and propagates the attribute
  • Remove redundant fanc_ids()/banc_ids() calls from .fanc_partners() and .banc_partners()

This ensures all query resolution happens in cf_ids, making it the single entry point for ID resolution. Downstream functions receive only resolved numeric IDs, preparing for Phase 3 local cache support where cf_ids will decide whether to query locally or remotely.

Test plan

  • Verify cf_ids(hemibrain='MBON01') expands by default
  • Verify cf_ids(..., expand=FALSE) sets attr(result, 'expanded') = FALSE
  • Verify cf_partners errors on unexpanded queries
  • Verify cf_partners works with raw numeric IDs
  • Verify c(cf_ids(...), cf_ids(...)) works and propagates expanded attribute

- Change cf_ids expand default to TRUE
- Add 'expanded' attribute to cidlist objects to track resolution state
- Add check_expanded() to verify IDs have been resolved before use
- cf_partners and cf_meta now check for expanded IDs instead of calling expand_ids
- c.cidlist checks inputs are expanded and propagates the attribute
- Remove redundant fanc_ids()/banc_ids() calls from .fanc_partners() and .banc_partners()

This ensures all query resolution happens in cf_ids, making it the single
entry point for ID resolution. Downstream functions receive only resolved
numeric IDs, preparing for Phase 3 local cache support.
- Remove ::: call to flywire_meta in flywire2.R (use direct call within package)
- Add .rhubarb_ids() function to test setup for rhubarb dataset
- Fix banc test to skip when bancr is not properly installed
- Fix triple_connection_table to expand IDs before passing to cf_partners
- Update badrhubarb test to check for correct error messages
- Skip malecns-dependent test if malecns not installed
- Remove specific error regex for badrhubarb (just expect any error)
malecns was in Enhances which isn't installed during R CMD check.
Moving to Suggests makes it available for tests.
Revert DESCRIPTION change (keep malecns in Enhances).
Add malecns to check-r-package extra-packages so it's available during tests.
@jefferis jefferis closed this Feb 9, 2026
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.

1 participant