|  | 
|  | 1 | +# Contributing | 
|  | 2 | + | 
|  | 3 | +🎉 Thank you for your interest in contributing to this project! 🎉 | 
|  | 4 | + | 
|  | 5 | +A couple of quick items: | 
|  | 6 | + | 
|  | 7 | +1. To avoid duplicate issues and PRs, [please search open issue and pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests) before submitting a new one. | 
|  | 8 | +1. The general expectation is to [submit a GitHub issue](https://help.github.com/en/github/managing-your-work-on-github/creating-an-issue) to receive feedback before submitting a pull request (PR) with changes. | 
|  | 9 | +    * _This will help ensure ideas align with the project scope._ | 
|  | 10 | +1. Unit tests should accompany [Pull Requests (PRs)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) **whenever possible**. :point_left: | 
|  | 11 | +    * This could mean adding additional tests to an existing unit test file or creating a new one. | 
|  | 12 | + | 
|  | 13 | +## Ways to Contribute | 
|  | 14 | + | 
|  | 15 | +(in no particular order) | 
|  | 16 | + | 
|  | 17 | +* Code | 
|  | 18 | +* Documentation | 
|  | 19 | +* Expanding Unit Test coverage (where needed) | 
|  | 20 | +* Helping others (ex: with [issue tickets](https://github.com/hellt/markdown-footnote-sorter/issues)) | 
|  | 21 | + | 
|  | 22 | +## Testing Framework | 
|  | 23 | + | 
|  | 24 | +For minimal dependencies, the "batteries included" [Python `unittest` framework](https://docs.python.org/3/library/unittest.html) is utilized. (Other testing frameworks could be considered should additional testing features be needed.) | 
|  | 25 | + | 
|  | 26 | +## Development Process | 
|  | 27 | +> | 
|  | 28 | +> This section consists of suggestions. | 
|  | 29 | +
 | 
|  | 30 | +It is recommended to verify tests are successful before making any code changes. From there make your changes and run the unit tests to validate there is not code regression. | 
|  | 31 | + | 
|  | 32 | +* [Create a fork of this project](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) | 
|  | 33 | +  * If you have an existing fork of this project be sure [to synchronize it](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)! | 
|  | 34 | +* From the `main` branch of your fork, [create a feature branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository) | 
|  | 35 | +* Validate [test cases run successfully](#running-unit-tests) before any changes are made | 
|  | 36 | +* Make modifications | 
|  | 37 | +* Re-test with the existing unit tests against the modified codebase | 
|  | 38 | +* Add any additional unit tests to improve testing coverage | 
|  | 39 | +* Re-run the unit tests to confirm they run successfully | 
|  | 40 | +* When you are satisfied with the changes and it is ready for review, [submit a Pull Request (PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) | 
|  | 41 | + | 
|  | 42 | +## Running Unit Tests | 
|  | 43 | + | 
|  | 44 | +Choose one of the below testing commands methods that suits your needs. | 
|  | 45 | + | 
|  | 46 | +> [!IMPORTANT] | 
|  | 47 | +> The commands below are to be run from the top level of the project. | 
|  | 48 | +
 | 
|  | 49 | +1. Discover and run unit tests | 
|  | 50 | +    * `python -m unittest discover` | 
|  | 51 | + | 
|  | 52 | +1. Verbose version of unit test discovery | 
|  | 53 | +    * `python -m unittest discover -v` | 
|  | 54 | + | 
|  | 55 | +1. Discover unit tests in specific directory (in this case, `tests`) with verbosity | 
|  | 56 | +    * `python -m unittest discover -s tests -v` | 
|  | 57 | + | 
|  | 58 | +💡 For additional `unittest` command line options, refer to the [official Python unittest documentation](https://docs.python.org/3/library/unittest.html#command-line-interface). | 
0 commit comments