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

Consider exporting read_pkglite() #33

Open
nanxstats opened this issue Mar 24, 2022 · 2 comments
Open

Consider exporting read_pkglite() #33

nanxstats opened this issue Mar 24, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nanxstats
Copy link
Collaborator

It feels like it would generate more benefits than harms if we make read_pkglite() an exported function, because people might need to parse pkglite.txt directly sometimes. This would avoid the use of :::.

What do you think? @elong0527

@nanxstats nanxstats added enhancement New feature or request question Further information is requested labels Mar 24, 2022
@nanxstats nanxstats self-assigned this Mar 24, 2022
@elong0527
Copy link
Collaborator

agree 👍

@nanxstats
Copy link
Collaborator Author

nanxstats commented Apr 21, 2022

I think if we export read_pkglite(), it's reasonable to also create and export a new function write_pkglite() by decoupling the middle part from unpack(). This means that you can read it from the txt, work on the list, and write it back.

Update: oops, unpack() only writes to package structures so it's irrelevant. We only need to create the logic to write the list to txt. A typical user flow can be pack() -> read_pkglite() -> modify list or just get some data -> write_pkglite() or not -> unpack().

To show this visually:

userflow

userflow.drawio.txt

We should extend the format.Rmd vignette to explain this (APIs for working with the txt) and include the above chart.

@nanxstats nanxstats removed the question Further information is requested label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants