diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md new file mode 100644 index 0000000..dfeb7a4 --- /dev/null +++ b/.github/CODESTYLE.md @@ -0,0 +1,111 @@ +# Code Style +The following is a general guide on how to style your work so that the project +remains consistent throughout all files. Please read this document in it's entirety +and refer to it throughout the development of your contribution. + +1. [General Guidelines](#general-guidelines) +2. [Commit Message Guidelines](#commit-message-guidelines) +3. [Markdown Guidelines](#markdown-guidelines) + + + +## General Guidelines +Listed is a example class used demonstrate general rules you should follow throughout the development of your contribution. + +- Docstrings are to follow reST (reStructuredText Docstring Format) as specified in [PEP 287](https://peps.python.org/pep-0287/) +- Private attributes are to be prefixed with an underscore +- Use of [typing](https://docs.python.org/3/library/typing.html) type hints +- All files are to use 2 space indenting + +```python +class ExampleClass: + """ + ExampleClass + ------------ + Example class for CODESTYLE.md + """ + # ^^^ reST Docstring Format + + _private_attribute : int # private attributes begin with a lowercase + public_attribute : int # type hint for integer is defined here + + def __init__( + self, + public_attribute: int # type hint for parameters + ) -> None: # the expected return value of method + """ + Initializes a ExampleClass + + Parameters + ---------- + :param public_attribute: example attribute + """ + self.public_attribute = public_attribute + self.private_attribute = square(public_attribute) + + def square(self, value: int) -> int: + """ + Example method that square roots a value + + Parameters + ---------- + :param value: value that you want squared + """ + return value**2 +``` + + + +## Commit Message Guidelines +When committing, commit messages are prefixed with a `+` or `-`. Depending on the type of change made +influences which prefix is used. + + - `+` when something is added. + - `-` when something is removed. + - none: when neither is applicable, like merge commits. + +Commit messages are also to begin with an uppercase character. Below list some example commit messages. + +``` +git commit -m "+ Added README.md" +git commit -m "- Removed README.md" +git commit -m "Moved README.md" +``` + + + +## Markdown Guidelines +Currently, documentation for this project resides in markdown files. + - Headings are to be separated with 3 lines + - Use of HTML comments is appreciated + - Use of HTML is permitted + - [reference style links](https://www.markdownguide.org/basic-syntax/#reference-style-links) are not required by are appreciated + - Exceedingly long lines are to be broken + - The indents are to be two spaces + +```markdown + +# Section +Lorem ipsum dolor sit amet, consectetur adipiscing elit, +sed do eiusmod tempor incididunt ut labore et dolore +magna aliqua. Ut enim ad minim veniam, quis nostrud +exercitation ullamco laboris nisi ut aliquip ex ea +commodo consequat. Duis aute irure dolor in +reprehenderit in voluptate velit esse cillum dolore eu +fugiat nulla pariatur. Excepteur sint occaecat cupidatat +non proident, sunt in culpa qui officia deserunt mollit +anim id est laborum. found [Lorem Ipsum Generator] + + + +# Section 2 + + + + +[Lorem Ipsum Generator]: https://loremipsum.io/generator/ +``` diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c6f2fe9..40124bd 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,6 +5,8 @@ email, or any other method with the owners of this repository before making a ch Please note we have a [code of conduct](CODE_OF_CONDUCT.md); please follow it in all your interactions with the project. + + ## Pull Request Process 1. Ensure any install or build dependencies are removed before the end of the layer when doing a @@ -15,6 +17,8 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md); please follow it in 4. You may merge the Pull Request once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. + + ## Issue Report Process 1. Go to the project's issues.