Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b920cef
:memo: Improved installation section in README.md
MathisFederico Jan 7, 2022
342b0e5
:beetle: :memo: Fix pytest & codacy badges
MathisFederico Jan 7, 2022
38c94ed
:memo: Fix codacy-coverage badge
MathisFederico Jan 7, 2022
5fec069
:sparkles: Apply remarklint to markdown files
MathisFederico Jan 7, 2022
f7e0920
:fire: Remove QtPy dependency
MathisFederico Jan 7, 2022
0367f73
:beetle: Fix asyncio warning on tests
MathisFederico Jan 7, 2022
cc134ff
:fire: Remove OCB prefix everywhere
MathisFederico Jan 7, 2022
d0ce18f
:sparkles: Fix docstring regularity
MathisFederico Jan 7, 2022
c02acb4
:fire: Remove useless event_loop_policy change
MathisFederico Jan 7, 2022
c6b9167
:sparkles: Regularize tests docstrings
MathisFederico Jan 7, 2022
8829a0a
:sparkles: Fix import-outside-toplevel in containerblock
MathisFederico Jan 7, 2022
5099948
:sparkles: Fix missing usage of .items()
MathisFederico Jan 7, 2022
f436390
:sparkles: Fix wrong way of checking empty list
MathisFederico Jan 7, 2022
6817781
:sparkles: Disable pylint false-positiv for unsubscriptable-object
MathisFederico Jan 7, 2022
bac683f
:sparkles: Add PyQt5 to pylint extension-pkg-whitelist for member che…
MathisFederico Jan 7, 2022
aa8944e
:memo: Bump version & copyright year
MathisFederico Jan 7, 2022
b811382
:wrench: Refactor tests/integration/utils.py
MathisFederico Jan 7, 2022
e6e805a
:beetle: Fix CodeBlocks tests name conflict
MathisFederico Jan 7, 2022
ca555bc
:fire: :hammer: Refactor "run_color" to remove paint duplication
MathisFederico Jan 7, 2022
3621a67
:fire: Remove unused imports
MathisFederico Jan 7, 2022
b0e9c72
:sparkles: Add tests to pylint blacklist
MathisFederico Jan 7, 2022
6017b3a
:wrench: Fix len usage for empty list checking
MathisFederico Jan 7, 2022
c9a4929
:sparkles: Disable pylint bad-continuation
MathisFederico Jan 7, 2022
2df7ba2
:memo: Update file headers with startup name
MathisFederico Jan 7, 2022
09f94b7
:truck: Moved theme for package inclusion
MathisFederico Jan 7, 2022
d29043d
:fire: Remove file headers in workflows
MathisFederico Jan 7, 2022
e8dbd2c
:tada: Add dynamic version in application name
MathisFederico Jan 7, 2022
5c04e67
:memo: Update README.md
MathisFederico Jan 7, 2022
c61c393
:tada: Add setup.py for setuptools package building
MathisFederico Jan 7, 2022
683102e
:truck: Move blockfiles for portability
MathisFederico Jan 7, 2022
83d2902
:beetle: Fix custom qss not loading
MathisFederico Jan 7, 2022
39d2e83
:tada: Add pypi workflow
MathisFederico Jan 7, 2022
b130f33
:sparkles: Fix codacy issues
MathisFederico Jan 7, 2022
1153990
:beetle: Fix slider crashing the program.
vanyle Jan 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PyPi

on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
3 changes: 0 additions & 3 deletions .github/workflows/python-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# 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

on: ["push"]
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python-pylint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>

name: Pylint

on: ["push"]
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>

name: Pytest

on: ["push"]
Expand Down
10 changes: 6 additions & 4 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
extension-pkg-whitelist=PyQt5,

# Specify a score threshold to be exceeded before program exits with error.
fail-under=10.0

# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
ignore=CVS,
tests

# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=test_*
ignore-patterns=

# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
Expand Down Expand Up @@ -60,7 +61,8 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=inconsistent-return-statements,
disable=bad-continuation,
inconsistent-return-statements,
unidiomatic-typecheck,
attribute-defined-outside-init,
pointless-statement,
Expand Down
42 changes: 21 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Feel free to fork the repository, implement your changes and create a merge requ

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`
- `pip install -r requirements.txt`
- `pip install -r requirements-dev.txt`

You can run the program with `python main.py`

Expand All @@ -34,29 +34,29 @@ black .
pytest --cov=pyflow --cov-report=html tests/unit
```

We want to keep the *Pylint* score above *9.0*.
We want to keep the _Pylint_ score above _9.0_.

The comments and docstrings should preferably follow [these](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) guidelines.

## 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``).
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).

Expand All @@ -70,6 +70,6 @@ create a new block type.
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.
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.
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include pyflow/themes/*
include pyflow/blocks/blockfiles/*
include pyflow/qss/*
include PYPI_README.md
include VERSION
include requirements.txt
40 changes: 18 additions & 22 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/Bycelium/PyFlow/actions/workflows/python-tests.yml/badge.svg?branch=master)](https://github.com/Bycelium/PyFlow/actions/workflows/python-tests.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9874915d70e440418447f371c4bd5061)](https://www.codacy.com/gh/Bycelium/PyFlow/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Bycelium/PyFlow&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/Bycelium/PyFlow/actions/workflows/python-pylint.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/9874915d70e440418447f371c4bd5061)](https://www.codacy.com/gh/Bycelium/PyFlow/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Bycelium/PyFlow&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/Bycelium/PyFlow/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/Bycelium/PyFlow/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 All @@ -21,47 +21,43 @@ Join our [Discord](https://discord.gg/xZq8Tp4srd) to beta-test features, share y

## Features

- Create blocks of code in which you can edit and run Python code
- Create blocks of code in which you can edit and run Python code

<p align="center">
<img src="media/block_example.gif" width="400"/>
<img src="media/block_example.gif" alt="" width="400"/>
</p>

- Move and resize blocks on an infinite 2D plane
- Move and resize blocks on an infinite 2D plane

<p align="center">
<img src="media/resize_example.gif" width="400"/>
<img src="media/resize_example.gif" alt="" width="400"/>
</p>

- Link blocks to highlight dependencies, Pyflow will then automatically run your blocks in the correct order
- Link blocks to highlight dependencies, Pyflow will then automatically run your blocks in the correct order

<p align="center">
<img src="media/flow_example.gif" width="400"/>
<img src="media/flow_example.gif" alt="" width="400"/>
</p>

- Convert your Jupyter notebooks to Pyflow graphs and vice versa
- Convert your Jupyter notebooks to Pyflow graphs and vice versa

<p align="center">
<img src="media/notebook_example.gif" width="400"/>
<img src="media/notebook_example.gif" alt="" width="400"/>
</p>

## Installation

Make sure you have Python 3 installed. You can download it from [here](https://www.python.org/downloads/)

Clone the current repo:
### Install PyFlow

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

Install the dependencies
Using pip:

```bash
pip install -r requirements.txt
pip install byc-pyflow
```

Run !
### Run PyFlow

```bash
python -m pyflow
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0-beta
4 changes: 2 additions & 2 deletions coverage_score.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pyflow an open-source tool for modular visual programing in python
# Copyright (C) 2021 Mathïs FEDERICO <https://www.gnu.org/licenses/>
# Copyright (C) 2021-2022 Bycelium <https://www.gnu.org/licenses/>

""" Module to get coverage score. """
""" Module to get coverage score."""

import sys
from xml.dom import minidom
Expand Down
Loading