Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
179a2dd
run black
ryan-williams May 19, 2022
1296ac1
nits: sort imports, doc typos, minor cleanups
ryan-williams Jun 17, 2021
c2d74a6
move install_requires to requirements.txt
ryan-williams Aug 13, 2021
b1f94eb
CI: .[test] extra
ryan-williams Jun 19, 2021
d0f5e15
remove python2
ryan-williams Jun 19, 2021
bfa31fe
consolidate start() cli calls, pass standalone_mode to click
ryan-williams Jun 18, 2021
08e619d
FlowSpec metaclass sets `file`, `name`, `path_spec`, `_graph`, `_steps`
ryan-williams Jun 28, 2021
0197784
Flow(): add args, entrypoint, standalone_mode
ryan-williams Jun 28, 2021
9b4d465
add conftest.py
ryan-williams Mar 16, 2023
d28e4db
test_api, utils
ryan-williams Jun 29, 2021
3f620cc
CI: run pytest
ryan-williams Mar 22, 2023
53e2802
Octo-merge: nits reqs meta
ryan-williams Mar 22, 2023
06c301d
add IS_STEP attr constant
ryan-williams Jun 19, 2021
d94e4c9
nits: rm redundant(?) startup print
ryan-williams Jun 19, 2021
77f4ee2
nits: set `click` prog_name
ryan-williams Jun 18, 2021
f3f6b55
nit: graph ivar cleanup
ryan-williams Jun 19, 2021
ec2b854
test utils: add test/flow directories
ryan-williams Jun 29, 2021
1d953d4
test utils: add args, entrypoint params
ryan-williams Jun 29, 2021
79b62d4
test utils: add `cmd` param
ryan-williams Jun 29, 2021
5b4181f
mff: register FlowSpec parameters, main flow
ryan-williams Jun 28, 2021
1a63c67
cli: parse_flow helper
ryan-williams Jun 19, 2021
f4dfbf5
cli: FlowSpec.load
ryan-williams Jun 18, 2021
6aa59d8
cli: add `metaflow flow` subcommand
ryan-williams Jun 19, 2021
e9ef85e
graph: use flow-ctor Graph in cli.start
ryan-williams Jun 28, 2021
5bd6ae1
better error msg when flow file not found in code package
ryan-williams Aug 9, 2021
6935b61
allow metaflow workdirs to already exist
ryan-williams Aug 11, 2021
4f12c3e
use correct flow file / entrypoint in --batch mode
ryan-williams Aug 9, 2021
5cb4742
test utils: tutorials_dir
ryan-williams Jun 29, 2021
7833c3f
test utils: add `fn` param
ryan-williams Jun 29, 2021
1b7b166
test utils: default to dict() version of data
ryan-williams Jun 29, 2021
860b77c
test utils: add `verify_output` helper
ryan-williams Jun 29, 2021
f9f2df8
test_cli, linear_flows
ryan-williams Jun 29, 2021
63f44f3
mff: parameter / main flow tests
ryan-williams Jun 19, 2021
e62ce43
test_simple_foreach.py
ryan-williams Jun 28, 2021
7a1bc85
test_foreach.py
ryan-williams Jun 28, 2021
c99fb10
test_joins.py
ryan-williams Jun 28, 2021
8c767c7
api: verify no new fns in old StepVisitor
ryan-williams Jun 19, 2021
5cb50d6
api: `parse` param to DAGNode, StepVisitor
ryan-williams Jun 19, 2021
3529896
api: DAGNode file, lineno overrides
ryan-williams Jun 19, 2021
712c721
api: FlowGraph `nodes` override param
ryan-williams Jun 19, 2021
8e46a1e
api: inheritance: sort steps by original flow file
ryan-williams Jun 17, 2021
2dbde96
api: store function, _mf meta directly on DAGNodes
ryan-williams Jun 19, 2021
6a1f46e
api: allow foreach input shorthand in linter
ryan-williams Jun 19, 2021
6b256a7
api: `_mf` meta constants
ryan-williams Jun 19, 2021
89dd0cc
api: add new metaflow.api flow/step DSL
ryan-williams Jun 19, 2021
9d78818
test_api: new linear flow
ryan-williams Jul 1, 2021
1ba834a
add @resources tests
ryan-williams Aug 24, 2021
989ecd7
api: inheritance tests
ryan-williams Jun 19, 2021
c24de0a
new test_joins
ryan-williams May 19, 2022
c019c31
new test_foreach
ryan-williams Jul 1, 2021
be477b2
new test_simple_foreach
ryan-williams Jul 1, 2021
0cd5cc7
parameters: tests (new flows)
ryan-williams Jun 19, 2021
3aa0adc
add top-level README note
ryan-williams Jun 17, 2021
f9a861f
example StepDecorator test
ryan-williams Jul 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ jobs:

- name: Install Python ${{ matrix.ver }} dependencies
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install tox numpy
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -e .[test]

