Skip to content

Commit 9dd168c

Browse files
initial runner api (#1732)
* initial runner map api * return Run objects * WIP: click to method mapping * WIP: click to method, adding groups * remove comment * pass in args and opts correctly * fix validation for top level params * restore metaflow_runner.py * handle list in options * fix nargs * fix issue with validating missing args * inject flow parameters as well * handle include file * internal click to chaining methods functionality * subprocess manager * simpler subprocess manager * handle SIGINT * wait() handles timeout + logs both * improved log streaming with ability to resume + stream multiple times * cleanup in context manager, otherwise user is responsible * remove aiofiles * split into CommandManager and SubprocessManager * return components array instead * remove assert * add type hints * return ExecutingRun encapsulating CommandManager and metaflow.Run * print as string * suggested improvements * use correct variable name * update usage of subprocess manager * fix flags such as --pylint/--no-pylint * cache loaded modules * fix boolean flags * remove aiofiles * no f-strings * get run object explicitly * new higher level UX * typeguard warning for 3.5/3.6 + add profile argument * default None for profile * detect early issues * fix user defined params not being recognised * kill all descendants * do not use f-strings * suggested changes * use pkill instead of psutil * minor fix * vendor typeguard * update error message * remove comma and check in init * Added docstrings; fixed stubs; moved stuff around * change dir name to runner * fix import in test * fix import * add status property to ExecutingRun * add docstring for status property --------- Co-authored-by: Romain Cledat <[email protected]>
1 parent 1bc13fc commit 9dd168c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+9638
-13
lines changed

metaflow/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ class and related decorators.
146146
# Import data class within tuple_util but not introduce new symbols.
147147
from . import tuple_util
148148

149+
# Runner API
150+
if sys.version_info >= (3, 7):
151+
from .runner.metaflow_runner import Runner
152+
149153
__version_addl__ = []
150154
_ext_debug("Loading top-level modules")
151155
for m in _tl_modules:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2017-2019 Jason R. Coombs, Barry Warsaw
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

0 commit comments

Comments
 (0)