Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions news/protocol_mapping_none.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Protocols no longer require ``mapping`` as an argument, by default ``mapping=None`` (`PR #809 <https://github.com/OpenFreeEnergy/gufe/pull/809/>`_).

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
4 changes: 2 additions & 2 deletions src/gufe/protocols/protocol.py
Comment thread
atravitz marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def create(
*,
stateA: ChemicalSystem,
stateB: ChemicalSystem,
mapping: ComponentMapping | list[ComponentMapping] | dict[str, ComponentMapping] | None,
mapping: ComponentMapping | list[ComponentMapping] | dict[str, ComponentMapping] | None = None,
extends: ProtocolDAGResult | None = None,
name: str | None = None,
transformation_key: GufeKey | None = None,
Expand Down Expand Up @@ -300,7 +300,7 @@ def _validate(
*,
stateA: ChemicalSystem,
stateB: ChemicalSystem,
mapping: ComponentMapping | list[ComponentMapping] | None,
mapping: ComponentMapping | list[ComponentMapping] | None = None,
extends: ProtocolDAGResult | None = None,
):
r"""Method to override in custom :class:`Protocol` subclasses.
Expand Down
7 changes: 0 additions & 7 deletions src/gufe/tests/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ def protocol_dag(self, solvated_ligand, vacuum_ligand, tmp_path):
stateA=solvated_ligand,
stateB=vacuum_ligand,
name="a dummy run",
mapping=None,
)

shared = pathlib.Path(tmp_path / "shared")
Expand Down Expand Up @@ -246,7 +245,6 @@ def protocol_dag_broken(self, solvated_ligand, vacuum_ligand, tmp_path):
stateA=solvated_ligand,
stateB=vacuum_ligand,
name="a broken dummy run",
mapping=None,
)
shared = pathlib.Path(tmp_path / "shared")
shared.mkdir(parents=True)
Expand Down Expand Up @@ -388,7 +386,6 @@ def test_dag_execute_failure_raise_error(self, solvated_ligand, vacuum_ligand, t
stateA=solvated_ligand,
stateB=vacuum_ligand,
name="a broken dummy run",
mapping=None,
)
shared = pathlib.Path(tmp_path / "shared")
shared.mkdir(parents=True)
Expand Down Expand Up @@ -575,7 +572,6 @@ def instance(self, vacuum_ligand, solvated_ligand):
settings={},
stateA=vacuum_ligand,
stateB=solvated_ligand,
mapping=None,
start=None,
some_dict={"a": 2, "b": 12},
)
Expand Down Expand Up @@ -645,7 +641,6 @@ def dag(self, protocol):
return protocol.create(
stateA=ChemicalSystem(components={"solvent": gufe.SolventComponent(positive_ion="Na")}),
stateB=ChemicalSystem(components={"solvent": gufe.SolventComponent(positive_ion="Li")}),
mapping=None,
)

def test_create(self, dag):
Expand Down Expand Up @@ -801,7 +796,6 @@ def test_execute_DAG_retries(solvated_ligand, vacuum_ligand, tmp_path):
dag = protocol.create(
stateA=solvated_ligand,
stateB=vacuum_ligand,
mapping=None,
)

shared = pathlib.Path(tmp_path / "shared")
Expand Down Expand Up @@ -837,7 +831,6 @@ def test_execute_DAG_bad_nretries(solvated_ligand, vacuum_ligand, tmp_path):
dag = protocol.create(
stateA=solvated_ligand,
stateB=vacuum_ligand,
mapping=None,
)

shared = pathlib.Path(tmp_path / "shared")
Expand Down
Loading