Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 2.06 KB

CONTRIBUTING.md

File metadata and controls

37 lines (22 loc) · 2.06 KB

Qual ID - Contribution Guide

Qual ID welcomes contributions from people of all abilities. If you're new to open source software, then our issue to add data to existing categories is a great first issue.

If you're more experienced, or a newbie looking for something slightly more challenging, then our issue to add a new category is perfect.

Add Data to an Existing Category

Adding data to a category essentially involves adding new strings to the list returned by the get_values method of a given category. Values must not contain any spaces or special characters, and must be appropriate to the given category. Once you've done this, simply raise a PR and it will be reviewed.

Add a Brand New Category

Adding a new category involves adding a new class that inherits from the Category class. There are a few requirements for a successful PR:

  • Add a new category class that inherits from Category class and overrides the get_values method.
  • Add a new test class that asserts that the get_values method returns a list, and that all the values do not contain special characters or spaces.
  • Add the new category to the __category_map in the pattern class, with the name of the category as the key, and an instance of your new category class as the value.

Note

We request that for any contribution, at least 10 values are added, but of course the more the better!

There are rules in place for the code formatting. Namely, values in the list returned by get_values must not contain special characters, spaces or upper case characters. The list must also be in alphabetical order. The keys in the __category_map must also be in alphabetical order. If you see an error relating to alphabetical order, running

from <YOUR_CATEGORY_FILE> import <YOUR_CATEGORY>
print(sorted(<YOUR_CATEGORY>().get_values()))

will print the alphabetised list.

The formatting is done with black, so if you know what that means then please aim to use black to format your .py files.

Thank You

Seriously, thank you for any contribution, we really appreciate it!