generated from pyiron/pyiron_module_template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from pyiron/fix_node_registration
- Loading branch information
Showing
17 changed files
with
436 additions
and
124 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
Tools specifically for the test suite, not intended for general use. | ||
""" | ||
|
||
from pathlib import Path | ||
import sys | ||
|
||
|
||
def ensure_tests_in_python_path(): | ||
"""So that you can import from the static module""" | ||
path_to_tests = Path(__file__).parent.parent / "tests" | ||
as_string = str(path_to_tests.resolve()) | ||
|
||
if as_string not in sys.path: | ||
sys.path.append(as_string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" | ||
For graphical representations of data. | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from typing import Optional | ||
|
||
import numpy as np | ||
|
||
from pyiron_workflow.function import single_value_node | ||
|
||
|
||
@single_value_node(output_labels="fig") | ||
def scatter( | ||
x: Optional[list | np.ndarray] = None, y: Optional[list | np.ndarray] = None | ||
): | ||
from matplotlib import pyplot as plt | ||
|
||
return plt.scatter(x, y) | ||
|
||
|
||
nodes = [ | ||
scatter, | ||
] |
Oops, something went wrong.