Giter Club home page Giter Club logo

pyta's Introduction

PyTA

PyTA is a Python program which uses static code analysis to help students find and fix common coding errors in introductory Python courses. Python already has great static analysis tools like pep8 and pylint, but these tools do not necessarily have the most beginner-friendly format. PyTA has two central goals:

  1. Statically identify common coding errors by using existing linting tools and building custom linters (e.g., as pylint checkers).
  2. Present beautiful, intuitive messages to students that are both helpful for fixing errors, and good preparation for the terser messages they will see in their careers.

This is a new project started in the Summer of 2016, and takes the form of a wrapper around pylint (with custom checkers) that operates directly on Python modules, as well as a website with some supplementary material going into further detail for the emitted errors.

For greater details on the errors PyTA checks for: Help Documentation.

For help getting started using PyTA: Quick Start.

Installation

If you're interested in using PyTA, you can install it using pip (or pip3, on OSX/Linux):

> pip install python-ta

Development

If you're developing PyTA:

  1. First, clone this repository.
  2. Open a terminal in this repo, and run pip install -e ".[dev, cfg, z3]" to install the dependencies.
  3. Then run pre-commit install to install the pre-commit hooks (for automatically formatting and checking your code on each commit).

While not strictly necessary for debugging, some debugging tools require graphviz to be installed on your system.

Tests

To run the test suite, run the following command from inside the pyta directory:

> python -m pytest tests  # Or python3 on OSX/Linux

Generating the docs

The PyTA documentation is generated using Sphinx. To generate the documentation locally, run the commands:

> cd docs
> make html

Then open the file docs/_build/index.html in your web browser!

Demo

You can currently see a proof of concept in this repository. Clone it, and then run python in this directory (PyTA is primarily meant to be included as a library). In the Python interpreter, try running:

>>> import python_ta
>>> python_ta.check_all('examples.forbidden_import_example')
[Some output should be shown]
>>> python_ta.doc('E9999')

Contributors

Lorena Buciu, Simon Chen, Freeman Cheng, Ivan Chepelev, Nigel Fong, Adam Gleizer, Ibrahim Hasan, Niayesh Ilkhani, Craig Katsube, Rebecca Kay, Christopher Koehler, David Kim, Simeon Krastnikov, Ryan Lee, Christopher Li, Hayley Lin, Bruce Liu, Merrick Liu, Wendy Liu, Yibing (Amy) Lu, Maria Shurui Ma, Aina Fatema Asim Merchant, Shweta Mogalapalli, Ignas Panero Armoska, Justin Park, Harshkumar Patel, Varun Sahni, Eleonora Scognamiglio, Amr Sharaf, Richard Shi, Kavin Singh, Alexey Strokach, Sophy Sun, Utku Egemen Umut, Sarah Wang, Jasmine Wu, Philippe Yu, Yi Cheng (Michael) Zhao

pyta's People

Contributors

david-yz-liu avatar nigef avatar justinpark715 avatar shweta97 avatar simeonkr avatar iskyn avatar hayleyzhl avatar jasminewwwu avatar ostrokach avatar rebeccakay avatar wchrisk avatar kavins14 avatar sushimon avatar amrrsharaff avatar ckatsube avatar dhslim avatar lorena-b avatar pre-commit-ci[bot] avatar chen-simon avatar bruce-8 avatar yibinglu avatar peelstnac avatar zhiyingsun avatar ihasan98 avatar dependabot[bot] avatar harshkpatel avatar younwoochoi avatar ainamerch avatar sarahsonder avatar vsahni3 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.