Standing#

Get a Progress Report#

First, get your PR info:

gh pr list --state all --json title,latestReviews > badges.json

Notes:

  • --state all is important to get both open and closed PRs

  • --json is requires and title, latestReviews are the two requied attributes to that parameter, you can add additional ones though and for some features, additional ones are requires.

  • if you have more than 30 total PRs(PRs only, not issues) use the --limit/-L option with a number >= your total number of PRs.

Then use cspt progressreport to check which have been approved by a valid approver and have a badge keyword in them.

cspt progressreport badges.json

Options allow you to control the format of the report.

cspt progressreport#

list PR titles from json or - to use std in that have been approved by an official approver

gh pr list -s all –json title,latestReviews

cspt progressreport [OPTIONS] JSON_OUTPUT

Options

-f, --file-out <file_out>#

to write to a file, otherwise will use stdout

-r, --report#

process approved badges by type to a more descriptive report

-s, --soft#

soft check, skip title check

-b, --brief#

short version of report

Arguments

JSON_OUTPUT#

Required argument

Check PR Titles#

Check a single PR#

cspt titlecheck -t 'title I am thinking about'

cspt titlecheck#

check a single title

cspt titlecheck [OPTIONS]

Options

-t, --pr-title <pr_title>#

title to check as string

-g, --ghpr <ghpr>#

pass title as file, or gh pr view output through pipe

Make a list of PRs to fix#

This can check which titles will work with the grading calculation functions.

cspt prfixlist#

check json output for titles that will not be counted as a badge this will include gh pr list -s all –json title,latestReviews

cspt prfixlist [OPTIONS] JSON_OUTPUT

Arguments

JSON_OUTPUT#

Required argument

What counts?#

Under the hood, the majority of the checking is done by this function:

cspt.badges.is_title_gradeable(pr_title, errortype=False)

this defines if a pr title is good, it contains exactly one badge type word and a well date if experience, review or practice, in ISO (YYYY-MM-DD, YYYY MM DD) or M/DD/YY, MM-DD-YY or M-DD-YY

Parameters:
  • title (string) – title of pr

  • errortype (bool) – if true, return bool + message

Returns:

good – true if good

Return type:

bool

Check if Early bonus is met#

gh pr list -s all --json title,latestReviews,createdAt  | cspt earlybonus -

cspt earlybonus#

check if early bonus is met from output of gh pr list -s all –json title,latestReviews,createdAt and return a message. input from either a file or -for stdin

cspt earlybonus [OPTIONS] JSON_OUTPUT

Options

-y, --output-yaml#

output as yaml compatible with grading

Arguments

JSON_OUTPUT#

Required argument

Calculate Grade#

the following is how you can compute most of your grade.

Tip

This does not take into consideration any of the event bonuses, but you can manually add them to the badges.yml file if you think you’ll have them or want to see the impact they would have.

gh pr list -s all  -L 200 --json title,latestReviews,createdAt > badges.json
cspt badgecounts badges.json  > badges.yml
cspt earlybonus -y badges.json >> badges.yml
cspt grade badges.yml 

Note

the badges.yml file is just a file that cspt grade takes as input, you can put any file in. So, for exmaple you can compute your hypothetical grade with different numbers of badges by modifying the count in the file

Warning

Your grade is not an average it is cumulative, so the grade this shows is not the grade you will get if you keep working as you have been, but the grade you will get if you do no more work.

For more:

cspt badgecounts#

check if early bonus is met from output of gh pr list -s all –json title,latestReviews,createdAt and return a message. input from either a file or -for stdin

cspt badgecounts [OPTIONS] JSON_OUTPUT

Options

-s, --soft#

soft check, skip title check

Arguments

JSON_OUTPUT#

Required argument

cspt grade#

calculate a grade from yaml that had keys of badges/bonuses and value for counts

cspt grade [OPTIONS] BADGE_FILE

Options

-i, --influence#

return numerical instead of letter

-v, --verbose#

print out all information

Arguments

BADGE_FILE#

Required argument

Tip

copy and edit that badges.yml file to represent other scenarios and increase badge counts to see what your grade would be with more badges.