From e0d9a600361436fecee77b15bb813b53b37d2f7b Mon Sep 17 00:00:00 2001 From: Tom Close Date: Wed, 22 May 2024 11:59:29 +1000 Subject: [PATCH 1/2] added jupyter install option --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6a6ad5e70..2fb60c656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,9 @@ test = [ "boutiques", "pympler", ] +jupyter = [ + "nest_asyncio" +] # Aliases tests = ["pydra[test]"] docs = ["pydra[doc]"] From 0387d9c199cc5888334a7f2566249125ffd421cf Mon Sep 17 00:00:00 2001 From: Tom Close Date: Wed, 22 May 2024 13:48:51 +1000 Subject: [PATCH 2/2] updated file hashes in unittests --- pydra/engine/tests/test_helpers.py | 2 +- pydra/engine/tests/test_specs.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pydra/engine/tests/test_helpers.py b/pydra/engine/tests/test_helpers.py index 06ce39220..a3ea023e1 100644 --- a/pydra/engine/tests/test_helpers.py +++ b/pydra/engine/tests/test_helpers.py @@ -50,7 +50,7 @@ def test_hash_file(tmpdir): with open(outdir / "test.file", "w") as fp: fp.write("test") assert ( - hash_function(File(outdir / "test.file")) == "37fcc546dce7e59585f3217bb4c30299" + hash_function(File(outdir / "test.file")) == "f32ab20c4a86616e32bf2504e1ac5a22" ) diff --git a/pydra/engine/tests/test_specs.py b/pydra/engine/tests/test_specs.py index 4f54cd404..77a0f690b 100644 --- a/pydra/engine/tests/test_specs.py +++ b/pydra/engine/tests/test_specs.py @@ -140,7 +140,7 @@ def test_input_file_hash_1(tmp_path): fields = [("in_file", File)] input_spec = SpecInfo(name="Inputs", fields=fields, bases=(BaseSpec,)) inputs = make_klass(input_spec) - assert inputs(in_file=outfile).hash == "0e9306e5cae1de1b4dff1f27cca03bce" + assert inputs(in_file=outfile).hash == "02fa5f6f1bbde7f25349f54335e1adaf" def test_input_file_hash_2(tmp_path): @@ -154,7 +154,7 @@ def test_input_file_hash_2(tmp_path): # checking specific hash value hash1 = inputs(in_file=file).hash - assert hash1 == "17e4e2b4d8ce8f36bf3fd65804958dbb" + assert hash1 == "aaa50d60ed33d3a316d58edc882a34c3" # checking if different name doesn't affect the hash file_diffname = tmp_path / "in_file_2.txt" @@ -185,7 +185,7 @@ def test_input_file_hash_2a(tmp_path): # checking specific hash value hash1 = inputs(in_file=file).hash - assert hash1 == "17e4e2b4d8ce8f36bf3fd65804958dbb" + assert hash1 == "aaa50d60ed33d3a316d58edc882a34c3" # checking if different name doesn't affect the hash file_diffname = tmp_path / "in_file_2.txt" @@ -204,7 +204,7 @@ def test_input_file_hash_2a(tmp_path): # checking if string is also accepted hash4 = inputs(in_file=str(file)).hash - assert hash4 == "aee7c7ae25509fb4c92a081d58d17a67" + assert hash4 == "800af2b5b334c9e3e5c40c0e49b7ffb5" def test_input_file_hash_3(tmp_path): @@ -278,7 +278,7 @@ def test_input_file_hash_4(tmp_path): # checking specific hash value hash1 = inputs(in_file=[[file, 3]]).hash - assert hash1 == "11b7e9c90bc8d9dc5ccfc8d4526ba091" + assert hash1 == "0693adbfac9f675af87e900065b1de00" # the same file, but int field changes hash1a = inputs(in_file=[[file, 5]]).hash @@ -315,7 +315,7 @@ def test_input_file_hash_5(tmp_path): # checking specific hash value hash1 = inputs(in_file=[{"file": file, "int": 3}]).hash - assert hash1 == "5fd53b79e55bbf62a4bb3027eb753a2c" + assert hash1 == "56e6e2c9f3bdf0cd5bd3060046dea480" # the same file, but int field changes hash1a = inputs(in_file=[{"file": file, "int": 5}]).hash