-
Notifications
You must be signed in to change notification settings - Fork 14
Meeting Notes 2018 09 15
Location: Study room 2B at Central Library, Downtown Portland -- 801 SW 10th
Scheduling: Next meeting is Oct 6.
Decisions made:
-
Use glue() instead of paste0()? https://github.com/smithjd/sql-pet/issues/63
- There is consensus that
glue
adds functionality that makes it better to use thanpaste0
. For example, it handles quoting better for SQL statements and it allows for strings with parameter positions that can be filled with variables. So we will use glue() from the beginning of the book.
- There is consensus that
-
Where to start when I come to the site?
-
Open the project in
r-database-docker
:r-database-docker.Rproj
-
Open
index.rmd
. Read it, but nothing to execute here. -
Run the
*.rmd
files in sequence. -
If you are a Windows user, open
02-docker_hosting_for_windows.Rmd
.- This file may still have some problems.
-
03-learning-goals-use-cases.Rmd
: no executable code. -
04-docker-setup-postgres-connect-with-r.Rmd
is first file with code. -
-
Need to explain when error occurs in line 29,
docker_cmd
. -
system2("docker", docker_cmd, stdout = TRUE, stderr = TRUE)
suggestions:- Use fully qualified parameter names with
--
, for example, rather than-d
, use--detach
. - Use
glue
with parameter names that are self-documenting. For example,container_name
,port
,postgres_image
. - Add comments in the code block, explaining the parts of the command. For example,
run --detach
will start a container, running independent of the current process.
- Use fully qualified parameter names with
-
-
-
We walked through an example of the the workflow:
-
- John made changes on a branch.
- John committed on his local machine on that branch.
- John pushed that branch to the
github.com/smithjd/sql-pet/
repository. - Everyone else reviewed the changes. Some people made comments. Some people noticed a typo.
- John went back to his local branch, fixed the typo, committed, and pushed the branch again.
- After refresh of browser, the change appeared in the pull request.
- John felt confident that he had reviewed all comments and did the
Merge
in GitHub. - Everyone else refreshed browser and saw that the pull request was closed.
- Everyone needs to pull from the
github.com/smithjd/sql-pet/
repository to get John's changes that are now on themaster
branch.
-
Minimal toolset to include Rocker/Rstudio?
- Advantages of using a Docker image for your development environment: In tutorial setting, everyone has the same versions of everything.
- Disadvantage: Adds complexity and take much more time to download. Need to explain to people why the Rocker/RStudio image is needed.
- Decision: Wait on Rocker/Rstudio, because it adds complexity and not completely required at this time.
-
Minimal toolset to include pgAdmin4?
- Decision: Same as for Rocker/RStudio: It adds complexity that is not needed immediately.
-
File mounts
- Needed in Chapter 6 for the dvdrental restore file
- Needed to demonstrate creating backups and saving them?
- See: https://pdxdata.slack.com/archives/CB3QTE84V/p1536435715000100
- Decision: These are not needed yet. The current
dvdrental.Dockerfile
is good enough for now to let people get started.
-
Clean up the directory structure?
- JDS: make a diagram of the current directory structure. Put that in the README
- Decision: It is okay to delete the
src
directory. It is already in GitHub, so we can go back to it if necessary. - In the future, we might want a
src/
directory again, with the code from ther-database-docker/*.Rmd
files.
Discussions (above the line is “need to discuss”, below are topics we can let slide if necessary)
-
How is our process?
- Pace, scope, purpose, etc.?
- Pull requests, reviews, approvals?
- Github Projects?
- Mix of Git Issues, Wiki, Google Docs, etc.
-
Have we collected all the insights from the “Windows troubles”?
- Action Item: Sophie will write something about her experiences testing the set-up for Windows. Provide any corrections / details for Chapter 2.
-
a sample: .gitattributes to save Windows folks some grief?
- Anything sent to Linux (e.g., Docker) needs to have Linux line endings.
-
.gitattributes
allows you to define line endings? Need to test this. - If you are editing *.Rmd files on Windows, edit them in RStudio to get the line endings correct.
-
Use and installation of pgAdmin4: https://github.com/smithjd/sql-pet/issues/55
-
PostgreSQL backup and restore: https://github.com/smithjd/sql-pet/issues/54
-
- This is most conveniently done with pgAdmin4 - we’d need a shared volume to store backups
-
How much do we lean on existing tutorials
-
- Like dplyr: https://suzan.rbind.io/tags/dplyr/
-
Todo’s
-
Sophie: slew of SQL examples
-
Metadata investigation
- Tables
- Columns
-
-
Ian: sql_glue on dvdrental
-
Maryann: instructional chapter edits
-
Dipti: Learning goals / accomplishments for each chapter.
-
-
A repeatable ‘learning objectives’ framework to be overlayed on all chapters
- I used to hang out with the Software Carpentry folks. They based their pedagogical framework on concept maps - they used this book https://www.amazon.com/How-Learning-Works-Research-Based-Principles-ebook/dp/B003IEJZXS/
-
Using ODBC and the Connections tab?
- Is it worth it?
- How much work to document?
- Who will do it?
-
Distinction between repo’s root directory and
r-database-docker
-
What does “apply a consistent style to all .Rmd files” mean?
-
Docker on a laptop as a server for students in a class (networking)
-
Worth doing?
-
How do it?
-
Resources
- Notes from discussion with Scott: https://pdxdata.slack.com/messages/CB3QTE84V/
- https://community.rstudio.com/t/connections-tab-and-odbc-on-macos/14266
- https://db.rstudio.com/rstudio/connections/
- https://db.rstudio.com/best-practices/drivers/
- https://community.rstudio.com/t/connections-tab-and-odbc-on-macos/14266/2
- https://www.nielsenmark.us/2018/07/07/connecting-r-to-postgresql-on-linux/
-
-
The “Docker way” traditions that Scott talks about
- Are they relevant in our use case?
- Do we want to mention them explicitly? Or just follow them?