Git Product home page Git Product logo

edu's Issues

Minor conflict in file naming conventions/ file names in " edu/series/102/50_real_parser.md" tutorial

Need clarification on few things before executing npm test command:

  1. When creating a basic package, I didn't get a default src folder inside my package directory. Is it same as lib folder where <module-name.js> resides?
  2. I have a directory called 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?
  3. It would be good to mentions the location inside the package directory where npm test command should be run after the steps in the tutorial.
  4. When I created package and followed the tutorial as it is along with the code: I get error as below:
$ 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 ?

Mandatory edu guide requirements

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

Different levels of the BioJS tutorials

(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).

overview of all tools

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).

coding standard gold

npm run browser-build
npm test
inline doc -> README.md
tests
compatibility
jsdoc3
snippets

No index.js file inside lib folder of newly created biojs package

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.

Highlight links in the navigation side bar more prominently

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;

use nvm in tutorials instead of requiring `sudo`

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.

Gold Standard relying on technologies

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:

  1. Follows the coding style guide
  2. Uses a build system
  3. Implements tests
  4. Uses CI
  5. Its been linted
  6. Its well documented

Issues with advanced snipinspector d3 tutorial

I'm into javascript and my wife is a genetics phd candidate this was some fun for us on saturday afternoon. Thank you!. :)

example code fails from missing category

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. ;)

biojs-io-snipspector incorrectly parsing X chromosome

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.

image

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:

  • if the genotype is of length one
    • if its missing the character (so either _ or -), then its a missing genotype.
    • else it's hemizygous (and you're a male)

edu redesign

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"

Misleading url mentioned for testing the visualizing component

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.

Remove the demos and transfer them to snippets

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.

Getting started for the (lazy and impatient) Developer

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

Archive the snipspector tutorial

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.