-
Before each meeting, anyone who wishes may sponsor a proposal by filing an issue in the GitHub repository tagged "proposal", at least 24 hours before the meeting. Follow the "Proposal Issue Template".
-
A quorum is established in a meeting if half or more of voting members are present.
-
Once a person has sponsored a proposal, they are responsible for it. The group may not discuss or vote on the issue unless the sponsor or their delegate is present. The sponsor is also responsible for presenting the item to the group.
-
After the sponsor presents the proposal, a "sense" vote is cast for the proposal prior to any discussion:
- Who likes the proposal? (+1)
- Who can live with the proposal? (0)
- Who disagrees with the proposal? (-1)
-
If all or most of the group likes or can live with the proposal, it is immediately moved to a formal vote with no further discussion.
-
If most of the group disagrees with the proposal, it is postponed for further rework by the sponsor.
-
If some members disagree they can briefly state their objections. A timer is then set for a brief discussion moderated by the facilitator. After 10 minutes or when no one has anything further to add (whichever comes first), the facilitator calls for a yes-or-no vote on the question: "Should we implement this decision over the stated objections?" If a majority votes "yes" the proposal is implemented. Otherwise, the proposal is returned to the sponsor for further work.
Note: we are using book
as the master (published) branch because of the
way GitHub handles organization repositories, domain names, and the generation
of the website.
Setup to locally preview the book:
-
Install R (we recommend that you also install and use the RStudio IDE).
-
Open RStudio by clicking on the
merely-useful.github.io.Rproj
file (if not through RStudio, then open an R console in the location of the Merely Useful repo) and install the dependencies by typing in the console:# Make sure you have remotes installed # install.packages("remotes") remotes::install_deps()
Build and preview from the command line:
make py-rse-html
and then open_book/index.html
.make py-rse-pdf
to build the pdf version (also in the_book
folder).make py-rse
to do both of the above.
Or via RStudio:
- When in the R Project (opened via the
.Rproj
file), use the key bindingsCtrl-Shift-B
to build thehtml
output.
- Use the
book
branch as the main "development" branch (notmaster
). - Since
book
is "protected", to add to the repo you must: 1. Submit a PR of a branch from your fork of the repo 1. Each PR must pass the Travis CI check and must get at least one (1) approval from someone else. 1. Generally @gvwilson or @lwjohnst86 merge into the main repo'sbook
branch to make sure the content will generate correctly to the website. However, others should be able to merge as well.
For larger changes:
- Create a branch to work on your chosen chapter.
- Make edits.
- Create a Draft Pull Request to the main repo.
- Add the label "work in progress" to that PR.
- When it's ready for review, remove the label, change the PR status to "Ready to review", and post a note in Slack asking for a reviewer.
For other changes:
- If you are making a smaller change, please create a branch with a meaningful name, submit changes, and ask for a reviewer.
- Finally, if you are doing a major reorganization that involves multiple chapters, please put in a proposal first.
- Add yourself as a reviewer to the PR.
- If making a suggested change to the actual text, please use
"Insert a suggestion"
- For the "reviewee", please accept those changes. GitHub will insert the suggestion directly as a commit, thus giving attribution to the reviewer. Note: This does not work for multi-line suggestions edits (though you can add more lines in the suggestion if desired).
- For individual chapter reviews, look for consistency, content, clarity of material with exercises. Don't worry too much about grammar appearance, structure, etc. This will be done at the end stage.
-
bookdown's behavior is controlled by the metadata in
_bookdown.yml
and in the YAML header ofindex.Rmd
. Please do not add YAML headers to other.Rmd
files, since it is ignored when building the entire book. -
_bookdown.yml
contains an ordered list of R Markdown chapters and appendices. This list is repeated inMakefile
. -
The first element of each chapter must be a level-1 heading. Anything before this heading is silently ignored.
-
The ID for each chapter and section heading is set by putting
{#some-label}
on the heading line. Please use the stem of the file's name in labels, i.e., start all labels for chapterstuff.Rmd
with the wordstuff
. Also include the course type to the beginning (e.g. "r-", "py-", and "rse-"). -
Each chapter ends with a list of key points. These lists are kept in plain Markdown files in the
keypoints
folders so that they can be included in both the chapters and thekeypoints.Rmd
appendices. There are also lists of learning objectives in theobjectives/
directory, but these are now out of date. -
The last line in each chapter includes the file
links.md
, which gives symbolic names to all the external links used in the book and to all glossary entries. Please always use[text][label]
to refer to links and put the URL itself in this file to ensure consistency between chapters. -
Please use the free desktop version of draw.io to draw diagrams. Save the source as
figures/stem/stem.drawio
and export drawings as all of PDF, PNG, and SVG. -
Since LaTeX doesn't understand SVG images, diagrams are included as follows:
- Create an R code block with the header
{r stem-label, echo=FALSE, fig.cap="Some Caption"}
, which means:- Give this figure the ID
fig:stem-label
. (Bookdown automatically putsfig:
in front of figure labels, though it doesn't prefix section labels with anything.) - Don't show the R code used to load the image, just its output (i.e., the image).
- Give the figure the specified caption.
- Give this figure the ID
- Use
insert_graphic("figures/stem/filename.ext")
to include your image. If you are using a.pdf
image, make sure that you have the same file but as a.svg
as well.
- Create an R code block with the header
-
Use
@Name1234
or[@Name1234]
to refer to bibliography entries. These entries must exist in thebook.bib
file. For multiple entries, separate the entries with;
, i.e.[@Name1234;@Name5678]
. -
Use
\@ref(label)
to refer to labels for sections and figures. Note that:- This only inserts the section number, not the words
Chapter
,Appendix
,Section
, orFigure
. - Those are round parentheses, not curly braces.
- If the figure's chunk ID is
stem-label
, usefig:stem-label
to refer to it.
- This only inserts the section number, not the words
-
Glossary entries are taken from the glosario project and from the local file
glossary.yml
. The mechanics for doing this still in flux, but:- Use
make glossary
to create the combined Markdown glossary file inglossary.md
. This assumes you have the latest version ofglosario
checked out of GitHub in your home directory. - To refer to a glossary entry, use a direct link of the form
[text][label]
, wherelabel
is listed in the second half oflinks.md
and refers toglossary.html#label
. - Use
make links
to check for missing or inconsistent entries. There are a handful of false positives because regular expressions are really hard to write...
- Use
-
Do not use
View()
in your R snippets, as Travis will fail when it tries to launch a viewer from the command line.
The process for inserting Python code chunks in R Markdown is the same as for
inserting R code chunks. Simply replace {r}
with {python}
on the first line
of the fenced code chunk:
```{python}
# Python chunks will also be syntax highlighted
for num in range(5):
print(num)
```
Code chunks have options that apply to both R and Python.
Travis needs to know what packages to install to build the website:
-
For R packages, it is very easy. When in the Merely Useful R Project (by opening the
merely-useful.github.io.Rproj
file), typeusethis::use_package("packagename")
in the R Console. This will add the package dependency to theDESCRIPTION
file under the imports section. -
For Python packages you'll need to add the package to the
.travis.yml
under theaddons
section:
addons:
apt:
packages:
- python3
# Add more packages below here
# and looks like "python3-packagename"
# e.g.:
- python3-numpy
NOTE: This section is only to document what was done and why. This does not need to be done, unless others want to clone this repository for their own purposes.
Final building of the website is done via Travis CI. In order to get Travis set
up to push the final generated book to the master
branch, a GitHub Personal
Access Token (PAT) must be added. This PAT can be generated and assigned to
Travis with the following steps:
-
Create a PAT for your account on GitHub (make sure to enable the "repo" scope so that using this token will enable writing to your GitHub repos) and copy the token to your clipboard.
-
Go to https://travis-ci.org/USER/REPO/settings replacing
USER
with your GitHub ID andREPO
with the name of the forked repository. -
Under the section "Environment Variables", type
GITHUB_TOKEN
in the "Name" text box and paste your personal access token into the "Value" text box. -
The
deploy
Travis commands found in.travis.yml
are then used to access this GitHub PAT.