Skip to content
Snippets Groups Projects
Commit fabdf64c authored by Maël Madon's avatar Maël Madon
Browse files

restructure repo for smooth packaging

parent 1202fa98
Branches
Tags
No related merge requests found
Pipeline #5528 failed
...@@ -17,3 +17,5 @@ classifiers = [ ...@@ -17,3 +17,5 @@ classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
] ]
[project.scripts]
swf2userSessions = "swf2userSessions.swf2userSessions:parse_from_cli"
\ No newline at end of file
File moved
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse, json, re, os, sys, warnings import argparse, json, re, os, warnings
from src.user_session_builder import User from swf2userSessions.user_session_builder import User
from src.workload import SwfField, Job from swf2userSessions.workload import SwfField, Job
def swf2sessions(input_swf, out_dir, delim_approach, delim_threshold, def swf2sessions(input_swf, out_dir, delim_approach, delim_threshold,
...@@ -108,8 +108,7 @@ def check_sanity(job:Job): ...@@ -108,8 +108,7 @@ def check_sanity(job:Job):
return True return True
def parse_from_cli():
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Python script to read a workload trace in the Standard Workload Format (SWF), decompose it into user sessions, analyse the dependencies between sessions and store the results in the Session Annotated Batsim JSON format (SABjson).") parser = argparse.ArgumentParser(description="Python script to read a workload trace in the Standard Workload Format (SWF), decompose it into user sessions, analyse the dependencies between sessions and store the results in the Session Annotated Batsim JSON format (SABjson).")
parser.add_argument('input_swf', parser.add_argument('input_swf',
type=argparse.FileType('r'), type=argparse.FileType('r'),
...@@ -230,3 +229,7 @@ if __name__ == "__main__": ...@@ -230,3 +229,7 @@ if __name__ == "__main__":
given_walltime_only=args.given_walltime_only, given_walltime_only=args.given_walltime_only,
job_grain=args.job_grain, job_grain=args.job_grain,
quiet=args.quiet) quiet=args.quiet)
if __name__ == "__main__":
main()
\ No newline at end of file
...@@ -5,7 +5,7 @@ according to the delimitation approach. ...@@ -5,7 +5,7 @@ according to the delimitation approach.
from datetime import datetime from datetime import datetime
import networkx as nx import networkx as nx
from src.workload import Session from swf2userSessions.workload import Session
import sys import sys
class User: class User:
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment