Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for interactive tasks via IO #233

Closed
wants to merge 16 commits into from
Closed
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ tests =
[options.entry_points]
console_scripts =
sinol-make = sinol_make:main
sm = sinol_make:main

[tool:pytest]
testpaths =
Expand Down
2 changes: 1 addition & 1 deletion src/sinol_make/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from sinol_make import util, oiejq


__version__ = "1.6.0"
__version__ = "1.7.0.dev1"


def configure_parsers():
Expand Down
4 changes: 3 additions & 1 deletion src/sinol_make/commands/gen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from sinol_make.commands.outgen import Command as OutgenCommand
from sinol_make.helpers import parsers
from sinol_make.interfaces.BaseCommand import BaseCommand
from sinol_make.task_type import get_task_type


class Command(BaseCommand):
Expand Down Expand Up @@ -40,6 +41,7 @@ def configure_subparser(self, subparser):

def run(self, args: argparse.Namespace):
args = util.init_package_command(args)
task_type = get_task_type()

self.args = args
self.ins = args.only_inputs
Expand All @@ -53,6 +55,6 @@ def run(self, args: argparse.Namespace):
command = IngenCommand()
command.run(args)

if self.outs:
if self.outs and task_type.run_outgen():
command = OutgenCommand()
command.run(args)
4 changes: 4 additions & 0 deletions src/sinol_make/commands/outgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from sinol_make.structs.gen_structs import OutputGenerationArguments
from sinol_make.helpers import parsers, package_util, cache, paths
from sinol_make.interfaces.BaseCommand import BaseCommand
from sinol_make.task_type import get_task_type


class Command(BaseCommand):
Expand Down Expand Up @@ -106,6 +107,9 @@ def clean_cache(self, inputs):

def run(self, args: argparse.Namespace):
args = util.init_package_command(args)
task_type = get_task_type()
if not task_type.run_outgen():
util.exit_with_error('This task type does not support output generation.')

self.args = args
self.task_id = package_util.get_task_id()
Expand Down
Loading
Loading