diff --git a/.binder/environment.yml b/.binder/environment.yml index 9e772e2b..ab5bbf9a 100644 --- a/.binder/environment.yml +++ b/.binder/environment.yml @@ -7,18 +7,18 @@ dependencies: - cloudpickle =3.0.0 - graphviz =9.0.0 - h5io =0.2.2 -- h5io_browser =0.0.9 +- h5io_browser =0.0.10 - matplotlib =3.8.3 -- pyiron_base =0.7.9 -- pyiron_contrib =0.1.15 -- pympipool =0.7.13 +- pyiron_base =0.8.0 +- pyiron_contrib =0.1.16 +- pympipool =0.7.17 - python-graphviz =0.20.3 - toposort =1.10 -- typeguard =4.1.5 +- typeguard =4.2.1 - ase =3.22.1 -- atomistics =0.1.23 +- atomistics =0.1.24 - lammps -- phonopy =2.21.2 -- pyiron_atomistics =0.4.17 +- phonopy =2.22.1 +- pyiron_atomistics =0.5.0 - pyiron-data =0.0.29 - numpy =1.26.4 diff --git a/.ci_support/environment-notebooks.yml b/.ci_support/environment-notebooks.yml index 7db01efe..3b36f771 100644 --- a/.ci_support/environment-notebooks.yml +++ b/.ci_support/environment-notebooks.yml @@ -2,9 +2,9 @@ channels: - conda-forge dependencies: - ase =3.22.1 - - atomistics =0.1.23 + - atomistics =0.1.24 - lammps - - phonopy =2.21.2 - - pyiron_atomistics =0.4.17 + - phonopy =2.22.1 + - pyiron_atomistics =0.5.0 - pyiron-data =0.0.29 - numpy =1.26.4 \ No newline at end of file diff --git a/.ci_support/environment.yml b/.ci_support/environment.yml index 879c77e0..fc2c6470 100644 --- a/.ci_support/environment.yml +++ b/.ci_support/environment.yml @@ -7,11 +7,11 @@ dependencies: - cloudpickle =3.0.0 - graphviz =9.0.0 - h5io =0.2.2 -- h5io_browser =0.0.9 +- h5io_browser =0.0.10 - matplotlib =3.8.3 -- pyiron_base =0.7.9 -- pyiron_contrib =0.1.15 -- pympipool =0.7.13 +- pyiron_base =0.8.0 +- pyiron_contrib =0.1.16 +- pympipool =0.7.17 - python-graphviz =0.20.3 - toposort =1.10 -- typeguard =4.1.5 +- typeguard =4.2.1 diff --git a/docs/environment.yml b/docs/environment.yml index ccfeea72..40474aab 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -12,11 +12,11 @@ dependencies: - cloudpickle =3.0.0 - graphviz =9.0.0 - h5io =0.2.2 -- h5io_browser =0.0.9 +- h5io_browser =0.0.10 - matplotlib =3.8.3 -- pyiron_base =0.7.9 -- pyiron_contrib =0.1.15 -- pympipool =0.7.13 +- pyiron_base =0.8.0 +- pyiron_contrib =0.1.16 +- pympipool =0.7.17 - python-graphviz =0.20.3 - toposort =1.10 -- typeguard =4.1.5 +- typeguard =4.2.1 diff --git a/pyiron_workflow/job.py b/pyiron_workflow/job.py index 3a742842..8a220d86 100644 --- a/pyiron_workflow/job.py +++ b/pyiron_workflow/job.py @@ -24,7 +24,7 @@ import os import sys -from pyiron_base import GenericJob, TemplateJob, JOB_CLASS_DICT +from pyiron_base import TemplateJob, JOB_CLASS_DICT from pyiron_base.jobs.flex.pythonfunctioncontainer import ( PythonFunctionContainerJob, get_function_parameter_dict, @@ -122,17 +122,6 @@ def run_static(self): self.to_hdf() self.status.finished = True - def save(self): - # PythonFunctionContainerJob.save assumes that the job is being created - # exclusively from pyiron_base.Project.wrap_python_function, and therefore - # always dynamically renames the job based on the wrapped function and the - # input. - # Here, the jobs are created in the usual way, with the usual use of job name, - # so it is just confusing if this renaming happens; thus, we save as usual. - # If at any point PythonFunctionContainerJob.save behaves in the usual way, - # this override can be removed - GenericJob.save(self) - JOB_CLASS_DICT[NodeOutputJob.__name__] = NodeOutputJob.__module__ diff --git a/pyiron_workflow/node.py b/pyiron_workflow/node.py index 9148b594..fe425ba8 100644 --- a/pyiron_workflow/node.py +++ b/pyiron_workflow/node.py @@ -10,7 +10,6 @@ import sys from abc import ABC from concurrent.futures import Future -import platform from typing import Any, Literal, Optional, TYPE_CHECKING import warnings @@ -647,16 +646,8 @@ def draw( Returns: (graphviz.graphs.Digraph): The resulting graph object. - Warnings: - Rendering a PDF format appears to not be working on Windows right now. """ - if format == "pdf" and platform.system() == "Windows": - warnings.warn( - "Graphviz does not appear to be playing well with Windows right now," - "this will probably fail and you will need to try a different format." - "If it _doesn't_ fail, please contact the developers by raising an " - "issue at github.com/pyiron/pyiron_workflow" - ) + if size is not None: size = f"{size[0]},{size[1]}" graph = GraphvizNode(self, depth=depth, rankdir=rankdir, size=size).graph diff --git a/setup.py b/setup.py index 2750eded..cfdd8f6a 100644 --- a/setup.py +++ b/setup.py @@ -32,21 +32,21 @@ 'cloudpickle==3.0.0', 'graphviz==0.20.3', 'h5io==0.2.2', - 'h5io_browser==0.0.9', + 'h5io_browser==0.0.10', 'matplotlib==3.8.3', - 'pyiron_base==0.7.9', - 'pyiron_contrib==0.1.15', - 'pympipool==0.7.13', + 'pyiron_base==0.8.0', + 'pyiron_contrib==0.1.16', + 'pympipool==0.7.17', 'toposort==1.10', - 'typeguard==4.1.5', + 'typeguard==4.2.1', ], extras_require={ "node_library": [ 'ase==3.22.1', - 'atomistics==0.1.23', + 'atomistics==0.1.24', 'numpy==1.26.4', - 'phonopy==2.21.2', - 'pyiron_atomistics==0.4.17', + 'phonopy==2.22.1', + 'pyiron_atomistics==0.5.0', ], }, cmdclass=versioneer.get_cmdclass(), diff --git a/tests/unit/test_job.py b/tests/unit/test_job.py index 009275c5..4d5b180b 100644 --- a/tests/unit/test_job.py +++ b/tests/unit/test_job.py @@ -29,39 +29,11 @@ def tearDown(self) -> None: class TestNodeOutputJob(_WithAJob): - def make_a_job_from_node(self, node, job_name=None): - job = self.pr.create.job.NodeOutputJob( - node.label if job_name is None else job_name - ) + def make_a_job_from_node(self, node): + job = self.pr.create.job.NodeOutputJob(node.label) job.input["node"] = node return job - @unittest.skipIf(sys.version_info < (3, 11), "Storage will only work in 3.11+") - def test_job_name_override(self): - job_name = "my_name" - job = self.make_a_job_from_node( - Workflow.create.standard.UserInput(42), - job_name=job_name - ) - self.assertEqual( - job_name, - job.job_name, - msg="Sanity check" - ) - try: - job.save() - self.assertEqual( - job_name, - job.job_name, - msg="Standard behaviour for the parent class is to dynamically rename " - "the job at save time; since we create these jobs as usual from " - "the job creator, this is just confusing and we want to avoid it. " - "If this behaviour is every changed in pyiron_base, the override " - "and this test can both be removed." - ) - finally: - job.remove() - @unittest.skipIf(sys.version_info >= (3, 11), "Storage should only work in 3.11+") def test_clean_failure(self): with self.assertRaises( diff --git a/tests/unit/test_node.py b/tests/unit/test_node.py index ce84b572..eda64c2a 100644 --- a/tests/unit/test_node.py +++ b/tests/unit/test_node.py @@ -1,7 +1,5 @@ from concurrent.futures import Future import os -import platform -from subprocess import CalledProcessError import sys from typing import Literal, Optional import unittest @@ -322,29 +320,17 @@ def test_draw(self): for fmt in ["pdf", "png"]: with self.subTest(f"Testing with format {fmt}"): - if fmt == "pdf" and platform.system() == "Windows": - with self.assertRaises( - CalledProcessError, - msg="Graphviz doesn't seem to be happy about the " - "combindation PDF format and Windows right now. We " - "throw a warning for it in `Node.draw`, so if this " - "test ever fails and this combination _doesn't_ fail, " - "remove this extra bit of testing and remove the " - "warning." - ): - self.n1.draw(save=True, format=fmt) - else: - self.n1.draw(save=True, format=fmt) - expected_name = self.n1.label + "_graph." + fmt - # That name is just an implementation detail, update it as - # needed - self.assertTrue( - self.n1.working_directory.path.joinpath( - expected_name - ).is_file(), - msg="If `save` is called, expect the rendered image to " - "exist in the working directory" - ) + self.n1.draw(save=True, format=fmt) + expected_name = self.n1.label + "_graph." + fmt + # That name is just an implementation detail, update it as + # needed + self.assertTrue( + self.n1.working_directory.path.joinpath( + expected_name + ).is_file(), + msg="If `save` is called, expect the rendered image to " + "exist in the working directory" + ) user_specified_name = "foo" self.n1.draw(filename=user_specified_name, format=fmt)