Giter Site home page Giter Site logo

posse's Introduction

README.rst -- Tools for teaching the open source projects seminar @ RIT

This is an all-purpose repository for storing some content, but mostly tools for teaching the open source projects seminar @ RIT.

Future tools could include things like scripts to produce blog/commit/unittest statistics. This is also a place the syllabus could live, where students could fork and produce pull requests.

Setting up your environment

Before you can do anything with this (build the documentation or run any of the scripts) you'll need to setup and activate a python virtualenv. Run the following at the command prompt...

On Linux/Mac OS X

If you don't have virtualenv installed yet, try:

$ sudo easy_install virtualenv virtualenvwrapper

If you're using a distro like Fedora or Ubuntu, you should try this instead:

$ sudo yum install python-virtualenv

Once you have virtualenv installed, you should be able to run:

$ virtualenv --no-site-packages -p python2 sphinxenv
$ source sphinxenv/bin/activate
$ git clone [email protected]:YOUR_USERNAME/posse.git
$ cd posse
$ python setup.py develop

On Windows

At the windows command prompt:

$ virtualenv --no-site-packages -p python2 sphinxenv
$ sphinxenv/Scripts/activate.bat

In msysGit or git-bash:

$ git clone [email protected]:YOUR_USERNAME/posse.git

Back in the windows command prompt:

$ cd posse
$ python setup.py develop

Building the "Documentation"

The "documentation" for the course (the syllabus, all the homework assignments, notes on the lectures) are all kept in the doc/ directory of this repository. The files all end with the extension .rst which is the file extension for the reStructuredText markup language. They are all furthermore tied together the the sphinx framework for building integrated docs.

You might notice that the syllabus, et. al. is hosted on http://readthedocs.org/. The upstream github repository has a hook installed that automatically triggers a git pull at http://readthedocs.org from http://github.com. Thus, every time we change the docs here, they are automatically re-built into HTML for us and posted online. Awesome!

This however means that we should be careful before we push anything to github, or it will 'go live'. To be careful, you should rebuild the documentation locally (on your machine) to check that whatever modifications you made to the .rst files actually renders into the HTML that you want.

In order to do that, first make sure you have your virtualenv activated.

Being certain of that, in the root directory, simply run:

$ sphinx-build -b html doc html-output

The html documentation will be generated in html-output/. Check html-output/html/index.html to see if it exists.

Note

If your machine complains that 'sphinx-build' is a command that could not be found, try running "$ python setup.py develop" in the root of the posse repository first. That setup.py file contains information about all other open source projects that are required for this project, and will automatically install them from http://pypi.python.org/

Validating the data/students.yaml file

The data/students.yaml file is a structured data file that keeps track of all the students in the class and metadata about them. Using this file and the bindings in lib/posse/model/students.py we can build scripts that count how many lines of code each student modifies each week, or how many words/blogpost, or whatever we like.

The data format (YAML) can be a little prickly though. It is whitespace-sensitive, meaning that how many spaces you put before an entry on each line has an impact on how the data is interpreted. It also means that tabs and spaces are distinctly different in their meaning. It also means that editing such a file is easy to mess up.

In order to ensure that you don't introduce any unparseable errors into the file, there is a script in lib/posse/model/validate.py that reads in the file and checks each entry. You should run it after every time you edit data/students.yaml.

In order to run the validate.py script, make sure you have your virtualenv activated.

In the root of the cloned source directory, run:

$ python lib/posse/model/validate.py

posse's People

Contributors

afreshvegetable avatar amitorit avatar aubreyja avatar chips545 avatar chrishas35 avatar decause avatar dmkelly avatar dtgay avatar eric-kansas avatar jacetwice avatar kaeedo2 avatar kjbndp avatar mgage avatar mwambach avatar nmb7895 avatar philmoc avatar qalthos avatar rabenvald avatar ralphbean avatar renardchien avatar rossdylan avatar ryansb avatar tj-miller avatar tjr1351 avatar willdignazio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.