From 6fc85f51017dfd9e8656bb1e775473294259488f Mon Sep 17 00:00:00 2001 From: Felix Andreas Date: Wed, 12 Feb 2020 07:37:02 +0100 Subject: [PATCH 1/3] Sort lattices --- latticejson/convert.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/latticejson/convert.py b/latticejson/convert.py index 3301e85..a8be8a6 100644 --- a/latticejson/convert.py +++ b/latticejson/convert.py @@ -88,6 +88,7 @@ def elegant_to_latticejson(string): ) +# TODO: revise logic!! def sort_lattices_old(lattices: Dict[str, List[str]]) -> List[str]: """Returns a sorted list of lattice names for a given dict of lattices.""" @@ -108,6 +109,7 @@ def _sort_lattices(name, arrangement: List[str]): return lattice_names +# TODO: revise logic!! def sort_lattices(lattices: Dict[str, List[str]]) -> List[str]: """Returns a sorted list of lattice names for a given dict of lattices.""" From 1aa4189306efa3c74ba15a13379edadb3bed610e Mon Sep 17 00:00:00 2001 From: Felix Andreas Date: Fri, 14 Feb 2020 16:20:49 +0100 Subject: [PATCH 2/3] wip --- latticejson/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latticejson/__init__.py b/latticejson/__init__.py index 49f90b7..5f35b40 100644 --- a/latticejson/__init__.py +++ b/latticejson/__init__.py @@ -1,5 +1,5 @@ from .io import load, convert from .validate import validate -from .convert import elegant_to_latticejson, latticejson_to_elegant +from .convert import elegant_to_latticejson, latticejson_to_elegant, sort_lattices from .migrate import migrate from .exceptions import UndefinedObjectError, UndefinedRPNVariableError From 5d964e409a806667e4e6e9f2927eb766a33f2693 Mon Sep 17 00:00:00 2001 From: Felix Andreas Date: Thu, 23 Apr 2020 12:30:19 +0200 Subject: [PATCH 3/3] Update convert.py --- latticejson/convert.py | 1 - 1 file changed, 1 deletion(-) diff --git a/latticejson/convert.py b/latticejson/convert.py index 532c33b..312bf08 100644 --- a/latticejson/convert.py +++ b/latticejson/convert.py @@ -77,7 +77,6 @@ def _map_names(lattice_data: dict, name_map: dict): def to_elegant(latticejson: dict) -> str: """Convert a LatticeJSON dict to the elegant lattice file format. - :param lattice_dict dict: dict in LatticeJSON format :return: string with in elegant lattice file format """