Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitpod config to be used for tutorials #1093

Merged
merged 23 commits into from
Mar 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 0 additions & 60 deletions .github/CONTRIBUTING.md

This file was deleted.

29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

14 changes: 0 additions & 14 deletions .github/markdownlint.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/mlc_config.json

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/broken_link.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/markdown.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/web-deploy.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/yaml.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .gitignore

This file was deleted.

44 changes: 16 additions & 28 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
---
# based on https://github.com/gitpod-io/template-docker-compose
image: nfcore/gitpod:latest

tasks:
- init: docker-compose pull
- command: chmod a+x /workspace/nf-co.re && docker-compose up
vscode:
extensions: # based on nf-core.nf-core-extensionpack
- EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files
- Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar
- mechatroner.rainbow-csv # Highlight columns in csv files in different colors
# - nextflow.nextflow # Nextflow syntax highlighting
- oderwat.indent-rainbow # Highlight indentation level

ports:
- port: 8888
onOpen: open-preview

vscode:
extensions:
- ms-azuretools.vscode-docker
- esbenp.prettier-vscode
github:
prebuilds:
# enable for the default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: false
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: false
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
- port: 8080
onOpen: ignore
tasks:
- init: git checkout gitpod_exercises
- command: |
parsed=`echo $url | tr -s "[" "/" | tr -s "+" "."`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this parses the string

https://gitpod.io/#url=nf-co+re[usage[tutorials[nf_core_usage_tutorial/https://github.com/nf-core/nf-co.re/blob/gitpod_config_training/

Parts of the URL:

https://gitpod.io/#                                              // Gitpod prefix
url=nf-co+re[usage[tutorials[nf_core_usage_tutorial              // Value pair, separate by commas
https://github.com/nf-core/nf-co.re/blob/gitpod_config_training/ // Repo + branch to open

Does URL encoding work (it says the values are URL encoded)? https://www.urlencoder.org/

https://carpentries-incubator.github.io/workflows-nextflow/01-getting-started-with-nextflow/index.html

becomes

https%3A%2F%2Fcarpentries-incubator.github.io%2Fworkflows-nextflow%2F01-getting-started-with-nextflow%2Findex.html

How can I test this? I tried editing the other page https://github.com/nf-core/nf-co.re/pull/1094/files
but then I can't get to the button in the preview browser.

We may just be over complicating things here though.
What would be nice is just:
teaching_view

So a preview panel with the website (using gp preview URL and it's navigable)
And then as large a terminal as possible. I moved the terminal position to the right to have them side by side.
( Menu > View > Appearance > Panel position > right ).
Then they can do all their work in an exercises folder and not have to worry about all the other distractions along the side.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was too focused on carpentries material before and forgot we have two use cases here.

For the nf-core training material we want buttons on each page as they are standalone training guides, so we should definitely see if URL encoding is sufficient to open the correct URL with gp preview.

The Carpentries Workshop though just needs to start from the setup page and can have a simpler link.

newurl="https://$parsed"
gp preview $newurl
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"settings": "",
"workbench.startupEditor": "none"
}
Loading