Giter Club home page Giter Club logo

pyschool.github.io's Introduction

PySchool

image

Stories to learn Python stuff. Inspired by the great work made by NodeSchool.

Write New Stories

“The only way to learn a new programming language is by writing programs in it.”

Dennis Ritchie

Pyschool could always use more stories, whether as specific python features, existing libraries, programming concepts, or even programming concepts not specific to Python itself like event handling, threading and such. New stories are always welcome :)

Get Started!

Ready to write your story? Here's how to set up a story hipyschool for local development. All stories derive from the base Story library.

  1. Fork/clone/copy the hipyschool or the py101 repo on Github. Those a good examples of simple stories to begin with.
  2. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you could set up your copy for local development:

    $ mkvirtualenv my_python_story
    $ cd my_python_story/
    $ python setup.py develop
  3. Create a module for your Story. For example mystory/__init__.py. Define the name, title and adventures variables. You will have to use the gettext() function from story.translation to receive translations. More on that below.
  4. Create one or more Adventures. A story is a collection of one or more adventures
    1. Create a module for your adventure for example mystory/myfirstadventure
    2. Create the `README.rst file describing your adventure in the previous folder
    3. (Optional) Make an Spanish translation. You must name it README.es.rst
    4. In the __init__.py file define a class called Adventure, that derives from BaseAdventure.
  5. Since the gettext() function relies on PyBabel, so you will have to initialize the translation by running:

    $ make msg-init
    $ make msg-extract

    You should see several files for each language in mystory/locale/ corresponding for the usages of the gettext() function. If the command fail, try again.

  6. (Optional) Modify and add translations in the locale files and then run:

    $ make msg
  7. It is recommended to create some unit tests for checking your solutions, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 my_python_story tests
    $ python setup.py test or py.test
    $ tox

    To get flake8 and tox, just pip install them into your virtualenv.

  8. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin
  9. Publish your package in pip, so it is available publicly
  10. Let us know or submit a pull request to the Pyschool GitHub website to update our website to include your story.

License

PySchool is Copyright (c) 2015-2017 sophilabs, inc.

About

image

PySchool is maintained and funded by sophilabs, inc. The names and logos for sophilabs are trademarks of sophilabs, inc.

pyschool.github.io's People

Contributors

montogeek avatar pricco avatar rlopezcc 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.