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

Add sepuku feature to switch from a fusen package to a "classic" package #257

Closed
ymansiaux opened this issue Jun 3, 2024 · 1 comment
Closed

Comments

@ymansiaux
Copy link
Contributor

ymansiaux commented Jun 3, 2024

  • Si pas de dossier dev/ : un message et on s'arrête

  • Si pas de config_fusen.yml : avertir qu'on va lister les fichiers flat présent dans dev et flat_history

  • Si fichier de config_fusen.yml : avertir qu'on va lister les fichiers flat présent dans dev et flat_history et dans ce fichier

Une fonction list_all_flat_files()

  • Identification des fichiers dans R/

  • Identification des fichiers dans tests/

  • Identification des fichiers dans vignettes/

Une fonction find_files_generated_by_fusen()

To deal with :

  • Ensure we are on a package

  • Ensure we have a dev/ folder

  • Absence of flat files in dev/ or dev/flat_history/

  • Absence of dev/config_fusen.yml

    • We suppose that no flat file have been inflated yet : deleting all files starting with "flat*" in dev
  • Thereafter we can work with dev/config_fusen.yml : it allows us to delete file not starting with "flat_"

    • Verify if all flat file starting with "flat_" are listed in this file
  • Clean R/, vignettes/ and tests/ folders

  • Look for messages starting with "# WARNING - Generated by {fusen}" in R/, vignettes/, tests/testthat folders

  • Look for messages starting with "# Previously generated by {fusen} from" in R/, vignettes/, tests/testthat folders

  • Delete dev/config_fusen.yml

  • List files that we are about to delete and ask user for confirmation

  • List all deleted files and folders

  • Update NEWS

@ymansiaux
Copy link
Contributor Author

ymansiaux commented Jun 5, 2024

We must call:

  • list_flat_files()
  • find_files_with_fusen_tags()

Warn the user about the file that will be deleted
Warn the user about the file that will be edited

  • remove files found by list_flat_files()
  • remove dev/flat_history()
  • clean_fusen_tags_in_files()
  • delete dev/config_fusen.yml

ymansiaux added a commit that referenced this issue Jun 6, 2024
doc to be made
one test failing in non interactive
#257
ymansiaux added a commit that referenced this issue Jun 7, 2024
ymansiaux added a commit that referenced this issue Jun 7, 2024
ymansiaux added a commit that referenced this issue Jun 7, 2024
ymansiaux added a commit that referenced this issue Jun 10, 2024
ymansiaux added a commit that referenced this issue Jun 10, 2024
- The user was asked to confirm sepuku twice
- The flat_history folder was not deleted
- The message telling cleaning was done was displayed even if the cleaning was cancelled

#257
ymansiaux added a commit that referenced this issue Jun 10, 2024
ymansiaux added a commit that referenced this issue Jun 10, 2024
ymansiaux added a commit that referenced this issue Jun 12, 2024
Use suppressWarnings in readLines() used to parse files for fusen tags

#257
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

No branches or pull requests

1 participant