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

Testing the module for the blastula email attachment within GitHub actions #1

Open
cevaboyz opened this issue Jan 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working testing testing the new code

Comments

@cevaboyz
Copy link
Owner

Testing the module for the blastula package for the email attachment creation

We will first test the .csv variant of the attachment, if it works we will consequently test the .xlsx version of the module.

The code is the following, it uses the temp folder made in the virtual environment

write.csv(final_results, paste0("final_results", format(date, "%d-%b-%Y %H.%M"), ".csv"))

file_path <- paste0("final_results", format(date, "%d-%b-%Y %H.%M"), ".csv")

The implementation in the if/else structure is the following

if (n_row_final_results == 0) {
    write.csv(
        as.data.frame(n_row_final_results),
        file = paste0("logs/Amazon_name_log_corretti", date, ".csv")
    )
    
} else{
    email <-
        compose_email(body = blocks(tbl_html),
                      footer = "Questo è un elenco generato automaticamente degli ASIN che richiedono una verifica del Product Title, si ricorda che questo sistema non assicura il 100% di sicurezza ed affidabilità, si richiede quindi un controllo manuale periodico che effettivamente gli ASIN ed i loro Product Titles siano corretti. Per Ulteriori informazioni contattare lo sviluppatore.",
                      title = "AMAZON ITALIA: TITOLI PRODOTTO CHE RICHIEDONO UNA VERIFICA")
    
    email <-
        email %>% add_attachment(
            file = file_path
             )
}
@cevaboyz cevaboyz added bug Something isn't working testing testing the new code labels Jan 16, 2023
@cevaboyz cevaboyz self-assigned this Jan 16, 2023
@cevaboyz
Copy link
Owner Author

The email module with the email-attachment system seems to work with CSV, the next step is to update it with XLSX file extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing testing the new code
Projects
None yet
Development

No branches or pull requests

1 participant