Skip to content

Latest commit

 

History

History
409 lines (305 loc) · 16.9 KB

File metadata and controls

409 lines (305 loc) · 16.9 KB

Data Management

For Scientific Research

stanza body copyPhoto: © Stanza. Used with permission.

Project Management and Version Control

Project management is the process and activity of planning, organizing, motivating, and controlling resources, procedures and protocols to achieve specific goals in scientific or daily problems.

Source: Wikipedia

Traditional Project Management (phases)Image: Alphamu57 / Wikimedia

"Traditional" Approach

  1. Initiation
  2. Planning and design
  3. Execution and construction
  4. Monitoring and controlling systems
  5. Completion

Traditional Project Management (phases)Image: Alphamu57 / Wikimedia

"Agile" Approach

  • Plan
  • Collaborate
  • Deliver

Agile Project ManagementImage: Planbox / Fongamanda / Wikimedia

Project Management Constraints

  • Scope
  • Time (Schedule)
  • Cost
  • Quality

Project Management ConstraintsImage: John Manuel Kennedy T. / Wikimedia

Redmine: Self-Hosted Project Management

redmine screenshot

GitHub: Cloud-Hosted Project Management

github screenshot

Redmine and GitHub Common Features

  • Web-based
  • Multi-user
  • User/role management
  • Workflow management
  • Documentation (wiki, files)
  • Issue tracking (bug reporting)
  • Notifications (email)
  • Status reports and charts
  • Version control

Version Control Systems (VCS)

... allow you to:

  • Keep a log of all "commits"
  • Store complete history
  • Retrieve old versions
  • Compare with "diff"
  • Branching and merging
  • Local, centralized, or distributed

revision control branchingImage: JSami Kerola/ Moxfyre / Echion2 / Wikimedia

Git: A popular, free VCS

  • Fast, compact, and scalable
  • Excellent branching and merging
  • Distributed
  • Runs on all major platforms
  • Several free hosting options
  • Integrates well (with e.g. Redmine)
  • Many graphical clients available

Git: Command Line Interface (CLI)

git screenshot

git log --graph --decorate --all --pretty=oneline

Git: Graphical User Interface (GUI)

git screenshot

Hands-on Group Exercise: Using Git


git clone

Clone a repository into a new directory

mkdir git-test
cd git-test
git clone ssh://high@git.deohs.washington.edu/opt/git/ehit/dataman.git
Cloning into 'dataman'...
remote: Counting objects: 637, done.
remote: Compressing objects: 100% (316/316), done.
remote: Total 637 (delta 338), reused 602 (delta 320)
Receiving objects: 100% (637/637), 18.06 MiB | 23.93 MiB/s, done.
Resolving deltas: 100% (338/338), done.

git add

Add file contents to the index

cd dataman
echo "This is a test file." > test-file.txt
git add test-file.txt

git status

Show the working tree status

git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#  new file:   test-file.txt
#

git commit

Record changes to the repository

git commit -m "Adding new test file"
[master fa1e105] Adding new test file
 1 file changed, 1 insertion(+)
 create mode 100644 test-file.txt
git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

git push

Update remote refs along with associated objects

git push
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 296 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
To ssh://high@git.deohs.washington.edu/opt/git/ehit/dataman.git
   44d1fca..fa1e105  master -> master

git log

Show commit logs

git log
commit fa1e10522de9ea3b21b304d16ee4d3fdcece71b8
Author: Brian High <high@uw.edu>
Date:   Wed May 28 16:16:58 2014 -0700

    Adding new test file
...

git log (graph, decorate, all, oneline)

git log --graph --decorate --all --pretty=oneline

git screenshot

git diff

Show changes between commits, commit and working tree, etc

echo "There's more to a good haiku" >> test-file.txt
echo "than having three lines." >> test-file.txt
git diff
diff --git a/test-file.txt b/test-file.txt
index 6de7b8c..4844fe6 100644
--- a/test-file.txt
+++ b/test-file.txt
@@ -1 +1,3 @@
 This is a test file.
+There's more to a good haiku
+than having three lines.

git diff shows a unified diff.

diff as seen in Redmine and GitHub

Redmine:

redmine screenshot redmine screenshot


GitHub:

git screenshot

Redmine and Git Integration

Redmine integrates repositories using special syntax in issues and commits.

redmine screenshot


redmine screenshot

Closing Issues with Git Commits

git commit -m "Added Project Management Presentation, closes #2741, refs #2732"

redmine screenshot

Discussion

We will discuss your experiences with Git. Is version control worth the effort?

discussionGraphic: Jagbirlehl / Wikimedia

In the Coming Sessions...

  • Data Security
  • Systems Administration

Action Items (videos, readings, and tasks)

watching
readings
tasks
  • Clone your Git repo. Add/commit/push your project code.
  • Make a branch, change the branch, and merge into "master".
  • Do the same from a graphical Git client. Which is easiest?
  • Make Redmine issues that reference commits and vice-versa.

See Also

Questions and Comments

questionImage: © Nevit Dilmen / Wikimedia

Some Parting Words

Version control is the lab notebook of the digital world.

--Software Carpentry

steven roberts lab notebookImage: Steven Roberts