This is the project for the CodeNewbie Python Thursday group. You can join the group on Slack. To get started, read the following, and if you get stuck, reach out to Phillip (github: @phillipgray, slack: @phillipg) the host.
To start out, we are building a command line game to help us develop our Python skills (and review OOP principles). We meet weekly on Slack in the "python-thursday" channel on Thursday at 9PM EST, so mark your calendars and stop by! There, we'll review the project, look at code together, and share what we learned.
In particular, we hope to:
- collaborate and learn together
- turn feature requirements into actual product features!
- get code reviewed by community members
- get experience working on a real app in a collaborative, real-world setting
You'll need to have installed Python 3 to begin. The TL;DR instructions: head to python.org, download and install the latest 3.x.x version for your operating system. For more detailed instructions, links are provided below.
Note: For Windows users, there is the extra step of setting your PATH variable. You can either do it from the GUI interface of the Windows installer from Python.org (recommended!), or using the command line (instructions).
You'll also need a Github account and some knowledge of git. If you're not comfortable using git, that's perfectly fine! Start by looking at the following resources:
-
Github For Beginners: Don't Get Scared, Get Started An incredibly newbie-friendly introduction to the world of git and Github. Written by a non-developer, it's a great introduction to many of the common terms and concepts.
-
Github For Beginners: Commit, Push and Go Part two of the above article, this post takes you through setting up a git repo and performing common commands in your repo. Open up your terminal and follow along to get the most out of this post.
-
Try Git This course from Code School lets you try git from the browser. It's an easy way to practice the commands you'll use for the Python Thursday project.
-
Feature Branch Workflow We'll be using the Feature Branch Workflow for these projects. This is a great blog post filled with awesome diagrams that show you how it works. Once you've familiarized yourself with git and Github, read through this to see how we'll use it in this collaborative setting.
-
Have more git questions? If you've gone through the material above and want to walk through git concepts with a real person, send us a note hello@codenewbie.org and we'd be happy to setup some time to do it together.
You're welcome to start contributing at any level, but it's helpful to have some knowledge of Python. To get you started, go through one of the following tutorials first.
-
Python 3 Cheat Sheet If you're coming from another programming language, or you're pretty solid with Python 2, this single page has syntax examples to get you up and running fast in Python 3.
-
Test Driven Development with Python... Also referred to as "The Goat Book"
Once you're done, come back and get your code on!
There's a big gap between the knowledge you gain when you go through the tutorials, and the skills you need to be job ready. We hope to help fill that gap by working on collaborative projects like this. So if you're tired of doing tutorials and you're looking for some real-world experience, this is for you.
To play the game, be sure you've cloned the directory to your local machine. Then, run the following:
python game.py
Or, if you have both Python 2 and Python 3 installed:
python3 game.py
Type h
for a list of commands and have fun!
Tests are found in the /tests directory
/tests
|- unit_tests.py
|- helpers.py
/functional
|- functional_tests.py
This project is using py.test [Docs] to run tests.
To install py.test and any other requirements that this game may have, you can use the following:
pip install -r /path/to/requirements.txt
There is a little setup to do the first time per this good practices doc. To avoid the init.py files in test directories, run the following to prep your project for testing:
pip install -e .
Unit tests are in the tests/ folder, run them with:
py.test tests/
Functional tests are in the functional/ folder, run them with:
py.test functional/
If you have performed the test setup above and get a bad number error, try clearing your .pyc files and re-running tests.
We use pull requests so you can get your code reviewed by others before merging it into the project. Code reviews are a great way to learn and collaborate. Here's how the process works:
- Join our Slack community and tell your host @phillipg you want to join the project repo
- The host will invite you to join as a collaborator. You MUST be a collaborator to join the project and pick up features.
- Accept invite from Github to join as a collaborator.
- Look through the issues list and pick a feature you want to work on.
- Assign that feature to yourself.
- Clone this repo.
- Make a feature branch for the issue you're working on. The first part of the branch name should be your initials, like this:
sy-allows-users-to-update-avatar
- Push your branch to origin.
- When your feature is done and ready to be reviewed, make pull request.
- Copy and paste your pull request link to the #python-thursday Slack channel for review.
- Once you get some feedback on your pull request and a final thumbs up from a community member, merge to master & close the branch.
Join us at 9PM EST on Thursday to review code and talk about the project. Come with questions, code to show, and be ready to share what you're learning!
The purpose of this project is to learn by working on a real-world application. Use the code reviews as a place to ask questions, offer suggestions, and share your thoughts. When giving feedback, particularly on code reviews, please remember our community rules: be nice, be honest, be supportive. We're all learning, so let's make sure to be kind to one another.
For more details, see our full Code of Conduct. We're excited to learn with you :)