Skip to content

refactor: ♻️ read_register() takes a register name as argument, not path#299

Open
lwjohnst86 wants to merge 3 commits into
mainfrom
refactor/read-register-the-name-not-path
Open

refactor: ♻️ read_register() takes a register name as argument, not path#299
lwjohnst86 wants to merge 3 commits into
mainfrom
refactor/read-register-the-name-not-path

Conversation

@lwjohnst86
Copy link
Copy Markdown
Member

Description

This simplifies the interface to reading in an existing partition register, so that only the register name is required to run.

Closes #195, closes #81

Needs a thorough review.

Checklist

  • Ran just run-all

@lwjohnst86 lwjohnst86 marked this pull request as ready for review May 27, 2026 14:16
@lwjohnst86 lwjohnst86 requested a review from signekb as a code owner May 27, 2026 14:16

expect_error(read_register(incompatible_output), "incompatible")
expect_error(read_parquet_partition(incompatible_output), "incompatible")
})
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll add tests once the simulation helpers are merged in #295

Comment thread vignettes/fastreg.qmd

```{r read-file}
file <- fastreg::read_register(output_file_dir)
#| eval: false
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll update this once the simulation PR is done #295

@lwjohnst86 lwjohnst86 moved this from To do to In review in Platform development May 27, 2026
Copy link
Copy Markdown
Contributor

@signekb signekb left a comment

Choose a reason for hiding this comment

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

Very nice work 🚀 I have a hard time understanding the divide with read_register(), read_parquet_partition() and read_parquet_file(), so I've tried asking some questions about that

Comment thread R/read.R Outdated
Comment thread R/read.R
Comment on lines +8 to +9
#' this function doesn't work, use [read_parquet_partition()] or
#' [read_parquet_file()] instead.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't remember: Why do we need both of these?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hm, I kept them because you previously had them in the read_register(). But I guess we only really need the partition one.

Comment thread R/read.R Outdated
Comment thread R/read.R Outdated
Comment thread R/read.R Outdated
Comment thread R/read.R
}
invisible(path)

read_parquet_partition(parquet_path)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wait, how does that work? The partition function should only read in a single Parquet, right? Not a dataset?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmmm, this divide doesn't make sense to me. Could this function be removed and its content moved into read_register()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hmm, I not sure what you're asking. How does what work? Why would reading a partition need a single Parquet file? A partitioned Parquet dataset is a folder. Maybe, could you ask in a different way so I understand what you're meaning?

Comment thread README.md

``` r
fastreg::read_register("path/to/parquet_register/")
fastreg::read_register("bef")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is very nice 👌 🎉

Comment thread _pkgdown.yml Outdated
Comment thread vignettes/fastreg.qmd Outdated
@github-project-automation github-project-automation Bot moved this from In review to In progress in Platform development May 29, 2026
lwjohnst86 and others added 2 commits May 29, 2026 15:36
Co-authored-by: Signe Kirk Brødbæk <40836345+signekb@users.noreply.github.com>
@lwjohnst86 lwjohnst86 moved this from In progress to In review in Platform development May 29, 2026
@lwjohnst86 lwjohnst86 requested a review from signekb May 29, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Way to make finding path in read_registers() easier [discussion]: How to implement DST paths as project IDs

2 participants