Skip to content

Implement harmonize_fct()#36

Merged
jonthegeek merged 3 commits into
mainfrom
fix-3-harmonize_fct
Oct 6, 2025
Merged

Implement harmonize_fct()#36
jonthegeek merged 3 commits into
mainfrom
fix-3-harmonize_fct

Conversation

@jonthegeek
Copy link
Copy Markdown
Collaborator

Closes #3.

@jonthegeek jonthegeek requested a review from Copilot October 6, 2025 13:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Implements factor harmonization functionality and refactors the factor specification away from an S7 class to a lightweight list-based spec.

  • Adds harmonize_fct() with lookup support and tests.
  • Replaces S7-based hrmn_fct spec with list-based hrmn_fct_spec and updates tests/docs.
  • Removes S7 dependency; adds fastmatch, rlang, and stbl dependencies.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/testthat/test-specify_fct.R Updates tests to reflect new list-based spec class and accessor ($ instead of @).
tests/testthat/test-harmonize_fct.R Adds comprehensive tests for harmonize_fct() behavior (empty input, lookup, NA handling, spec enforcement).
R/specify_fct.R Refactors specify_fct() to return a list-based spec with new class vector.
R/harmonize_fct.R Introduces harmonize_fct() and internal .apply_fct_lookup().
R/aaa-shared_params.R Adds shared parameter documentation for reuse.
R/hrmn-package.R Imports fastmatch %fin% operator.
man/*.Rd Updates and adds documentation for new/modified functions.
NAMESPACE Exports harmonize_fct() and imports %fin%; removes S7 import.
DESCRIPTION Bumps version; updates Imports (removes S7, adds fastmatch, rlang, stbl).
R/zzz.R Removes obsolete S7-related helper.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread R/harmonize_fct.R
Comment thread R/harmonize_fct.R Outdated
@jonthegeek jonthegeek enabled auto-merge (squash) October 6, 2025 13:25
@jonthegeek jonthegeek merged commit a010c9c into main Oct 6, 2025
7 checks passed
@jonthegeek jonthegeek deleted the fix-3-harmonize_fct branch October 6, 2025 13:28
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.

Implement harmonize_fct()

2 participants