owned this note changed 4 years ago
Published Linked with GitHub

#18: Development environments & workflows II

Maxime U Garcia ▸ @gau | @maxulysse
Karolinska Institutet | Science for Life Laboratory
Sweden


Overview

  • 👷‍♀️ Working Best Practices
  • Git + GitHub configuration
  • 💻 VSCode configuration
  • 💥 Local testing

Disclaimer

  • My own work flow
    • Probably not the best

Working Best Practices

  • ⏱️ ~20 min each morning on emails/Slack
  • 🚶 Stand up at least 5 min every hour or so
  • 🥤 Drink water
  • 🔕 Avoid distractions
  • ☕ Get some time for Fika

Git + GitHub configuration

  • Set up your fork on GitHub
  • 💾 Configure your local clone
  • 🚀 Work on other people's code
  • ♻️ Pull in updates

Git + GitHub configuration

Local clone setup

gh repo clone <username>/<repo>
cd <repo>

Git + GitHub configuration

Do work

git checkout -b <branch>_<new_feature>
git add <file>
git commit -m "feat: Did a thing"
git commit -m "fix: Fixed a thing"
git commit -m "chores: Had to do a thing"
git push -u origin <branch>_<new_feature>
gh pr create --base <branch> --title "<new_feature>" \
  --body "This <new_feature> is amazing and here's why..."

Git + GitHub configuration

Do tiny modifications

  • On GitHub

Git + GitHub configuration

Keep code up to date locally

# Check for uncommitted changes
git status
# Pulls remote origin
git pull
# Fetch upstream and merge upstream branch on local
git fetch upstream; git merge upstream/<branch>

Git + GitHub configuration

Keep code up to date on GitHub

  • On GitHub

VSCode configuration

  • 👷‍♀️ Best Practices
  • ⚒️ Useful plugins

VSCode configuration

  • One main workspace
  • One workspace for each repo

VSCode configuration

Plugins


Local testing

  • 📃 Running tests locally
  • 🐍 Pytest workflow locally

Spotify


Acknowledgements

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →



Need help?

Get involved:
https://nf-co.re/join

Select a repo