biojs / edu Goto Github PK
View Code? Open in Web Editor NEWLearn about BioJS
Home Page: http://edu.biojs.net
Learn about BioJS
Home Page: http://edu.biojs.net
Need clarification on few things before executing npm test
command:
src
folder inside my package
directory. Is it same as lib
folder where <module-name.js>
resides?unit
inside test
, so the index.js
file should be inside test
or unit
? Will the location of tests and the file name containing tests matter?npm test
command should be run after the steps in the tutorial.$ sudo npm test
> [email protected] test /Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real
> gulp
[16:48:47] Using gulpfile ~/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/gulpfile.js
[16:48:47] Starting 'lint'...
[16:48:47] Starting 'test-unit'...
[16:48:47] Starting 'clean'...
[16:48:47] Finished 'clean' after 5.64 ms
[16:48:47] Starting 'init'...
[16:48:47] Finished 'init' after 144 μs
[16:48:47] Starting 'build-test'...
[16:48:47] Starting 'build-browser'...
[16:48:47] Starting 'build-browser-min'...
[16:48:47] 'test-unit' errored after 177 ms
[16:48:47] ReferenceError in plugin 'gulp-mocha'
Message:
test is not defined
Stack:
ReferenceError: test is not defined
at Object.<anonymous> (/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/test/unit/biojsparsereal_test.js:12:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/node_modules/mocha/lib/mocha.js:172:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/node_modules/mocha/lib/mocha.js:169:14)
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 9, col 29, Strings must use singlequote.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 15, col 41, Expected '===' and instead saw '=='.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 18, col 5, Missing semicolon.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 19, col 2, Missing semicolon.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 38, col 27, Expected '===' and instead saw '=='.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 38, col 51, Strings must use singlequote.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 56, col 29, Expected '===' and instead saw '=='.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 58, col 26, Expected '===' and instead saw '=='.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 58, col 60, Strings must use singlequote.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 58, col 56, Expected '!==' and instead saw '!='.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 61, col 39, Strings must use singlequote.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 61, col 62, Strings must use singlequote.
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 21, col 29, This function has too many statements. (22)
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/index.js: line 74, col 2, Missing semicolon.
And after resolving everything and even keeping all the vars
in one place in the code, I get following message:
> [email protected] test /Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real
> gulp
[16:10:57] Using gulpfile ~/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/gulpfile.js
[16:10:57] Starting 'lint'...
[16:10:57] Starting 'test-unit'...
[16:10:57] Starting 'clean'...
[16:10:57] Finished 'clean' after 6.07 ms
[16:10:57] Starting 'init'...
[16:10:57] Finished 'init' after 274 μs
[16:10:57] Starting 'build-test'...
[16:10:57] Starting 'build-browser'...
[16:10:57] Starting 'build-browser-min'...
[16:10:58] 'test-unit' errored after 324 ms
[16:10:58] ReferenceError in plugin 'gulp-mocha'
Message:
test is not defined
Stack:
ReferenceError: test is not defined
at Object.<anonymous> (/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/test/unit/biojsparsereal_test.js:12:23)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/node_modules/mocha/lib/mocha.js:172:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/node_modules/mocha/lib/mocha.js:169:14)
/Users/user/Work/npm_biojs_practice/biojs-parse-real/biojs-parse-real/lib/biojsparsereal.js: line 16, col 29, This function has too many statements. (20)
1 error
[16:10:58] Finished 'lint' after 370 ms
[16:10:59] Finished 'build-browser-min' after 1.73 s
[16:10:59] Finished 'build-browser' after 1.75 s
[16:10:59] Finished 'build-test' after 1.91 s
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
It seems like, I placed some files in a wrong location. Could you please let me know if I am missing anything here.
And also, regarding the naming conventions, this should also be linked to issue #20 ?
like nodeschool
(from trello)
Hey guys,
I noticed that many of our students/readers have ERROR messages because of out-dated versions of npm, slush or other dependencies. Because the whole BioJS ecosystem depends on modules, we should tell our readers (at least for our internal biojs modules), which version we used to create this guide/tutorial.
I would propose to create an automatic section in each tutorial called: biojs dependencies (including version number)
Cheers,
David
(from the BioJS christmas form)
e.g. JS newbie (first time), intermediate (basic knowledge), expert (sophisticated knowledge).
I guess we could propably join newbie & intermediate and just create a quick for experts (#12).
On this page, I've seen such a notice
The BioJS 101 is still in an early version. We really appreciate any feedback.
improve this page
open an issue on github
However, improve this page
is a broken link towards https://github.com/biojs/edu/blob/gh-pages/series/101/22_headstart.md
reported by @sillitoe
There's a bunch of new terms to take it if you're completely new to the toolchain - npm, mocha, gulp, chai, biojs-sniper, etc. It probably would've been useful to have an overview at the very start of the tutorial with a couple of lines summarising what each tool does, which files they related to in the project template, where the tool fits into the tool chain and a link for further reading / API (if available).
this was reported to me. A refresh fixed the problem.
Seb: It would be great to know whether this is specific to a browser or a caching issue?
npm run browser-build
npm test
inline doc -> README.md
tests
compatibility
jsdoc3
snippets
I was following tutorial on package basics http://edu.biojs.net/series/101/30_package_basics.html#
and under step 5 i.e. Start Coding
section, I couldn't find index.js
under lib
folder of my package.
Instead it's present in initial project directory that I created.
Is this index.js
file same as <module-name.js>
file under lib
folder or index.js
in project folder?
Seems like it should be <modulename.js>
file under lib
folder under project directory.
The tutorial and the scaffolding should be consistent.
See biojs/biojs#100 for more info
Active chapter links in the navigation side bar have the same color as chapter headlines and can be overlooked now easily. Please highlight the links that are currently active more prominently. e.g. use green color to make them stand out:
color: #4ca33a;
On this page
If your machine is already set up, continue to the tutorial.
This link is invalid, and I think you mean http://edu.biojs.net/101/modularity/
It's generally considered bad practice to run node installations that require sudo - the best way is to keep npm
packages in user-space. The easiest way to do that is to install node with nvm
.
nvm
is the node version manager. Like RVM for Ruby, it lets you manage your node installation. The best thing about it in my opinion is that users can get node installed in a single command that works on OSX and linux:
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | bash
When we do workshops on our Node software for ContentMine we find nvm
makes it much easier for users. It also breaks much less than when you use platform-specific installers, and it avoids the suspicion raised when you ask people to execute arbitrary code with sudo
.
So for you guys it would look something like:
$ curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | bash # install nvm
$ nvm install 0.10.30 && nvm alias default 0.10.30 && nvm use default # install node & npm
$ npm install --global slush
No sudo
required.
Url https://biojs.net/get_involved.html/ no longer exists, gives 404. Requires update :)
Hi, I noticed that the proposed gold standard relies a lot on technologies or packages such as D3 and travis. I think a gold standards should be generic. Something like:
I'm into javascript and my wife is a genetics phd candidate this was some fun for us on saturday afternoon. Thank you!. :)
If you take the final code and try that out it fails on a missing data.category.
Thats because we never really hooked up chromosome_data
to the rest and the final code doesn't really do it either.
var chromosome_data = [{category: "del", number: 1}, {category: "hetero": ,number: 2} , {category: "homo" , number: 3}];
Maybe you left it as a bug for people trying to skip to the end, but.. maybe give them a wink because its still incomplete. ;)
Probably a bug for @biojs-edu/biojs-io-snipspector proper, but going to report it here regardless.
My wife studies the X so when I showed her https://github.com/biojs-edu/biojs-io-snipspector/blob/82ed17739eb030f44cfb1bb727b65824178b81e1/src/index.js#L56-L68 she indicated this is tossing out most of the chromosome.
Only the PAR of the X is has diploid genes, and as you can see in the diagram, that's a very small portion of the overall gene.
X definitely has the best looking d3 pie chart of the chromosomes, so i imagine that's why it was picked for the tutorial, but it turns out its probably the least accurate results from the snipinspector for all chromosomes.
her quick recommendation for addressing the incorrect parser:
_
or -
), then its a missing genotype.BioJS Edu was very useful in the beginning of BioJS 2.0. Right now, it has to be updated and rewritten. Some code examples are already out of date. How about we use docco for documented code and redesign BioJS Edu in that way, that we provide a lot of code snippets for smaller BioJS Components which are well documented. Code explains itself. It also could be used as a library/collection of documentations for all BioJS components.
I would also like to add this point to the monthly BioJS Call as "Documentation of BioJS Components"
We now use the graduate tutorial as default series for our education portal, however we still lack a nice visualization guide:
slush biojs does not create the file src/index.js stated in the page
In the beginner's tutorial there is a misleading mention of the /snippets url in the tutorial that the user shall check to implement and test their viz-component. The url doesn't reflect our current folder structure in a biojs package development and it seems to be just outdated and replaced by the /examples url instead.
Please fix all instances where a user is asked to go to the url /snippets with the actual url /examples.
The demo section is redundant to the playground which is a temporary replacement until the biojs registry supports snippets.
Maybe temporarily we could move the demos to the playground.
Software evaluation report
Criteria-based assessment and tutorial-based evaluation of BioJS to be done using the SSI software evaluation service process.
Provide information on the sustainability of BioJS and how easy it is for a new developer to get started with it.
reported by @sillitoe
Whenever I dip into JS code, the best practices seem to have changed - specifically I've seen a bunch of different ways of implementing OO code over the years and I would've been happy to be given a template showing the current recommended way of structuring packages / classes / constructors (I pieced it together by rummaging around other modules). Maybe a "simple" template and a "package" template?
I'm not a native javascript coder but I know my way around projects - as a lazy and impatient developer, I'm used to skimming docs, jumping straight in and figuring out problems as I go via Google / SO. I ended up skipping lots of details in the tutorials (that were actually important) because they seemed to be aimed at new developers.
Perhaps we could have a "Getting started for the (lazy and impatient) Developer" - more compact, less text, just a brief walkthough via CLI
The snipspector
tutorial is quite complicated to understand.
We should revert back to the original "BioJS graduates" tutorial (or create a new one) and archive the - the old materials can be found here.
Basically only Intro, Package Basics and Visualization Basics need to be changed and archived.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.