Skip to main content

counts assignment points

Project description

sum_pts

Reads text (or Jupyter Notebook) files and counts points. Points are expected in the following format:

# part 1 (3 points)

Installation

pip3 install sum-pts

Usage

Given an input text file, like ex_hw0.py:

# Part 1 (10 points)
# some text or code here

# Part 2 (14 + 2 auto pt)
# some text or code here

# part 3 (14 pt + 3 extra credit really long name pts)

Run this module from its command line interface:

python3 -m sum_pts ex_hw0.py

to generate a markdown table which sums all points in assignment:

| part   |    | auto   | extra credit really long name   |   part total |
|:-------|---:|:-------|:--------------------------------|-------------:|
| Part 1 | 10 |        |                                 |           10 |
| Part 2 | 14 | 2.0    |                                 |           16 |
| part 3 | 14 |        | 3.0                             |           17 |
| total  | 38 | 2.0    | 3.0                             |           43 |

You can write this to a markdown or csv file with the -m or -c flags (see output examples in case0).

Notes:

  • capitalization doesn't count
  • a line contains points if it matches the following regex '#.*\(.*(pts?|points?)\)'
  • the "part total" column only appears if there are multiple types of points
  • you may use +, ,, & or nothing at all to distinguish different point types within a part. (We look for strings which can be cast to numbers to split point types within part.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sum_pts-0.0.2.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

sum_pts-0.0.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page