8000 GitHub - thomasdenecker/sandbox.bio: Interactive bioinformatics tutorials
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

thomasdenecker/sandbox.bio

 
 

Repository files navigation

sandbox.bio

Deploy sandbox.bio Deploy stg.sandbox.bio Deploy dev.sandbox.bio Tests

Interactive bioinformatics command-line tutorials.

Development

Branches

  • dev: Development branch, pushing there runs tests if changes to app/* were made + auto deploys to dev.sandbox.bio
  • main: Production branch; merge dev into main to deploy to stg.sandbox.bio

Local dev

npm run dev

Tests

  • npm run test will launch all the tests in headless way
  • cypress open opens Cypress so you can see the tests inside Chrome
  • npm run test -- --spec "tests/test_tutorials.js" runs a single file

Deploy

npm run deploy-dev

Debugging

Local biowasm builds

// Terminal.svelte
const TOOLS_DEFAULT = [{
	tool: "samtools",
	version: "1.10",
	urlPrefix: "http://localhost:12346/biowasm/tools/samtools/build/"
}];

Local aioli builds

// cli.js
_aioli = await new Aioli(config.tools, {
	env: window.location.hostname == "localhost" ? "stg" : "prd",
	debug: window.location.hostname == "localhost",
	urlAioli: "http://localhost:12346/aioli/dist/aioli.worker.js"
});

Example Quiz

<script>
import Quiz from "components/Quiz.svelte";
import Choice from "components/QuizChoice.svelte";
</script>

<!-- The "id" is used to maintain state on page refresh. It just has to be unique within a step in a tutorial -->
<Quiz id="q1" choices={[
	{ valid: true, value: "Shell"},
	{ valid: false, value: "Terminal"},
]}>
	<span slot="prompt">
		Is Bash a shell or a terminal?
	</span>
</Quiz>

<Quiz id="q2" choices={[
	{ valid: true, value: "ls -s -h Data"},
	{ valid: true, value: "ls -sh Data"},
	{ valid: false, value: "ls -size -h Data"},
	{ valid: true, value: "ls --size -h Data"},
	{ valid: false, value: "ls --sizeh Data"},
	{ valid: false, value: "ls --size-h Data"},
	{ valid: true, value: "ls -h -s Data"},
	{ valid: true, value: "ls -hs Data"},
	{ valid: false, value: "ls -hsize Data"},
]}>
	<span slot="prompt">
		Among the following commands, which ones are correct?
	</span>
</Quiz>

<Quiz id="q3" choices={[
	{ valid: true, value: "yes"},
	{ valid: false, value: "no"},
]}>
	<span slot="prompt">
		Now, type the following command in your terminal and then press <kbd>Enter</kbd> key: `date`

		Does the terminal display the current date?
	</span>
</Quiz>

Infrastructure

Subdomains

Environment Domain Access
dev dev.sandbox.bio Only me
stg stg.sandbox.bio Testers
prd [prd.]sandbox.bio Public
Environment variable Description
SUPABASE_URL Supabase URL
SUPABASE_API_KEY Supabase database admin key

Database

Table Description Access
logs Log all calls to sandbox.bio/* RLS
pings Analytics for tutorial progress RLS
state Save environment variables and tutorial progress RLS

Append _stg to table names for dev/stg environments.

About

Interactive bioinformatics tutorials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.9%
  • Svelte 32.4%
  • Other 0.7%
0