---
title: "Sinew Workflow"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Sinew Workflow}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

The suggested workflow for sinew is an extension of the [alternative documentation workflow](https://r-pkgs.org/man.html#man-workflow-2) described in the [R packages](https://r-pkgs.org/) book by Hadley Wickham.

**Initial Package Build**

  1. Create a [_sinewconfig.yml](#sinewopts) file in package/project root folder. Set any persistent definitions such as author name and default fields to be generated for all functions.
  1. Develop `R` script for the package using proper namespacing definitions, i.e. `package::function`, or use `sinew::pretty_namespace`. Focus *only* on the function and package logic.
  1. Run `sinew::makeOxygen` (single file) or `sinew::makeOxyFile` (directory) to create skeletons. It is suggested to use the [styler](https://github.com/r-lib/styler) package beforehand to have ensure proper R script syntax conventions.
  1. Fill in the relevant descriptions and examples.
Run `sinew::make_import` to create the correct `Imports` in the `DESCRIPTION` file.
  1. Build the Package

**Package Maintenance**

  1. Update functions as needed
  1. Run `sinew::moga` on updated functions
  1. Fill in the relevant descriptions and examples.
  1. If needed run `sinew::make_import` to create the correct Imports in the `DESCRIPTION` file.
  1. Build the Package
