Skip to content

Commit

Permalink
LIU-407: Update README.md and checkGraph.py
Browse files Browse the repository at this point in the history
  • Loading branch information
myxie committed Nov 15, 2024
1 parent 18d828d commit 5c5a935
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# dlg_repo
This is the playground repository for DALiuGE graphs and palettes. This repository is not meant to be used to keep operational graphs or palettes.
# EAGLE Test epository
This is the testing repository for DALiuGE graphs created with EAGLE. This repository is not meant to be used to keep operational graphs or palettes.

Installing the repository using `pip` will install the `eagle_test_graphs/daliuge_tests` as the `daliuge_tests` module. These test files are kept up to date and act as the current state of supported graphs across DALiuGE and EAGLE.

Accessing the graphs when installed may be done accordingly:

```
# Get directory eagle_test_graphs/daliuge_tests/dropmake/logical_graphs
import daliuge_tests.dropmake.logical_graphs as test_graphs
# Make sure to use importlib over deprecated pkg_resources
from importlib.resources import files
directory = files(test_graphs) # Returns a pathlib.Path object
for child in directory.iterdir():
# Perform operation on child.
```
25 changes: 10 additions & 15 deletions tools/checkGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@

LG_SCHEMA_FILENAME = "lg.graph.schema"

logger = logging.getLogger(__name__)
FORMAT = "%(asctime)s [ %(filename)s ] [ %(lineno)s ] [ %(funcName)s ] || %(message)s ||"
logging.basicConfig(
format=FORMAT,
datefmt="%d-%b-%yT%H:%M:%S",
level=logging.INFO,
)

def get_args():
"""
Deal with the command line arguments
Expand All @@ -33,21 +41,8 @@ def get_args():


if __name__ == "__main__":
"""
Main method
"""
logger = logging.getLogger(__name__)
FORMAT = "%(asctime)s [ %(filename)s ] [ %(lineno)s ] [ %(funcName)s ] || %(message)s ||"
logging.basicConfig(
format=FORMAT,
datefmt="%d-%b-%yT%H:%M:%S",
level=logging.INFO,
)

# read command line arguments
input_filename = get_args()
logger.info("Input Filename:" + input_filename)
logger.info("Input Filename %s:", input_filename)

# load graph
with open(input_filename, "r") as file:
Expand All @@ -71,4 +66,4 @@ def get_args():
sys.exit(1)

logger.info("Valid")
sys.exit(0)
sys.exit(0)

0 comments on commit 5c5a935

Please sign in to comment.