This repository was archived by the owner on Aug 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
77## [ Unreleased]
88### Added
9- - Operations for taking input from the user( AcceptUserInput) and for printing the output( print_output)
9+ - Operations for taking input from the user ` AcceptUserInput ` and for printing the output ` print_output `
1010- Hugging Face Transformers tensorflow based NER models.
1111- PNG ConfigLoader for reading images as arrays to predict using MNIST trained models
1212- Docstrings and doctestable examples to ` record.py ` .
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ class AcceptUserInput(OperationImplementation):
5252 ++++++++
5353
5454 The following example shows how to use AcceptUserInput.
55+
5556 >>> dataflow = DataFlow.auto(AcceptUserInput, GetSingle)
5657 >>> dataflow.seed.append(
5758 ... Input(
@@ -106,6 +107,7 @@ async def print_output(data: str):
106107 ++++++++
107108
108109 The following example shows how to use print_output.
110+
109111 >>> dataflow = DataFlow.auto(print_output, GetSingle)
110112 >>> inputs = [
111113 ... Input(
@@ -121,4 +123,4 @@ async def print_output(data: str):
121123 print_output example
122124 String to be printed is 'print_output example'
123125 """
124- print (" \n " + data )
126+ print (data )
Original file line number Diff line number Diff line change 77import inspect
88import asyncio
99import tempfile
10+ import builtins
1011import functools
12+ from unittest import mock
1113
1214# Create a temporary directory for test to run in
1315DOCTEST_TEMPDIR = tempfile .mkdtemp ()
1618# Change the current working directory to the temporary directory
1719os .chdir (DOCTEST_TEMPDIR )
1820
19- from dffml_model_scikit import *
2021from dffml import *
2122from dffml .base import *
2223from dffml .record import *
2324from dffml .df .base import *
2425from dffml .df .types import *
25- from dffml .df .memory import *
2626from dffml .util .net import *
27+ from dffml .df .memory import *
28+ from dffml_model_scikit import *
29+ from dffml .operation .io import *
30+ from dffml .source .memory import *
2731from dffml .operation .output import *
2832from dffml .operation .dataflow import *
29- from dffml .source .memory import *
33+
34+ # Used for mocking input() for AcceptUserInput operation.
35+ mock .patch ("builtins.input" , return_value = "Data flow is awesome" ).start ()
You can’t perform that action at this time.
0 commit comments