Giter Site home page Giter Site logo

ppflrs / 2014-5-metagenomics-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inodb/2014-5-metagenomics-workshop

0.0 3.0 0.0 978 KB

Metagenomics Workshop 2014-5-21 to 2014-5-23 at SciLifeLab, Stockholm

Makefile 40.27% Python 59.73%

2014-5-metagenomics-workshop's Introduction

Metagenomics Workshop SciLifeLab

This repository holds the code for the website of the metagenomics workshop held at SciLifeLab, Stockholm 21-23 May 2014. The website is written using Sphinx. The webpage can be found at:

http://inodb.github.io/2014-5-metagenomics-workshop/

and

http://2014-5-metagenomics-workshop.readthedocs.org/

How does it work?

In short, we use a python package called Sphinx to convert a bunch of text files written in reStructuredText (reST) to HTML pages. Instead of editing the HTML directly you change text files in the reST format. Those are the *.rst files in the source directory. That's all you need to know to start Contributing.

Contributing

We follow the Fork & pull model. It's not necessary to do anything on the command line. All you have to is click on fork. Then you can edit the *.rst files directly through the GitHub interface if you want. Only the Sphinx specific commands will not work, such as the table of contents command toctree. You can also add new files by clicking on the plus symbol next to a directory. After you are satisfied with you changes you click on the pull request button. Do note that changing the *.rst files does not change the actual webpage, maybe somebody else (.e.g me) can do that for you. If you want to learn how to compile the *.rst files to *.html, please read on.

Compile the reST files to HTML locally

The only thing that is a bit more tricky is actually compiling the *.rst files to *.html files. This is not necessary to contribute since you can see the results in Github (GitHub shows *.rst files as they would look like in HTML by default). If you want to compile the files locally you would do:

pip install sphinx  # install sphinx
git clone https://github.com/inodb/2014-5-metagenomics-workshop
make html

The resulting HTML pages are in the folder build/. You can open the files in your browser by typing e.g. file:///home/inodb/path/to/build/html/index.html in the address bar. If you want to make changes you should:

  1. fork this repo
  2. clone your forked repo
  3. Make the changes to the *.rst files
  4. run make html
  5. look at the results
  6. add the changes with git add files that you changed
  7. commit the changes with git commit
  8. push the changes to your own repo with git push
  9. do a pull request by clicking on the pull request button on the GitHub page of your repo

This only changes the *.rst files in the master branch, not the actual webpage, which is in the gh-pages branch. How that is set up is explained in the section.

Compile the reST files to HTML on milou

The generated docs can be found on bit.ly/metalove. The HTML files are located in /proj/g2014113/webexport/. To update those files you first clone the repository somewhere on milou. Then load the virtual environment of the workshop:

source /proj/g2014113/metagenomics/virt-env/mg-workshop/bin/activate

Then from the root dir of the repository run:

make milou

The HTML files will then be updated. Obviously you should be part of the g2014113 project.

Updating the HTML to GitHub Pages

The website is hosted on GitHub Pages. It works by having a branch called gh-pages on this repository, which has all the HTML. I used brantfaircloth's sphinx_to_github.sh script to set it up. Basically it sets up a gh-pages branch in the build/html folder of the repository, so everytime you run make html it changes the files in that branch. You then cd build/html, commit the new HTML files and push them to the gh-pages branch. After that the result can be viewed at:

http://yourusername.github.io/reponame/

I'll update the branch gh-pages myself after your pull request with the changed *.rst files on the master branch was accepted.

2014-5-metagenomics-workshop's People

Contributors

bengtssonpalme avatar inodb avatar alneberg avatar

Watchers

James Cloos avatar Pepe Flores avatar  avatar

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.