<!-- .slide: data-background="https://raw.githubusercontent.com/maxulysse/maxulysse.github.io/main/assets/img/svg/green_white_bg.svg" --> <a href="https://www.nf-co.re"><img src="https://raw.githubusercontent.com/nf-core/logos/master/byte-size-logos/bytesize-darkbg.svg" width="60%"><img></a> ## \#18: Development environments & workflows II Maxime U Garcia ▸ [<i class="fa fa-twitter" aria-hidden="true"></i>@gau](https://twitter.com/gau/) | [<i class="fa fa-github" aria-hidden="true"></i>@maxulysse](https://github.com/maxulysse/) Karolinska Institutet | Science for Life Laboratory Sweden --- ## Overview - 👷‍♀️ Working Best Practices - <i class="fa fa-github" aria-hidden="true"></i> 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 - <i class="fa fa-github" aria-hidden="true"></i> 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 ```bash gh repo clone <username>/<repo> cd <repo> ``` --- ## Git + GitHub configuration Do work ```bash 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 ```bash # 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 - VSCode plugins: [_**"nf-core-extensionpack"**_](https://marketplace.visualstudio.com/items?itemName=nf-core.nf-core-extensionpack) 🚀 --- ## Local testing - 📃 Running tests locally - 🐍 Pytest workflow locally --- ## Spotify [<i class="fa fa-spotify" aria-hidden="true"></i>](https://open.spotify.com/playlist/6LyhtB3bllSwNbK9iDNVgH?si=eaf6b95eac934e71) --- ## Acknowledgements <img src="https://raw.githubusercontent.com/maxulysse/maxulysse.github.io/main/assets/img/svg/acknowledgments_2021_dark.svg" title="Institutes acknowledgements" alt="Institutes acknowledgements"/> --- <a href="https://nf-co.re/community#organisations"> <img src="https://raw.githubusercontent.com/maxulysse/maxulysse.github.io/main/assets/img/svg/institutes_2021_dark.svg" title="Institutes acknowledgements" alt="Institutes acknowledgements"/> </a> --- <a href="https://nf-co.re/community#contributors"> <img src="https://raw.githubusercontent.com/maxulysse/maxulysse.github.io/main/assets/img/slides/nf-core_contributors_2021_03.png" title="Contributors acknowledgements" alt="Contributors acknowledgements"/> </a> --- <!-- .slide: data-background="https://raw.githubusercontent.com/maxulysse/maxulysse.github.io/main/assets/img/svg/green_white_bg.svg" --> ## Need help? - bytesize 4: - [GitHub contribution basics](https://nf-co.re/events/2021/bytesize-4-github-contribution-basics) - bytesize 11: - [Development environments & workflows](https://nf-co.re/events/2021/bytesize-11-dev-envs-workflows) - bytesize 17: - [Pytest workflow](https://nf-co.re/events/2021/bytesize-17-pytest-workflow) Get involved: [https://nf-co.re/join](https://nf-co.re/join) [<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" width="1.6em" height="1.6em" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" class="slack-svg"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52a2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521a2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521a2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523a2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z" fill="white" class="slack-path"/></svg>](https://nfcore.slack.com/) [<i class="fa fa-twitter fa-2x" aria-hidden="true"></i>](https://www.twitter.com/nf_core) [<i class="fa fa-github fa-2x" aria-hidden="true"></i>](https://github.com/nf-core) [<i class="fa fa-youtube fa-2x" aria-hidden="true"></i>](https://www.youtube.com/c/nf-core) <style> .reveal section img { background:none; border:none; box-shadow:none; } body { background-image: url(https://raw.githubusercontent.com/nf-core/logos/master/nf-core-logos/nf-core-logo-square.svg); background-size: 7.5%; background-repeat: no-repeat; background-position: 3% 96%; background-color: #181a1b; } .reveal body { font-family: 'Roboto', sans-serif; font-weight: 300; color: white; } .reveal p { font-family: 'Roboto', sans-serif; font-weight: 300; color: white; } .reveal h1 { font-family: 'Roboto', sans-serif; font-style: bold; font-weight: 400; color: white; font-size: 62px; } .reveal h2 { font-family: 'Roboto', sans-serif; font-weight: 300; color: white; } .reveal h3 { font-family: 'Roboto', sans-serif; font-style: italic; font-weight: 300; color: white; } .reveal p { font-family: 'Roboto', sans-serif; font-weight: 300; color: white; } .reveal li { font-family: 'Roboto', sans-serif; font-weight: 300; color: white; } .reveal pre { background-color: #272822 !important; display: inline-block; border-radius: 7px; color: #aaaba9; } .reveal pre code { color: #eeeeee; background-color: #272822; font-size: 100%; } .reveal code { background-color: #272822; font-size: 75%; } .reveal .progress { color: #24B064; } .reveal .controls button { color: #24B064; } .reveal blockquote { display: block; position: relative; width: 90%; margin: 20px auto; padding: 5px; background: rgba(255, 255, 255, 0.05); box-shadow: 0px 0px 2px rgb(0 0 0 / 20%); } .fa { color: white; } a .fa-github:hover { color: #000000; } a .fa-spotify:hover { color: #1DB954; } a .fa-twitter:hover { color: #4099FF; } a .fa-youtube:hover { color: #FF0000; } a .slack-svg:hover .slack-path {fill: #000000;} </style>
{"metaMigratedAt":"2023-06-16T02:56:39.035Z","metaMigratedFrom":"YAML","title":"nf-core/bytesize - Development environments & workflows II","breaks":true,"contributors":"[{\"id\":\"fb193497-1111-470c-a594-827d34b6f673\",\"add\":134089,\"del\":140082}]"}
    719 views
   owned this note