Skip to content

Commit

Permalink
Refactor dir hierarchy
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Diblik <[email protected]>
  • Loading branch information
danmyway committed Mar 18, 2024
1 parent 170b334 commit fbc3ef3
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 17 deletions.
Binary file added dist/tesar-2023.6.29-py3-none-any.whl
Binary file not shown.
Binary file added dist/tesar-2023.6.29.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions src/tesar/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import contextlib
import sys

from dispatch import get_arguments, get_datetime
from tesar.dispatch import get_arguments, get_datetime

ARGS = get_arguments()


def main():
if ARGS.action == "test":
from dispatch.__main__ import main as dispatch
from tesar.dispatch.__main__ import main as dispatch

if ARGS.log:
datetime_str = get_datetime()
Expand All @@ -18,6 +18,6 @@ def main():
else:
sys.exit(dispatch())
elif ARGS.action == "report":
from report.__main__ import main as report
from tesar.report.__main__ import main as report

sys.exit(report())
8 changes: 5 additions & 3 deletions src/dispatch/__init__.py → src/tesar/dispatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,19 +291,21 @@ def get_arguments(args=None):
help="""Download logs for requested run(s).""",
)
report.add_argument(
'--skip-pass',
"--skip-pass",
action="store_true",
help="Skip PASSED results while showing table and while downloading logs.",
)
report.add_argument(
"--compare",
action="store_true",
help="""Build a comparison table for several runs results""")
help="""Build a comparison table for several runs results""",
)
report.add_argument(
"-u",
"--unify-results",
action="append",
help="""Plans name to be treated as one in plan1=plan2 format, useful for runs comparison in case of renaming.""")
help="""Plans name to be treated as one in plan1=plan2 format, useful for runs comparison in case of renaming.""",
)
tasks_source = report.add_mutually_exclusive_group()
tasks_source.add_argument(
"-lt",
Expand Down
6 changes: 3 additions & 3 deletions src/dispatch/__main__.py → src/tesar/dispatch/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

import requests

from dispatch import (
from tesar.dispatch import (
get_arguments,
get_compose_mapping,
get_logging,
)
from dispatch.dispatch_globals import ARTIFACT_MAPPING, PACKAGE_MAPPING
from dispatch.tf_send_request import submit_test
from tesar.dispatch.dispatch_globals import ARTIFACT_MAPPING, PACKAGE_MAPPING
from tesar.dispatch.tf_send_request import submit_test

LOGGER = get_logging()
ARGS = get_arguments()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import koji

from dispatch import get_compose_mapping, get_arguments, get_logging
from tesar.dispatch import get_compose_mapping, get_arguments, get_logging

LOGGER = get_logging()
ARGS = get_arguments()
Expand Down
4 changes: 2 additions & 2 deletions src/dispatch/copr_api.py → src/tesar/dispatch/copr_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from copr.v3 import BuildProxy

from dispatch import dispatch_globals
from dispatch import get_arguments, get_compose_mapping, get_logging
from tesar.dispatch import dispatch_globals
from tesar.dispatch import get_arguments, get_compose_mapping, get_logging

SESSION = BuildProxy(dispatch_globals.COPR_CONFIG)
LOGGER = get_logging()
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

import requests

from dispatch import (
from tesar.dispatch import (
FormatText,
get_arguments,
get_config,
get_datetime,
)
from dispatch.dispatch_globals import (
from tesar.dispatch.dispatch_globals import (
ARTIFACT_BASE_URL,
LATEST_TASKS_FILE,
TESTING_FARM_ENDPOINT,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/report/__main__.py → src/tesar/report/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import requests
from prettytable import PrettyTable

from dispatch import FormatText, get_arguments, get_logging
from dispatch.dispatch_globals import (
from tesar.dispatch import FormatText, get_arguments, get_logging
from tesar.dispatch.dispatch_globals import (
ARTIFACT_BASE_URL,
TESTING_FARM_ENDPOINT,
LATEST_TASKS_FILE,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import pytest

from dispatch import get_arguments
from tesar.dispatch import get_arguments


def test_cmd_args_are_appended():
Expand Down

0 comments on commit fbc3ef3

Please sign in to comment.