2. Project Management

Spencer Mewherter

  • Build a personal site describing you and your final project.
  • Upload it to the class archive.
  • Work through a git tutorial. Learning outcomes
  • Explore and use website development tools
  • Identify and utilise version control protocols Have you?
  • Made a website and described how you did it
  • Introduced yourself
  • Documented steps for uploading files to archive
  • Pushed to the class archive
  • Signed and uploaded Student Agreement

Simple Git Commands I Use for (Almost) Everything

After working with git for a while I thought I’d made some notes on the basics to get started and keep using git in the terminal. All of these commands should be cross platform. These are the commands I used for 95% of my interactions with git

git status

Shows what saved edits have been made to the files in your repo

git add .

Adds any changes to be staged to be commited

git commit -m 'type your comment in these quotes'

Commits staged changes with a comment

git push

Pushes to your master gitlab repo, may ask for your password.

git Setup on an Ubuntu System

First I installed git using the ubuntu package manager sudo apt install git

on mac

git --version

say yes to install dev tools on mac

on windows look for a guide

I then ran the git config setting for my email and user name

git config --global user.email "spencer.mewherter@gmail.com"

git config --global user.name "spencer.mewherter"

I then generated a ssh public key

ssh-keygen -t rsa -C

and copied it using xclip

sudo apt install xclip

xclip -sel clip < ~/.ssh/id_rsa.pub

I then added it to my gitlab account under the settings.

to view public key

cat ~/.ssh/id_rsa.pub

mkdocs Setup on an Ubuntu System

I first checked my python version to make sure it was installed. Python 3 is installed by default on Ubuntu LTS python --version

First I needed to install pip, a python package manager to do this I ran sudo apt install python3-venv python3-pip

I could then install MKdocs by running

pip3 install mkdocs

I also needed to install the material theme for mkdocs

pip3 install mkdocs-material

I can now serve my page locally using

mkdocs serve

I can then copy the address into a web browser to see my page locally.

Learning git!

After an invigorating first half of lecture covering the vast, limitless, and empowering world of digital fabrication, we got a high speed overview of version control and web development. While I have been the cheerleader during a couple of web development projects, this is my first real dive into the topic. Weeeeeee!

I consulted our instructor Dan page to see what tutorial he did

Git is set up!

Building A Website

Great! I can push and pull from git to my local computer, I can edit my default template, and I have an editor. Time to make a website! First I decided to find three sites i really like.

Drew Wilson my friends personal site, nice and simple with good graphics

Boulter Plywood A place a buy a lot of plywood from, I would challenge anyone to find a superfluous element of this website. Not pretty but incredibly functional

Evil Mad Scientist

Another site with a dense amount of information. decently organized but not super intuitive.

I’m going to start by editing the default template to try and get this work up! I worked through a markdown tutorial which was super useful. I’m starting with just editing the template to get all of my info up. I would like to create a new site from the ground up and work in HTML.

Editing my page seems to be going pretty well. Added resized images. pushed it to my gitlab repo. here is my string for adding, committing, and pushing my work.

git add . 

git commit -a ‘insert comment here’

git push 

one issue i’m having is with mkdocs serving locally, I’ve had a hard time installing the ‘material’ theme. this may be due to my using homebrew to install it. for the time being i’m pushing everything to check my edits. not particularly ideal.

commands for installing ‘material’

brew install mkdocs-material 

I’ll try and revisit this once i have my site updated fully. It is working even though it’s inconvenient to check my edits after pushing to git labs.

Here is my error when trying to serve from mkdocs

Users-MacBook-Air-4:spencer-mewherter user$ mkdocs serve
INFO    -  Building documentation... 
ERROR   -  Config value: 'theme'. Error: Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs 

Aborted with 1 Configuration Errors!

After some help (thanks drew!) I got the mkdocs theme ‘material’ working. My issues were based on my version of python not being installed via homebrew and some other version errors.

