diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index d572a610..85ccadc7 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -58,19 +58,43 @@
This outlines how to propose a change to fusen. For more detailed info about contributing to this, and other tidyverse packages, please see the development contributing guide.
+This outlines how to propose a change to fusen.
We are open to any contribution, from typos to new features. We will guide you throughout the process and make you in a safe position to contribute, whatever is your level in R programming.
Multiple files of the package in “R/”, “tests/” and “vignettes/” are issued from a flat file. When this is the case, you will see this Warning on top of the file:
---“# WARNING - Generated by {fusen} from dev/flat_xxx.Rmd: do not edit by hand”
-
This means that you will need to make your changes in the corresponding flat file, and then inflate()
this same flat file. We recommend using fusen::inflate_all()
directly so that it takes into account any modification.
This way of developing is what {fusen} is for. We assume that if you contribute to {fusen}, you may already use it. If this is not the case, you can read the Readme of the project on GitHub.
+Package ‘fusen’ is used to build the code base and documentation of ‘fusen’. ‘fusen’ is a package that provides a framework for building R packages from a Rmarkdown file (or Quarto file). See documentation of ‘fusen’ for more details: https://thinkr-open.github.io/fusen
+We are here to help. If you know how to modify a package without ‘fusen’, contribute as you would do normally.
+Forget the flat files for a moment. A ‘fusen’ package is still a classical package if you remove the “dev/” directory. There is no difference.
Open a Pull Request and we will help you to integrate your contribution in the ‘fusen’ framework.
+Most of modifications can be realized by modifying a ‘flat’ file in the “dev/” directory. Then, run fusen::inflate_all()
to generate the corresponding R, test or vignette files.
You can see the list of all active
flat files and the corresponding generated files by opening the “dev/config_fusen.yaml” file. There is one section for each flat file.
You will see text like "# WARNING - Generated by 'fusen' from dev/flat_***.Rmd: do not edit by hand"
on the top of all generated R, test or vignette files, when they are actually generated by ‘fusen’. All other file, not generated by ‘fusen’, should be listed under the "keep"
section in the “dev/config_fusen.yaml” file. You can run fusen::check_not_registered_files()
to check if that’s the case.
function
chunkWe recommend a test driven development approach:
+test
chunk of the functionfunction
chunkdevtools::test()
to check if the test is passingTo avoid multiple inflates, you can run the code locally
+fusen::load_flat_functions()
to load the function of the current flat file in your global environmenttest
chunk‘fusen’ is partially built using ‘fusen’ itself.
+If you’re not sure on how to contribute using ‘fusen’, you can contribute as for any other package: a package made with the help of ‘fusen’ does have exactly the same structure as a classical package.
+Knowing that, if you want to contribute to ‘fusen’, you can follow the instructions in the CONTRIBUTING.md file.
my_path <- tempfile("mypkg")
create_fusen(path = my_path, template = "full", open = FALSE)
-#> ── Creating new directory: /tmp/Rtmp7fCMeq/mypkg18e244043ec4 ───────────────────
-#> ✔ Creating '/tmp/Rtmp7fCMeq/mypkg18e244043ec4/'
-#> ✔ Setting active project to '/tmp/Rtmp7fCMeq/mypkg18e244043ec4'
+#> ── Creating new directory: /tmp/RtmpvYEgyF/mypkg17caa60c731 ────────────────────
+#> ✔ Creating '/tmp/RtmpvYEgyF/mypkg17caa60c731/'
+#> ✔ Setting active project to '/tmp/RtmpvYEgyF/mypkg17caa60c731'
#> ✔ Creating 'R/'
#> ✔ Writing a sentinel file '.here'
#> • Build robust paths within your project via `here::here()`
#> • Learn more at <https://here.r-lib.org>
#> ✔ Setting active project to '<no active project>'
-#> ✔ New directory created: /tmp/Rtmp7fCMeq/mypkg18e244043ec4
-#> ✔ Added /tmp/Rtmp7fCMeq/mypkg18e244043ec4/dev/flat_full.Rmd, /tmp/Rtmp7fCMeq/mypkg18e244043ec4/dev/0-dev_history.Rmd
+#> ✔ New directory created: /tmp/RtmpvYEgyF/mypkg17caa60c731
+#> ✔ Added /tmp/RtmpvYEgyF/mypkg17caa60c731/dev/flat_full.Rmd, /tmp/RtmpvYEgyF/mypkg17caa60c731/dev/0-dev_history.Rmd