From f83b830ab7666ff69b66eb829639f78e5e03879b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Del=C3=A8gue?= Date: Thu, 28 Oct 2021 15:42:35 +0200 Subject: [PATCH 1/3] :memo: Write a CONTRIBUTING file with contributing guide lines. Move the content of the README file to the CONTRIBUTING and add a description of the project inside the README. --- .gitignore | 3 -- CONTRIBUTING.md | 63 ++++++++++++++++++++++++++++++++++++ README.md | 46 ++++++++++++++++++++++++++ README.rst | 86 ------------------------------------------------- 4 files changed, 109 insertions(+), 89 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 README.md delete mode 100644 README.rst diff --git a/.gitignore b/.gitignore index 0cdfdc6f..ba6a909d 100644 --- a/.gitignore +++ b/.gitignore @@ -123,6 +123,3 @@ dmypy.json # VSCode .vscode - -# Sublime text -*.sublime-workspace \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..827d9249 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# OpenCodeBlocks - Contributing guide + +[![Pytest badge](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-tests.yml) [![Pylint badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_pylint_badge.json)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-pylint.yml) [![Unit coverage badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_unit_coverage_badge.json)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-coverage.yml) [![Integration coverage badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_integration_coverage_badge.json)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-coverage.yml) + +Whenever you encounter a :bug: **bug** or have :tada: **feature request**, +report this via [GitHub issues](https://github.com/MathisFederico/OpenCodeBlocks/issues). + +We are happy to receive contributions in the form of **pull requests** via GitHub. + +Feel free to fork the repository, implement your changes and create a merge request to the **dev** branch. + +## Getting started + +First, make sure you have `python` installed. You will need to install all the `requirements` and the `requirements-dev` using the following commands: + +* `pip install -r requirements.txt` +* `pip install -r requirements-dev.txt` + +You can run the program with `python main.py` + +Before doing your **pull request**, check using `pylint` and `pytest` that there were no code regressions. + +```bash +pylint .\opencodeblocks\ +``` + +```bash +pytest --cov=opencodeblocks --cov-report=html tests/unit +``` + +We want to keep the *Pylint* score above *9.0*. + +## Git Commit Messages + +Commits should start with a Capital letter and should be written in present tense (e.g. ``:tada: Add cool new feature`` instead of ``:tada: Added cool new feature``). +You should also start your commit message with one or two applicable emoji. This does not only look great but also makes you rethink what to add to a commit. Make many but small commits! + + + Emoji | Description +-----------------|------------- +:tada: `:tada:` | When you add a cool new feature +:bug: `:bug:` | When you fixed a bug +:fire: `:fire:` | When you removed something +:truck: `:truck:`| When you moved/renamed something +:wrench: `:wrench:` | When you improved/refactored a small piece of code +:hammer: `:hammer:` | When you improved/refactored a large piece of code +:sparkles: `:sparkles:` | When you improved code quality (pylint, PEP, ...) +:art: `:art:` | When you improved/added design assets +:rocket: `:rocket:` | When you improved performance. +:memo: `:memo:` | When you wrote documentation. +:umbrella: `:umbrella:` | When you improved coverage +:twisted_rightwards_arrows: `:twisted_rightwards_arrows:` | When you merge a branch + +This section was inspired by [This repository](https://github.com/schneegans/dynamic-badges-action). + +## Version Numbers + +Version numbers will be assigned according to the [Semantic Versioning](https://semver.org/) scheme. +This means, given a version number MAJOR.MINOR.PATCH, we will increment the: + +1. MAJOR version when we make incompatible API changes, +2. MINOR version when we add functionality in a backwards compatible manner, and +3. PATCH version when we make backwards compatible bug fixes. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..c16c9d25 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# OpenCodeBlocks + +[![Pytest badge](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-tests.yml) +[![Pylint badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_pylint_badge.json)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-pylint.yml) +[![Unit coverage badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_unit_coverage_badge.json)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-coverage.yml) +[![Integration coverage badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_integration_coverage_badge.json)](https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-coverage.yml) +[![Licence - GPLv3](https://img.shields.io/github/license/MathisFederico/Crafting?style=plastic)](https://www.gnu.org/licenses/) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) + +OpenCodeBlocks is an open-source tool for modular visual programing in python. + +## Features + +* Put your python code in small independent blocks +* Export and Import your blocks and share them with other people +* Chain your blocks to perform complex functions. + +## Installation + +Make sure you have Python 3 installed. You can download it from [here](https://www.python.org/downloads/) + +Clone the current repo: + +```bash +git clone https://github.com/MathisFederico/OpenCodeBlocks/ +``` + +Install the dependencies + +```bash +pip install -r requirements.txt +``` + +Run ! + +```bash +python ./main.py +``` + +## Contributing + +If you are interested in contributing to the project, see [CONTRIBUTING.md](CONTRIBUTING.md). + +## License + +See [LICENSE.md](LICENSE.md) \ No newline at end of file diff --git a/README.rst b/README.rst deleted file mode 100644 index 2313e172..00000000 --- a/README.rst +++ /dev/null @@ -1,86 +0,0 @@ -OpenCodeBlocks - An open-source tool for modular visual programing in python -============================================================================ - -.. image:: https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-tests.yml/badge.svg?branch=master - :alt: Pytest badge - :target: https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-tests.yml - - -.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_pylint_badge.json - :alt: Pylint badge - :target: https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-pylint.yml - - -.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_unit_coverage_badge.json - :alt: Unit coverage badge - :target: https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-coverage.yml - - -.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fopencodeblocks_integration_coverage_badge.json - :alt: Integration coverage badge - :target: https://github.com/MathisFederico/OpenCodeBlocks/actions/workflows/python-coverage.yml - - -.. image:: https://img.shields.io/github/license/MathisFederico/Crafting?style=plastic - :alt: Licence - GPLv3 - :target: https://www.gnu.org/licenses/ - - -Contributing to OpenCodeBlocks ------------------------------- - -Whenever you encounter a :bug: **bug** or have :tada: **feature request**, -report this via `Github issues `_. - -We are happy to receive contributions in the form of **pull requests** via Github. -Feel free to fork the repository, implement your changes and create a merge request to the **dev** branch. - -Git Commit Messages -~~~~~~~~~~~~~~~~~~~ - -Commits should start with a Capital letter and should be written in present tense (e.g. ``:tada: Add cool new feature`` instead of ``:tada: Added cool new feature``). -You should also start your commit message with one or two applicable emoji. This does not only look great but also makes you rethink what to add to a commit. Make many but small commits! - - -.. list-table:: Title - :header-rows: 1 - - * - Emoji - - Description - * - `:tada:` ``:tada:`` - - When you added a cool new feature - * - `:bug:` ``:bug:`` - - When you refactored / When you fixed a bug - * - `:fire:` ``:fire:`` - - When you removed something. - * - `:truck:` ``:truck:`` - - When you moved / renamed something. - * - `:wrench:` ``:wrench:`` - - When you refactored / improved a small piece of code. - * - `:hammer:` ``:hammer:`` - - When you refactored / improved large parts of the code. - * - `:sparkles:` ``:sparkles:`` - - When you improved code quality (pylint, PEP, ...). - * - `:art:` ``:art:`` - - When you improved / added design assets. - * - `:rocket:` ``:rocket:`` - - When you improved performance. - * - `:memo:` ``:memo:`` - - When you wrote documentation. - * - `:umbrella:` ``:umbrella:`` - - When you improve coverage. - * - `:twisted_rightwards_arrows:` ``:twisted_rightwards_arrows:`` - - When you merged a branch. - -This section was inspired by `This repository `_. - -Version Numbers ---------------- - -Version numbers will be assigned according to the `Semantic Versioning `_. scheme. -This means, given a version number MAJOR.MINOR.PATCH, we will increment the: - -1. MAJOR version when we make incompatible API changes, -2. MINOR version when we add functionality in a backwards compatible manner, and -3. PATCH version when we make backwards compatible bug fixes. - From 40ea6b725103f9b877e3549be925736b529a5df0 Mon Sep 17 00:00:00 2001 From: vanyle Date: Thu, 28 Oct 2021 15:51:35 +0200 Subject: [PATCH 2/3] :truck: Revert changes to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index ba6a909d..3f51e187 100644 --- a/.gitignore +++ b/.gitignore @@ -123,3 +123,6 @@ dmypy.json # VSCode .vscode + +# Sublime text +*.sublime-workspace From 59ff71c15bd5a17c521b45b745a4ca10dac00f3d Mon Sep 17 00:00:00 2001 From: vanyle Date: Thu, 28 Oct 2021 16:14:03 +0200 Subject: [PATCH 3/3] :memo: Fix broken link in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c16c9d25..39d9539e 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,4 @@ If you are interested in contributing to the project, see [CONTRIBUTING.md](CONT ## License -See [LICENSE.md](LICENSE.md) \ No newline at end of file +See [LICENSE](LICENSE)