BA3 Text as Data · Session 4

Keeping your repository tidy

Most of your repositories work. These are the problems that came up most often. None costs marks on its own, but each makes your work harder to check.

1Put each file in its demo folder

Each demo folder has three parts: README.md, workflow/, and output/.

demos/ └── 03-descriptive-patterns/ ├── README.md ├── workflow/ │ └── your-workflow.ows └── output/ ├── counts.png ├── tfidf.png ├── counts-top10.png └── tfidf-top10.png

Move loose files out of demos/ and the repository root, and delete extra copies, including any second copy of the template.

2Use the exact file names

When a session page says output/counts.png, save a file called counts.png inside the output folder.

Not thisoutput:counts.png
output_counts.png
swirl-01.png.png
wordcloud.png .png
fidf.png
Thiscounts.png inside output
counts.png inside output
swirl-01.png
wordcloud.png
tfidf.png

If your computer hides file extensions, turn that setting off.

3Fill in the README

The README is the first thing I read. Without your settings and reflection, the demo is not complete.

4Keep system files out

The template’s .gitignore blocks the first two. Add a line *.swp.p to it for the third. A file already committed stays until you delete it and commit the deletion.

5Keep one workflow per demo

Keep only the workflow that made your figures. Git keeps the old versions.

6Say what changed in the commit message

Not thisUpdate README.md
Update .DS_Store
ThisAdd Demo 3 bar charts
Fix figure names in Demo 2

Before you push

  1. Files are in workflow/ or output/ of the right demo.
  2. Names match the session page.
  3. The README is filled in.
  4. No .DS_Store, .Rhistory, or .swp.p files.
  5. The commit message says what changed.
  6. After pushing, check the files on github.com.