Skip to content

Commit

Permalink
Merge pull request #10 from nodedge/feature/add-blocks
Browse files Browse the repository at this point in the history
Add numpy blocks
  • Loading branch information
nodedge committed Oct 29, 2022
2 parents 3c056d4 + 2567908 commit eda6c62
Show file tree
Hide file tree
Showing 92 changed files with 3,017 additions and 176 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: nodedge # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom:
50 changes: 50 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Python test


on:
push:
branches:
- master
pull_request:
branches:
- master
types: [opened, synchronize]

jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
# platform: [ubuntu-latest, macos-latest, windows-latest]
platform: [ubuntu-latest]
python-version: [3.8, 3.9, '3.10']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
os: ${{ matrix.platform }}
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install linux dependencies
run: |
if [ "${{ matrix.platform }}" == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y libxml2-utils x11-utils xvfb herbstluftwm
sudo apt-get install -y libxkbcommon-x11-0 libxcb-icccm4 libegl1
sudo apt-get install -y libxcb-image0 libxcb-keysyms1 libxcb-randr0 x11-utils
sudo apt-get install -y libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
fi
shell: bash
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools_rust tox tox-gh-actions
- name: Tests with tox
uses: GabrielBB/xvfb-action@v1
with:
run: tox
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# PLATFORM: ${{ matrix.platform }}
31 changes: 0 additions & 31 deletions .github/workflows/pythonpublish.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ services: xvfb
language: python
branches:
only:
- master
- /^v.*$/
- no-branch
# - master
# - /^v.*$/


before_install:
Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.. image:: nodedge/resources/nodedge_logo.png
:width: 100px

Nodedge
=======

A Python3 graphic environment for next-generation engineering.

https://www.nodedge.io
Expand Down
1 change: 0 additions & 1 deletion demos/example_scipy_odeint.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pylab import *
from scipy.integrate import odeint


"""
A spring-mass system with damping
"""
Expand Down
100 changes: 88 additions & 12 deletions examples/calculator/calculator.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"id": 1583748004592,
"title": "Input",
"posX": -375.0,
"posX": -510.0,
"posY": -330.0,
"inputSockets": [],
"outputSockets": [
Expand All @@ -25,8 +25,8 @@
},
{
"id": 1583747824656,
"title": "Input",
"posX": -375.0,
"title": "Input1",
"posX": -515.0,
"posY": -225.0,
"inputSockets": [],
"outputSockets": [
Expand Down Expand Up @@ -178,7 +178,7 @@
{
"id": 1583749319792,
"title": "Output",
"posX": 240.0,
"posX": 495.0,
"posY": -330.0,
"inputSockets": [
{
Expand All @@ -195,8 +195,8 @@
},
{
"id": 1583749804960,
"title": "Output",
"posX": 240.0,
"title": "Output1",
"posX": 498.0,
"posY": -210.0,
"inputSockets": [
{
Expand All @@ -213,8 +213,8 @@
},
{
"id": 1583749320560,
"title": "Output",
"posX": 240.0,
"title": "Output2",
"posX": 498.0,
"posY": -105.0,
"inputSockets": [
{
Expand All @@ -231,8 +231,8 @@
},
{
"id": 1583749320608,
"title": "Output",
"posX": 240.0,
"title": "Output3",
"posX": 498.0,
"posY": 15.0,
"inputSockets": [
{
Expand All @@ -249,8 +249,8 @@
},
{
"id": 192604048,
"title": "Output",
"posX": 240.0,
"title": "Output4",
"posX": 498.0,
"posY": 120.0,
"inputSockets": [
{
Expand Down Expand Up @@ -297,6 +297,70 @@
],
"content": {},
"operationCode": 7
},
{
"id": 140476586788960,
"title": "Absolute value",
"posX": -45.0,
"posY": 225.0,
"inputSockets": [
{
"id": 140476586788400,
"index": 0,
"allowMultiEdges": false,
"location": 1,
"socketType": 1
}
],
"outputSockets": [
{
"id": 140476586788232,
"index": 0,
"allowMultiEdges": true,
"location": 4,
"socketType": 1
}
],
"content": {},
"operationCode": 15
},
{
"id": 140474823730792,
"title": "Input2",
"posX": -525.0,
"posY": 225.0,
"inputSockets": [],
"outputSockets": [
{
"id": 140476592967808,
"index": 0,
"allowMultiEdges": true,
"location": 4,
"socketType": 1
}
],
"content": {
"value": "-3.14"
},
"operationCode": 1
},
{
"id": 140476592970272,
"title": "Output5",
"posX": 498.0,
"posY": 225.0,
"inputSockets": [
{
"id": 140476592970720,
"index": 0,
"allowMultiEdges": false,
"location": 1,
"socketType": 1
}
],
"outputSockets": [],
"content": {},
"operationCode": 2
}
],
"edges": [
Expand Down Expand Up @@ -395,6 +459,18 @@
"edgeType": 3,
"source": 1583749280096,
"target": 212486416
},
{
"id": 140476592971672,
"edgeType": 3,
"source": 140476592967808,
"target": 140476586788400
},
{
"id": 140476592971616,
"edgeType": 3,
"source": 140476586788232,
"target": 140476592970720
}
]
}
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ignore_missing_imports = True
;[mypy-PySide2.*]
;ignore_missing_imports = True

[mypy-numpy.*]
ignore_missing_imports = True

;
;disallow_untyped_calls = True
;disallow_untyped_defs = True
Expand Down
3 changes: 2 additions & 1 deletion nodedge/blocks/autogen/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .operator import *
from .numpy import *
from .operator import * # type: ignore
47 changes: 47 additions & 0 deletions nodedge/blocks/autogen/numpy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from .absolute_block import *
from .add_block import *
from .arccos_block import *
from .arccosh_block import *
from .arcsin_block import *
from .arcsinh_block import *
from .arctan2_block import *
from .arctan_block import *
from .arctanh_block import *
from .around_block import *
from .ceil_block import *
from .cos_block import *
from .cosh_block import *
from .deg2rad_block import *
from .equal_block import *
from .exp_block import *
from .floor_divide_block import *
from .greater_block import *
from .greater_equal_block import *
from .hypot_block import *
from .isclose_block import *
from .less_block import *
from .less_equal_block import *
from .log2_block import *
from .log10_block import *
from .log_block import *
from .maximum_block import *
from .minimum_block import *
from .mod_block import *
from .multiply_block import *
from .negative_block import *
from .not_equal_block import *
from .positive_block import *
from .power_block import *
from .rad2deg_block import *
from .reciprocal_block import *
from .rint_block import *
from .sign_block import *
from .sin_block import *
from .sinh_block import *
from .sqrt_block import *
from .square_block import *
from .subtract_block import *
from .tan_block import *
from .tanh_block import *
from .true_divide_block import *
from .trunc_block import *

0 comments on commit eda6c62

Please sign in to comment.