Skip to content

Commit

Permalink
Merge pull request #133 from Bycelium/cleanup
Browse files Browse the repository at this point in the history
Huge refactor before release
  • Loading branch information
MathisFederico authored Jan 5, 2022
2 parents df179d0 + 7ea1b02 commit 8fe44f6
Show file tree
Hide file tree
Showing 75 changed files with 221 additions and 552 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codacy-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Build unit + integration coverage using pytest-cov
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1080x24 -ac +extension GLX
pytest -s --cov=opencodeblocks --cov-report=xml:coverage.xml tests
pytest -s --cov=pyflow --cov-report=xml:coverage.xml tests
env:
DISPLAY: :99
- name: Run codacy-coverage-reporter
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/python-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenCodeBlock an open-source tool for modular visual programing in python
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>

name: Python coverage
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Build unit coverage using pytest-cov
run: |
pytest --cov=opencodeblocks --cov-report=xml tests/unit
pytest --cov=pyflow --cov-report=xml tests/unit
score=$(python coverage_score.py --score)
color=$(python coverage_score.py --color)
echo "COVERAGE_UNIT_SCORE=$score"
Expand All @@ -40,7 +40,7 @@ jobs:
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 00ce73155619a4544884ca6d251954b3
filename: opencodeblocks_unit_coverage_badge.json
filename: pyflow_unit_coverage_badge.json
label: Unit coverage
message: ${{ env.COVERAGE_UNIT_SCORE }}
color: ${{ env.COVERAGE_UNIT_COLOR }}
Expand All @@ -49,7 +49,7 @@ jobs:
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1080x24 -ac +extension GLX
pytest -s --cov=opencodeblocks --cov-report=xml tests/integration
pytest -s --cov=pyflow --cov-report=xml tests/integration
score=$(python coverage_score.py --score)
color=$(python coverage_score.py --color)
echo "COVERAGE_INTEGRATION_SCORE=$score"
Expand All @@ -64,7 +64,7 @@ jobs:
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 00ce73155619a4544884ca6d251954b3
filename: opencodeblocks_integration_coverage_badge.json
filename: pyflow_integration_coverage_badge.json
label: Integration coverage
message: ${{ env.COVERAGE_INTEGRATION_SCORE }}
color: ${{ env.COVERAGE_INTEGRATION_COLOR }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-pylint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenCodeBlock an open-source tool for modular visual programing in python
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>

name: Pylint
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 00ce73155619a4544884ca6d251954b3
filename: opencodeblocks_pylint_badge.json
filename: pyflow_pylint_badge.json
label: Pylint
message: ${{ env.PYLINT_SCORE }}
color: ${{ env.PYLINT_COLOR }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenCodeBlock an open-source tool for modular visual programing in python
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>

name: Pytest
Expand Down
36 changes: 18 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PyFlow - Contributing guide

[![Pytest badge](https://github.com/Bycelium/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)
[![Pytest badge](https://github.com/Bycelium/Pyflow/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/MathisFederico/Pyflow/actions/workflows/python-tests.yml) [![Pylint badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fpyflow_pylint_badge.json)](https://github.com/MathisFederico/Pyflow/actions/workflows/python-pylint.yml) [![Unit coverage badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fpyflow_unit_coverage_badge.json)](https://github.com/MathisFederico/Pyflow/actions/workflows/python-coverage.yml) [![Integration coverage badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FMathisFederico%2F00ce73155619a4544884ca6d251954b3%2Fraw%2Fpyflow_integration_coverage_badge.json)](https://github.com/MathisFederico/Pyflow/actions/workflows/python-coverage.yml)

Whenever you encounter a :beetle: **bug** or have :tada: **feature request**,
report this via [GitHub issues](https://github.com/Bycelium/PyFlow/issues).
Expand All @@ -21,7 +21,7 @@ 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\
pylint .\pyflow\
```

Some `pylint` issues can be fixed automatically using `black`, with the following command:
Expand All @@ -31,7 +31,7 @@ black .
```

```bash
pytest --cov=opencodeblocks --cov-report=html tests/unit
pytest --cov=pyflow --cov-report=html tests/unit
```

We want to keep the *Pylint* score above *9.0*.
Expand All @@ -43,26 +43,26 @@ The comments and docstrings should preferably follow [these](https://google.gith
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
:beetle: `:beetle:` | 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
| Emoji | Description |
| --------------------------------------------------------- | -------------------------------------------------- |
| :tada: `:tada:` | When you add a cool new feature |
| :beetle: `:beetle:` | 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).

## Creating a new block type

You can checkout [this commit](https://github.com/MathisFederico/OpenCodeBlocks/commits/2305e3c92d88d2fd32644e7eab4c4e40246675d3) which contains the minimal amount of code required to
You can checkout [this commit](https://github.com/Bycelium/Pyflow/commits/2305e3c92d88d2fd32644e7eab4c4e40246675d3) which contains the minimal amount of code required to
create a new block type.

## Version Numbers
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PyFlow

[![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)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ddd03302fd7c4849b452959753bc0939)](https://www.codacy.com/gh/MathisFederico/OpenCodeBlocks/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=MathisFederico/OpenCodeBlocks&amp;utm_campaign=Badge_Grade)
[![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)
[![Total coverage Codacy Badge](https://app.codacy.com/project/badge/Coverage/ddd03302fd7c4849b452959753bc0939)](https://www.codacy.com/gh/MathisFederico/OpenCodeBlocks/dashboard?utm_source=github.com&utm_medium=referral&utm_content=MathisFederico/OpenCodeBlocks&utm_campaign=Badge_Coverage)
[![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)
[![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)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ddd03302fd7c4849b452959753bc0939)](https://www.codacy.com/gh/MathisFederico/opencodeblocks/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=MathisFederico/opencodeblocks&amp;utm_campaign=Badge_Grade)
[![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)
[![Total coverage Codacy Badge](https://app.codacy.com/project/badge/Coverage/ddd03302fd7c4849b452959753bc0939)](https://www.codacy.com/gh/MathisFederico/opencodeblocks/dashboard?utm_source=github.com&utm_medium=referral&utm_content=MathisFederico/opencodeblocks&utm_campaign=Badge_Coverage)
[![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)

Expand Down Expand Up @@ -52,7 +52,7 @@ Make sure you have Python 3 installed. You can download it from [here](https://w
Clone the current repo:

```bash
git clone https://github.com/MathisFederico/OpenCodeBlocks/
git clone https://github.com/MathisFederico/Pyflow/
```

Install the dependencies
Expand All @@ -64,7 +64,7 @@ pip install -r requirements.txt
Run !

```bash
python -m opencodeblocks
python -m pyflow
```

## Contributing
Expand Down
18 changes: 0 additions & 18 deletions blocks/cnn_model.ocbb

This file was deleted.

16 changes: 0 additions & 16 deletions blocks/container.ocbb

This file was deleted.

16 changes: 0 additions & 16 deletions blocks/drawing.ocbb

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/empty.ocbb → blocks/empty.pfb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "Empty",
"title": "Code",
"block_type": "OCBCodeBlock",
"source": "",
"stdout": "",
Expand Down
18 changes: 0 additions & 18 deletions blocks/import_ml.ocbb

This file was deleted.

File renamed without changes.
16 changes: 0 additions & 16 deletions blocks/slider.ocbb

This file was deleted.

2 changes: 1 addition & 1 deletion coverage_score.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenCodeBlock an open-source tool for modular visual programing in python
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>

""" Module to get coverage score. """
Expand Down
Binary file added media/placeholder_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions opencodeblocks/__init__.py

This file was deleted.

10 changes: 0 additions & 10 deletions opencodeblocks/blocks/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions opencodeblocks/blocks/widgets/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions opencodeblocks/core/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions opencodeblocks/graphics/__init__.py

This file was deleted.

Loading

0 comments on commit 8fe44f6

Please sign in to comment.