fboxwala / intro-git-py-workshop Goto Github PK
View Code? Open in Web Editor NEWA workshop introducing concepts of open source Python development with Git and Github
License: GNU General Public License v3.0
A workshop introducing concepts of open source Python development with Git and Github
License: GNU General Public License v3.0
Our core module is completely un-unit-tested! This is appalling and very non-pythonic.
Use the unittest library to create some useful unit tests for Caduceus to make the lives of future developers easier.
Currently Caduceus only reads and organizes data about snakes, from csv files of a specific format. It would be cool if we could also use Caduceus to organize data about birds.
However, bird data does not generally specify a bird's length. Much more important is a bird's wingspan.
Add a feature to caduceus to read data from two csv files with the following data:
File1: common name, scientific name
File2: scientific name, weight, wingspan
And a function to print birds by their speed. There is test data available in data/
Our core module has a mix of single and double quotes for strings. This is inconsistent! Let's use single quotes all around.
We need a function in core.py for printing snakes sorted based on their length.
This should be fairly similar to the print_snakes_by_weight function.
Our build_snakes function reads two .csv files and expects to see the following columns:
File1: common name, scientific name
File2: scientific name, weight, length
If any of these columns are missing we get messy python errors:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "caduceus/core.py", line 30, in build_snakes
snake.weight = int(row["weight"])
TypeError: int() argument must be a string or a number, not 'NoneType'
We should add error handling to build_snakes so that if a column is missing we exit with a nice error message such as:
"Caduceus expects specific columns in csv files to work. See help(build_snakes) for the specifications"
Docstrings are strings at the beginning of python functions and classes giving a small description of what the function does. You can call help(name_of_function)
to see a function's docstring.
We currently have docstrings for both the functions in core.py, but are missing docstrings in the rest of our classes and class methods.
PEP257 lays out some conventions for docstrings.
Some easy to parse examples can be found here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.