- name: Execute pytest tests
run: pytest

- name: Execute Python tests
run: tox
Expand Down Expand Up @@ -75,5 +78,3 @@ jobs:
run: |
cd R/tests
Rscript run_tests.R


4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include LICENSE
include metaflow/plugins/cards/card_modules/*.html
include metaflow/plugins/cards/card_modules/*.js
include metaflow/plugins/cards/card_modules/*.css
include metaflow/plugins/cards/card_modules/*.css
include requirements.txt
include requirements-test.txt
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
![Metaflow_Logo_Horizontal_FullColor_Ribbon_Dark_RGB](https://user-images.githubusercontent.com/763451/89453116-96a57e00-d713-11ea-9fa6-82b29d4d6eff.png)

[celsiustx/metaflow fork, `dsl` branch](https://github.com/celsiustx/metaflow/tree/dsl/metaflow/api): see [`metaflow/api`](metaflow/api)

-------
# Metaflow

Metaflow is a human-friendly Python/R library that helps scientists and engineers build and manage real-life data science projects. Metaflow was originally developed at Netflix to boost productivity of data scientists who work on a wide variety of projects from classical statistics to state-of-the-art deep learning.
Expand Down
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
collect_ignore = ["metaflow/plugins", "test/core", "test/data", "test/unit"]
5 changes: 5 additions & 0 deletions metaflow/R.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import imp
from tempfile import NamedTemporaryFile

from metaflow.parameters import register_main_flow

from .util import to_bytes

R_FUNCTIONS = {}
Expand Down Expand Up @@ -103,6 +105,8 @@ def run(
module = imp.load_source("metaflowR", tmp.name)
flow = module.FLOW(use_cli=False)

register_main_flow(module.FLOW)

from . import exception
from . import cli

Expand All @@ -112,6 +116,7 @@ def run(
args=metaflow_args,
handle_exceptions=False,
entrypoint=full_cmdline[: -len(metaflow_args)],
standalone_mode=False,
)
except exception.MetaflowException as e:
cli.print_metaflow_exception(e)
Expand Down
2 changes: 1 addition & 1 deletion metaflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class and related decorators.
from .current import current

# Flow spec
from .flowspec import FlowSpec
from .flowspec import FlowSpec, FlowSpecMeta

from .parameters import Parameter, JSONTypeClass

Expand Down
2 changes: 0 additions & 2 deletions metaflow/_vendor/click/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def filename_to_ui(value):
value = value.decode(get_filesystem_encoding(), "replace")
return value


else:
import io

Expand Down Expand Up @@ -725,7 +724,6 @@ def get_winterm_size():
).srWindow
return win.Right - win.Left, win.Bottom - win.Top


else:

def _get_argv_encoding():
Expand Down
13 changes: 7 additions & 6 deletions metaflow/_vendor/click/_termui_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,9 @@ def edit_file(self, filename):
environ = None
try:
c = subprocess.Popen(
'{} "{}"'.format(editor, filename), env=environ, shell=True,
'{} "{}"'.format(editor, filename),
env=environ,
shell=True,
)
exit_code = c.wait()
if exit_code != 0:
Expand Down Expand Up @@ -563,11 +565,11 @@ def _unquote_file(url):


def _translate_ch_to_exc(ch):
if ch == u"\x03":
if ch == "\x03":
raise KeyboardInterrupt()
if ch == u"\x04" and not WIN: # Unix-like, Ctrl+D
if ch == "\x04" and not WIN: # Unix-like, Ctrl+D
raise EOFError()
if ch == u"\x1a" and WIN: # Windows, Ctrl+Z
if ch == "\x1a" and WIN: # Windows, Ctrl+Z
raise EOFError()


Expand Down Expand Up @@ -614,14 +616,13 @@ def getchar(echo):
func = msvcrt.getwch

rv = func()
if rv in (u"\x00", u"\xe0"):
if rv in ("\x00", "\xe0"):
# \x00 and \xe0 are control characters that indicate special key,
# see above.
rv += func()
_translate_ch_to_exc(rv)
return rv


else:
import tty
import termios
Expand Down
2 changes: 1 addition & 1 deletion metaflow/_vendor/click/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def pop_context():


def resolve_color_default(color=None):
""""Internal helper to get the default value of the color flag. If a
""" "Internal helper to get the default value of the color flag. If a
value is passed it's returned unchanged, otherwise it's looked up from
the current context.
"""
Expand Down
4 changes: 2 additions & 2 deletions metaflow/_vendor/click/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ def echo(message=None, file=None, nl=True, err=False, color=None):
message = text_type(message)

if nl:
message = message or u""
message = message or ""
if isinstance(message, text_type):
message += u"\n"
message += "\n"
else:
message += b"\n"

Expand Down
2 changes: 1 addition & 1 deletion metaflow/_vendor/v3_5/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Empty file
# Empty file
Loading