-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation website (#1128)
* docs: Update styling of logo * docs: Update home page * docs: Update Quick Start guide * docs: Add API page * docs: Update configuration page
- Loading branch information
1 parent
6e44c4d
commit f199625
Showing
11 changed files
with
353 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.wy-side-nav-search .wy-dropdown > a.icon img.logo, | ||
.wy-side-nav-search > a.icon img.logo { | ||
display: inline; | ||
margin-top: 0; | ||
width: 3em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""This file illustrates basic usage of PythonTA's code analysis. | ||
""" | ||
|
||
|
||
def add_two(x: int, y: int) -> int: | ||
"""Return the sum of x and y. | ||
PythonTA's analysis of this code will report three issues: | ||
1. A missing return statement (a logical error) | ||
2. Missing whitespace around the + (a formatting issue) | ||
3. The presence of a print call (a code style issue) | ||
""" | ||
result = x + y | ||
print(result) | ||
|
||
|
||
if __name__ == "__main__": | ||
import python_ta | ||
|
||
python_ta.check_all() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,51 @@ | ||
# Table of Contents | ||
# PythonTA | ||
|
||
Welcome! | ||
PythonTA is a free, open-source suite of educational code analysis tools aimed at novice Python programmers. | ||
It builds on top of professional tools like [pylint], [pycodestyle], and [mypy], with custom feedback messages that are designed to be accessible to beginners and customizable by educators. | ||
It also provides analysis features that occur while code is being executed, including automatic checking of type annotations and logging variable changes across loops. | ||
|
||
## Installation and getting started | ||
|
||
PythonTA is a pure Python package, and can be installed through [pip](https://pip.pypa.io/en/stable/getting-started/) by running the following command in the terminal: | ||
|
||
```console | ||
$ pip install python-ta | ||
``` | ||
|
||
Then, you can use PythonTA to analyse a Python file from the terminal: | ||
|
||
```console | ||
$ python_ta my_file.py | ||
``` | ||
|
||
or using its Python API: | ||
|
||
```python | ||
import python_ta | ||
python_ta.check_all('my_file.py') | ||
``` | ||
|
||
For a more detailed introduction to PythonTA, check out our {doc}`Quick Start Guide <usage/quick_start>`. | ||
|
||
## Acknowledgements | ||
|
||
PythonTA is maintained by [David Liu](https://www.cs.toronto.edu/~david/) at the University of Toronto, and has nearly [fifty contributors](https://github.com/pyta-uoft/pyta?tab=readme-ov-file#contributors), most of whom are undergraduate students at the University of Toronto. | ||
This project has received funding from the Faculty of Arts and Science at the University of Toronto. | ||
|
||
```{toctree} | ||
:maxdepth: 2 | ||
:caption: Contents | ||
:hidden: | ||
usage/quick_start | ||
checkers/index | ||
usage/api | ||
usage/configuration | ||
contracts/index | ||
debug/index | ||
cfg/index | ||
``` | ||
|
||
[pylint]: https://pylint.readthedocs.io/en/latest/ | ||
[pycodestyle]: https://pycodestyle.pycqa.org/en/latest/intro.html | ||
[mypy]: https://www.mypy-lang.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# API | ||
|
||
The main entrypoint for running PythonTA's code analysis is the `check_all` function. | ||
|
||
```{eval-rst} | ||
.. autofunction:: python_ta.check_all | ||
``` | ||
|
||
Notes: | ||
|
||
- For information on using the `config` argument, see {doc}`Configuration <./configuration>`. | ||
- If using the `ColorReporter`, writing to a file using the `output` argument is not recommended. | ||
This reporter uses terminal-specific characters to colourize text displayed on your screen, and these characters will look strange when opening the output file in a text editor. | ||
|
||
The `doc` function can be used to open the {doc}`PythonTA Checks webpage <../checkers/index>` to look up a specific error. | ||
|
||
```{eval-rst} | ||
.. autofunction:: python_ta.doc | ||
``` |
Oops, something went wrong.