From 1786107b8832d6d581571f35e11153bfaed539c3 Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 11:59:45 +1000 Subject: [PATCH 1/7] + Added build instructions --- .github/CONTRIBUTING.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c6f2fe9..a54f110 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,6 +5,27 @@ 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. +## Build Instructions +This project utilizes [Poetry](https://python-poetry.org/) to manage and install dependencies. You can install Poetry using [pipx](https://pipx.pypa.io/stable/) +which allows Poetry to run in an isolated environment which ensures that Poetry's own dependencies are not accidentally deleted or upgraded. pipx is the easiest +method to install Poetry, but for more advanced installation options refer to Poetry's [documentation](https://python-poetry.org/docs/). + +``` +pipx install poetry +``` + +After poetry is installed, in the project's root directory run the following the install the project's dependencies. + +``` +poetry install +``` + +That's it! you can now run thread using + +``` +poetry run python src/thread +``` + ## Pull Request Process 1. Ensure any install or build dependencies are removed before the end of the layer when doing a @@ -15,6 +36,7 @@ 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. From 550e7be3126612a3b182bc82512fc4e4b43248ff Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 14:15:25 +1000 Subject: [PATCH 2/7] + Added example class --- .github/CODESTYLE.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/CODESTYLE.md diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md new file mode 100644 index 0000000..ba730fd --- /dev/null +++ b/.github/CODESTYLE.md @@ -0,0 +1,43 @@ +# 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. + + +## General Guidelines +```python +class ExampleClass: + """ + ExampleClass + ------------ + Example class for CODESTYLE.md + """ + + _private_attribute : int # Desired type here + public_attribute : int + + def __init__( + self, + public_attribute: int + ) -> None: # note the result + """ + 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: + """ + Square roots a value + + Parameters + ---------- + :param value: value that you want squared + """ + return value**2 +``` + From d9bfba54f3b7e8a26d02877ed13026659f4cca71 Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 14:23:16 +1000 Subject: [PATCH 3/7] + Added commit message guidelines --- .github/CODESTYLE.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md index ba730fd..494b58a 100644 --- a/.github/CODESTYLE.md +++ b/.github/CODESTYLE.md @@ -4,6 +4,22 @@ remains consistent throughout all files. Please read this document in it's entir and refer to it throughout the development of your contribution. +## 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" +``` + + ## General Guidelines ```python class ExampleClass: From 750439e0e3f4e1b9f6d6a81e11a04e7d718cea16 Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 14:40:41 +1000 Subject: [PATCH 4/7] + Added guideline points --- .github/CODESTYLE.md | 49 +++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md index 494b58a..7558d8c 100644 --- a/.github/CODESTYLE.md +++ b/.github/CODESTYLE.md @@ -3,24 +3,18 @@ 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) -## 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" -``` +## 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 -## General Guidelines ```python class ExampleClass: """ @@ -28,14 +22,15 @@ class ExampleClass: ------------ Example class for CODESTYLE.md """ + # ^^^ reST Docstring Format - _private_attribute : int # Desired type here - public_attribute : int + _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 - ) -> None: # note the result + public_attribute: int # type hint for parameters + ) -> None: # the expected return value of method """ Initializes a ExampleClass @@ -48,7 +43,7 @@ class ExampleClass: def square(self, value: int) -> int: """ - Square roots a value + Example method that square roots a value Parameters ---------- @@ -57,3 +52,19 @@ class ExampleClass: 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" +``` \ No newline at end of file From c4daab2d7c8f0c409983b7cd33818dd4b7aff690 Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 14:58:56 +1000 Subject: [PATCH 5/7] + Added markdown guidelines --- .github/CODESTYLE.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md index 7558d8c..53330d8 100644 --- a/.github/CODESTYLE.md +++ b/.github/CODESTYLE.md @@ -5,6 +5,7 @@ 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 @@ -53,6 +54,7 @@ class ExampleClass: ``` + ## Commit Message Guidelines When committing, commit messages are prefixed with a `+` or `-`. Depending on the type of change made influences which prefix is used. @@ -67,4 +69,40 @@ Commit messages are also to begin with an uppercase character. Below list some e git commit -m "+ Added README.md" git commit -m "- Removed README.md" git commit -m "Moved README.md" -``` \ No newline at end of file +``` + + + +## 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 +
    +
  • Apple +
  • Orange +
  • Pineapple +
+ +[Lorem Ipsum Generator]: https://loremipsum.io/generator/ +``` From bdfa65fa4c65144c05bcb1264344955ae0c035e4 Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 17:39:01 +1000 Subject: [PATCH 6/7] + Added some whitespace --- .github/CODESTYLE.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/CODESTYLE.md b/.github/CODESTYLE.md index 53330d8..dfeb7a4 100644 --- a/.github/CODESTYLE.md +++ b/.github/CODESTYLE.md @@ -8,6 +8,7 @@ and refer to it throughout the development of your contribution. 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. @@ -104,5 +105,7 @@ anim id est laborum. found [Lorem Ipsum Generator]
  • Pineapple + + [Lorem Ipsum Generator]: https://loremipsum.io/generator/ ``` From 27446fd88a985b5ad4e935b5e5c0c05d23aab693 Mon Sep 17 00:00:00 2001 From: ShiroTohu Date: Mon, 11 Dec 2023 17:48:34 +1000 Subject: [PATCH 7/7] - Removed Build Instructions --- .github/CONTRIBUTING.md | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index a54f110..40124bd 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,26 +5,7 @@ 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. -## Build Instructions -This project utilizes [Poetry](https://python-poetry.org/) to manage and install dependencies. You can install Poetry using [pipx](https://pipx.pypa.io/stable/) -which allows Poetry to run in an isolated environment which ensures that Poetry's own dependencies are not accidentally deleted or upgraded. pipx is the easiest -method to install Poetry, but for more advanced installation options refer to Poetry's [documentation](https://python-poetry.org/docs/). -``` -pipx install poetry -``` - -After poetry is installed, in the project's root directory run the following the install the project's dependencies. - -``` -poetry install -``` - -That's it! you can now run thread using - -``` -poetry run python src/thread -``` ## Pull Request Process @@ -37,6 +18,7 @@ poetry run python src/thread 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.