terminal commands for fixing this issue

brew install python
brew unlink python && brew link python
pip3 install mkdocs-material

Great! serving locally is working great! I found this has made working with images much easier.

I’m resizing my images with GIMP. I would like to get the batch converter set up. so far it’s been tricky to get it working. I’m sensing a theme of things being trickier to get running then the walkthroughs and readmes suggest. In terms of triage everything is working fine for the moment.

Tools I’ve been using

terminal outout from installing git

// Users-MacBook-Air-4:~ user$ chsh - /bin/zsh
usage: chpass [-l location] [-u authname] [-s shell] [user]
Users-MacBook-Air-4:~ user$ git --version
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Users-MacBook-Air-4:~ user$ git config --global user.name "Spencer Mewherter"
Users-MacBook-Air-4:~ user$ git config -- global user.email spencer.mewherter@gmail.com
fatal: not in a git directory
Users-MacBook-Air-4:~ user$ git config --global user.email spencer.mewherter@gmail.com
Users-MacBook-Air-4:~ user$ $ cd /Users/user/my_project
-bash: $: command not found
Users-MacBook-Air-4:~ user$ cd /users
Users-MacBook-Air-4:users user$ cd /user
-bash: cd: /user: No such file or directory
Users-MacBook-Air-4:users user$ cd/fab
-bash: cd/fab: No such file or directory
Users-MacBook-Air-4:users user$ cd /fab
-bash: cd: /fab: No such file or directory
Users-MacBook-Air-4:users user$ cd/ fab
-bash: cd/: No such file or directory
Users-MacBook-Air-4:users user$ cd /Users/user/fab
Users-MacBook-Air-4:fab user$ git init
Initialized empty Git repository in /Users/user/fab/.git/
Users-MacBook-Air-4:fab user$ $ git clone https://github.com/libgit2/libgit2
-bash: $: command not found
Users-MacBook-Air-4:fab user$ git clone https://github.com/libgit2/libgit2
Cloning into 'libgit2'...
remote: Enumerating objects: 98103, done.
remote: Counting objects: 100% (98103/98103), done.
remote: Compressing objects: 100% (26494/26494), done.
remote: Total 98103 (delta 69851), reused 98102 (delta 69850), pack-reused 0
Receiving objects: 100% (98103/98103), 48.77 MiB | 5.17 MiB/s, done.
Resolving deltas: 100% (69851/69851), done.
Checking out files: 100% (10336/10336), done.
Users-MacBook-Air-4:fab user$ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    libgit2/

nothing added to commit but untracked files present (use "git add" to track)
Users-MacBook-Air-4:fab user$ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    .DS_Store
    libgit2/
    readme.rtf

nothing added to commit but untracked files present (use "git add" to track)
Users-MacBook-Air-4:fab user$ git add readme
fatal: pathspec 'readme' did not match any files
Users-MacBook-Air-4:fab user$ git add readme.rtf
Users-MacBook-Air-4:fab user$ git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

    new file:   readme.rtf

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    .DS_Store
    libgit2/

Users-MacBook-Air-4:fab user$ 

Users-MacBook-Air-4:fab user$ ssh-keygen -t  rsa -b 4096 -C "spencer.mewherter@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/user/.ssh/id_rsa): 
Created directory '/Users/user/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/user/.ssh/id_rsa.
Your public key has been saved in /Users/user/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:dgF7to3/x+OfU8jlDTcb2ERi+XsOkFQ7kTftN39UVAo spencer.mewherter@gmail.com
The key's randomart image is:
+---[RSA 4096]----+
|        .   E+=+=|
|         o  ooo*+|
|        . +. .Ooo|
|         o =o..B*|
|        S + .o BX|
|       . . .  +oB|
|            .  ++|
|             . o=|
|              o+=|
+----[SHA256]-----+
Users-MacBook-Air-4:fab user$ 

vscode screenshot

new