Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation updates. #93

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

dblodgett-usgs
Copy link
Collaborator

No description provided.

@@ -243,7 +243,7 @@ require_parent_group <- function(
#' Primary compressor.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did a ton of clean up in here. Nothing should have changed but the duplication is basically all gone. A couple check issues are taken care of here too.

```

By default, reads and writes are performed sequentially (i.e., not in parallel).
Users can opt-in to parallel read/write functionality via `options`.

```{r}
```{r, eval=FALSE}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This pattern of installing is a little dubious, at least it shouldn't run when the vignette is run start to finish.

Copy link
Owner

Choose a reason for hiding this comment

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

Should we replace the install.packages with a stop() failure that suggests installation of the package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably. stop with a message saying the package should be installed is good, or if in interactive mode, it could prompt for user input?

future::plan(future::multisession, workers = 4)

root <- pizzarr_sample("dog.ome.zarr")
store <- SlowDirectoryStore$new(root)
zarr_arr <- zarr_open(store = store, path = "/0")
arr <- zarr_arr$get_item("...")$data
sum(arr)

future::plan(oldplan)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CRAN and others see any change of options of other session state like par() as things that need to be cleaned up after running code.

Copy link
Owner

Choose a reason for hiding this comment

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

I see. I also see we might need to use on.exit in certain functions to ensure the cleanup happens

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep.

@dblodgett-usgs
Copy link
Collaborator Author

Just puttering on documentation a bit. This is looking great. I'm excited to flex the parallel stuff a bit when I get some time. This fixes #86 and gets a start on #84 -- I'll keep going on #84 as time allows.

family = "Blodgett",
role = c("ctb"),
email = "dblodgett@usgs.gov",
comment = c(ORCID = "0000-0001-9489-1710"))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good with this addition @keller-mark ?

N-dimensional arrays for R.
Description: An implementation of chunked, compressed,
N-dimensional arrays for R. Zarr spec V2 (2024)
<doi:10.5281/zenodo.11320255>.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for #95

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
YEAR: 2024
COPYRIGHT HOLDER: Mark Keller
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needed to do this for a CRAN check message

@@ -80,7 +80,7 @@ ZarrArray <- R6::R6Class("ZarrArray",
#' @keywords internal
oindex = NULL,
#' @description
#' (Re)load metadata from store.
#' (Re)load metadata from store without synchronization (file locking).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added this sort of documentation of synchronization (file locking) in a few places.

expect_equal(bench_df$total_time[[1]] > bench_df$total_time[[2]], TRUE)
expect_equal(bench_df$total_time[[2]] > bench_df$total_time[[3]], TRUE)
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tried to speed these tests up and also make them cran compatible.

@dblodgett-usgs
Copy link
Collaborator Author

Alright -- that's it from me for a bit. Need to turn to some other things next week but can keep up with messages if you have some time to push this ahead.

@dblodgett-usgs
Copy link
Collaborator Author

@keller-mark -- do you want to merge this in and start a final push for CRAN soon?

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.

2 participants