Skip to content

Commit 3725a59

Browse files
README rework (#30)
Also adds information about setting up a dev environment
1 parent 5c999d1 commit 3725a59

3 files changed

Lines changed: 92 additions & 5 deletions

File tree

README.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
# Tin: Turn-In
2-
3-
The ultimate grader solution for TJHSST Aritifical Intelligence classes.
1+
<p align="center">
2+
<img src="./assets/tin-logo.gif" width="500">
3+
</p>
4+
<br>
5+
<br>
6+
<p align="center">
7+
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"></a>
8+
<img src="https://github.com/tjcsl/tin/actions/workflows/ci.yml/badge.svg">
9+
<a href="https://github.com/pre-commit/pre-commit"><img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit"></a>
10+
<br>
11+
<br>
12+
<i>An autograder for Computer Science Classes</i>
13+
</p>
14+
<hr>
415

516
## History
6-
Previously, teachers in TJHSST AI classes had to manually run student code.
17+
Previously, teachers in TJHSST CS classes had to manually run student code. As you can imagine,
18+
this was both time consuming, and dangerous. In order to solve this problem, Tin was invented
19+
to safely run student code submissions.
720

821
## Architecture
922
Tin is a Django application backed by PostgreSQL and SQLite. We use Celery (with a RabbitMQ broker) to process tasks.
@@ -13,8 +26,37 @@ Tin is a Django application backed by PostgreSQL and SQLite. We use Celery (with
1326
* Uploads for teacher's grader scripts
1427
* Customized containers for grader scripts
1528

16-
## Data Backup
29+
## Developing
30+
To work on Tin, you'll need the following:
31+
* `pipenv`
32+
* `git`
33+
* A Github account
34+
35+
First, [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository) Tin.
36+
Then you can clone Tin onto your local computer with
37+
```bash
38+
git clone https://github.com/your_github_username/tin
39+
```
40+
After that, install dependencies:
41+
```bash
42+
pipenv install --dev
43+
```
1744

45+
And finally, apply the database migrations and create some users.
46+
47+
Note: if you're on Windows, replace `python3` with `python` in the commands below
48+
```bash
49+
python3 manage.py migrate
50+
python3 create_debug_users.py
51+
```
52+
Now you can run the Tin development server!
53+
```bash
54+
python3 manage.py runserver
55+
```
56+
Head over to [http://127.0.0.1:8000](http://127.0.0.1:8000), and
57+
login with the username `admin` and the password you just entered.
58+
59+
## Data Backup
1860
```bash
1961
python manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e admin -e auth.Permission > export_YYYY_MM_DD.json
2062
# copy to local machine

assets/logo.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
from __future__ import annotations
2+
3+
import sys
4+
5+
try:
6+
from manim import *
7+
from manim.utils.color.BS381 import BEIGE
8+
except ImportError:
9+
print("Seems you don't have Manim installed...")
10+
print("You can install it by following the instructions at")
11+
print("https://docs.manim.community/en/stable/installation.html")
12+
exit(1)
13+
14+
15+
class Logo(Scene):
16+
def construct(self):
17+
name = Tex("TJ CSL").scale(1.5)
18+
full = Tex("Turn-In").scale(3)
19+
VGroup(name, full).arrange(DOWN)
20+
21+
subtext = Text("TJHSST's Code Autograder", color=BEIGE).next_to(full, DOWN, buff=2)
22+
23+
name.to_edge(RIGHT).shift(RIGHT*name.width)
24+
full.to_edge(LEFT).shift(LEFT*full.width)
25+
self.play(
26+
name.animate(rate_func=rate_functions.ease_out_bounce).set_x(0).set_color(GREEN),
27+
full.animate(rate_func=rate_functions.ease_out_bounce).set_x(0).set_color(BEIGE),
28+
)
29+
self.play(Create(subtext))
30+
self.wait(4)
31+
self.play(Uncreate(VGroup(name, full, subtext)), run_time=1)
32+
self.wait(.1)
33+
34+
35+
def main():
36+
args: dict[str, bool | str] = {"preview": True}
37+
DEBUG = "--final" in sys.argv
38+
if not DEBUG:
39+
args["format"] = "gif"
40+
args["transparent"] = True
41+
with tempconfig(args):
42+
Logo().render()
43+
44+
if __name__ == "__main__":
45+
main()

assets/tin-logo.gif

4.27 MB
Loading

0 commit comments

Comments
 (0)