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

ariExtra immigration #46

Merged
merged 51 commits into from
Oct 17, 2023
Merged

ariExtra immigration #46

merged 51 commits into from
Oct 17, 2023

Conversation

howardbaik
Copy link
Contributor

@howardbaik howardbaik commented Jun 3, 2023

Purpose/implementation Section

Move a few functions from ariExtra into ari so that users don't have to install ariExtra when they run Coqui TTS. They would only need ari and text2speech.

What changes are being implemented in this Pull Request?

Functions that immigrated from ariExtra:

download_gs_file.R

  • download_gs_file(),
  • get_slide_id()
  • export_url()
  • pptx_url()
  • pdf_url()
  • make_slide_url()
  • get_page_ids()
  • get_folder_id()
  • make_slide_url()
  • pdf_to_pngs()

pptx_notes.R

  • pptx_notes()
  • pptx_slide_text_df()
  • pptx_slide_note_df()
  • pptx_reorder_xml()
  • unzip_pptx()
  • xml_notes()

UPDATE (10/16/2023)

Eventually, I removed the above functions to two separate R packages

  • gsplyr contains functions in download_gs_file.R. They were renamed to be more readable.
  • ptplyr contains functions in pptx_notes.R. They were also renamed.

@cansavvy
Copy link
Contributor

cansavvy commented Jun 5, 2023

A couple questions:

  1. Will this alone get rid of the requirement for ariExtra for downstream mario/loqui? Is there a way we can test that?
  2. We should document this and about ariExtra about how it is expected to be used in the future. We might want to figure out what a good plan for this is, that doesn't require us to maintain more packages, but also makes it clear to users as to where they go for what functions.
  3. I'm assuming the addition of these functions doesn't make this package too big? https://community.rstudio.com/t/data-size-limits-for-packages/3748/2 But we should check that. When you run devtools::build() how big is the resulting file?

R/download_gs_file.R Outdated Show resolved Hide resolved
@howardbaik
Copy link
Contributor Author

howardbaik commented Jun 5, 2023

A couple questions:

  1. Will this alone get rid of the requirement for ariExtra for downstream mario/loqui? Is there a way we can test that?
  2. We should document this and about ariExtra about how it is expected to be used in the future. We might want to figure out what a good plan for this is, that doesn't require us to maintain more packages, but also makes it clear to users as to where they go for what functions.
  3. I'm assuming the addition of these functions doesn't make this package too big? https://community.rstudio.com/t/data-size-limits-for-packages/3748/2 But we should check that. When you run devtools::build() how big is the resulting file?
  1. I was on this development branch and clicked on "Install Package" in RStudio's Build tab to install this branch of the ari package locally and tested the following:
## Proof of concept script
library(ari)

gs_url <- "https://docs.google.com/presentation/d/1sFsRXfK7LKxFm-ydib5dxyQU9fYujb95katPRu0WVZk/edit#slide=id.p"

# Script (text)
pptx_path <- download_gs_file(gs_url, out_type = "pptx")
pptx_notes_vector <- pptx_notes(pptx_path)

# Images
pdf_path <- download_gs_file(gs_url, out_type = "pdf")
filenames <- pdf_to_pngs(pdf_path)

# Create a video from images and text
ari_spin(images = filenames, paragraphs = pptx_notes_vector, service = "coqui")

Everything ran smoothly, so looks like we've removed ariExtra! I haven't tested this on mario yet though. I'll test it right now, but did you have any other ideas on how to test this on mario?

  1. Agreed, I'll set up a meeting to talk over this.
  2. I ran devtools::build() and the resulting file, ari_0.4.1.tar.gz is 230.2 KB.

@howardbaik
Copy link
Contributor Author

@cansavvy Do you mind approving this PR so I can merge into main?

@cansavvy
Copy link
Contributor

@cansavvy Do you mind approving this PR so I can merge into main?

Should we wait until we get a chance to talk to @seankross about ari tomorrow?

@cansavvy
Copy link
Contributor

After #45 is merged you’ll need to merge main into here to update this branch. I think some of these failed checks will be resolved by the changes in #45 but let’s see. Mainly you’ll want to pull the GitHub version of text2speech since it has the updates you need that aren’t in CRAN yet

@cansavvy
Copy link
Contributor

cansavvy commented Jul 7, 2023

We’ll just need to address the failed checks:

ERROR: lazy loading failed for package ‘ari’

it can’t load pdftools so we’ll need to look into that. May need to add it as a dependency if it is not already listed. Or we should look into why it can’t seem to be loaded.

@seankross seankross removed the request for review from muschellij2 July 10, 2023 18:20
R/ari_spin.R Outdated Show resolved Hide resolved
R/ari_spin.R Outdated Show resolved Hide resolved
R/ari_spin.R Outdated Show resolved Hide resolved
R/ari_spin.R Show resolved Hide resolved
@seankross seankross changed the base branch from main to dev October 9, 2023 22:13
@seankross seankross marked this pull request as ready for review October 16, 2023 22:29
@seankross seankross self-requested a review October 16, 2023 22:29
@howardbaik
Copy link
Contributor Author

This 4-month old PR is ready to merge! I addressed the comments left by Sean in this branch and the two sub-branches (burn-subtitles, reduce-arguments).

@howardbaik howardbaik closed this Oct 17, 2023
@howardbaik howardbaik reopened this Oct 17, 2023
@howardbaik howardbaik merged commit ff331dd into dev Oct 17, 2023
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.

4 participants