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

Merge upstream up to netflix/metaflow 2.5.1 #155

Closed
wants to merge 185 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
48e37be
Create a shadowed module when overriding in metaflow_custom (#609)
romain-intel Jul 14, 2021
c9acd1e
remove METAFLOW_ATTEMPT (#594)
oavdeev Jul 16, 2021
906b357
Allow Metaflow Custom packages to define additional suffixes to packa…
romain-intel Jul 16, 2021
d0d3d3d
Add inputs to task_pre_step (#615)
romain-intel Jul 17, 2021
54b1099
Refactor @resources decorator (#617)
savingoyal Jul 19, 2021
a11f7ea
Add an option to define your own AWS client provider (#620)
romain-intel Jul 20, 2021
c1e465b
Add S3 tests (#613)
romain-intel Jul 23, 2021
1d28f85
silence tar timestamp warnings (#627)
oavdeev Jul 27, 2021
aa7c73b
Handle None as default parameters properly in AWS Step Functions (#630)
savingoyal Jul 29, 2021
0575f8d
IncludeFile now returns the included file in the client (#607)
romain-intel Jul 29, 2021
ed877dd
Add resource tags to AWS Batch jobs (#631)
savingoyal Jul 29, 2021
9f832e6
New patch release (#633)
savingoyal Jul 30, 2021
74bb0d7
Bug fix with s3tail exception (#635)
savingoyal Aug 6, 2021
0633e35
Revert "IncludeFile now returns the included file in the client (#607…
savingoyal Aug 11, 2021
8e89245
patch release (#639)
savingoyal Aug 11, 2021
9d06447
Update Unbounded Foreach Test in the case of a Conda environment (#626)
romain-intel Aug 16, 2021
7beaff6
Properly allow full toplevel module overrides in metaflow_custom (#623)
romain-intel Aug 17, 2021
0d052e8
allow to mount host volumes in AWS Batch (#640)
oavdeev Aug 20, 2021
11466d6
Handle parameters as `foreach vars` (#652)
savingoyal Aug 23, 2021
2d5000c
host_volumes for batch now takes an array (#655)
oavdeev Aug 23, 2021
be03f61
Do not override cov params if rcfile is set (#653)
raubitsj Aug 23, 2021
c487951
Patch release - 2.3.5 (#656)
savingoyal Aug 23, 2021
fbd6e6a
Update typo in documentation (#657)
savingoyal Aug 23, 2021
53eb56d
Add data tests script (#658)
oavdeev Aug 24, 2021
a3b72ac
Add testing context for aws bat ch (#669)
oavdeev Aug 25, 2021
c1af4c7
allow dots in host_volumes (#676)
oavdeev Aug 31, 2021
6aa9a75
Conda environment now applys underlying environment's decorators (#660)
bishax Aug 31, 2021
d453859
Representation change for `task.exception` (#679)
valayDave Sep 1, 2021
cdd58cf
Fixes recursion error when METAFLOW_DEFAULT_ENVIRONMENT=conda (#674)
bishax Sep 7, 2021
78b7ec3
Patch release - 2.3.6 (#687)
savingoyal Sep 8, 2021
dc310d0
Terminate task-level sidecars after `task_finished` hook has been exe…
savingoyal Sep 9, 2021
8cfc01a
Modify datastore availability for `task_pre_step` decorator hook (#688)
savingoyal Sep 9, 2021
4e07774
Fix error message for _version call for metadata service (#690)
savingoyal Sep 9, 2021
9cafaca
Rename `metaflow_custom` to `metaflow_extensions` (#691)
savingoyal Sep 9, 2021
76f7d23
rename metaflow-extensions test (#693)
savingoyal Sep 9, 2021
bd3705a
[Perf] Only passdown parameters to datastore for the join step (#694)
savingoyal Sep 9, 2021
2f15f43
Emit project related tags from within project decorator (#695)
savingoyal Sep 10, 2021
63ee02b
Datatools changes for convergence (#697)
savingoyal Sep 13, 2021
50e8765
Datatools changes from Convergence branch (#698)
savingoyal Sep 13, 2021
9f42be6
Spell parameter correctly in parameter.R (#708)
cclauss Sep 19, 2021
8126e80
Fix typos discovered by codespell (#709)
cclauss Sep 21, 2021
5ad3742
Make the number of S3 retries configurable (#700)
romain-intel Sep 22, 2021
bcd9ed4
Tag metadata with attempt_id (#702)
romain-intel Sep 24, 2021
4676f66
Undefined name: from .current import current for line 132 (#716)
cclauss Sep 24, 2021
9504c2c
Don't forget "self" in class methods (#715)
cclauss Sep 24, 2021
1572952
[Breaking] Modify return type of created_at/finished_at to datetime (…
savingoyal Sep 24, 2021
2410ec0
Conda _call_conda should print the stderr in case of error (#706)
akyrola Sep 24, 2021
4c8c470
New Datastore abstraction for Metaflow (#580)
romain-intel Sep 24, 2021
5ece6ad
Missed attempt_id on attempt_done (#724)
romain-intel Sep 29, 2021
0f32270
Retrieve flows from global environment (#723)
mdneuzerling Sep 29, 2021
8e379bb
cast s3_retry_count to integer so it can be used with range() (#727)
saikonen Sep 29, 2021
1898813
from metaflow.sidecar_messages import Message for line 13 (#718)
cclauss Sep 30, 2021
1abc516
Fix two issues with MetaflowCode and get_data (#728)
msavela Oct 1, 2021
320b8a9
Fix bug with current.paramter_names (#731)
savingoyal Oct 2, 2021
6c19881
Bump actions/setup-python to v2 for tests (#736)
savingoyal Oct 4, 2021
ab8a9c6
Mute R tests (#737)
savingoyal Oct 4, 2021
0d3ef33
Minor release - 2.4.0 (#738)
romain-intel Oct 4, 2021
221e539
Fix case when UBF is 'none' and should be a None value (#743)
romain-intel Oct 8, 2021
c561622
Add Python interpreter to execution PATH for AWS Batch (#735)
savingoyal Oct 11, 2021
6728a64
Remove the propagation of PYTHONPATH in the Conda environment (#745)
romain-intel Oct 11, 2021
cdd4783
Making `DataStorage.list_content` have consistent Behaviour (#755)
valayDave Oct 13, 2021
2ab7ff5
Better cleanup of env escape client/server (#760)
romain-intel Oct 14, 2021
8a54a42
Close datastore after task_finished has been invoked (#757)
savingoyal Oct 14, 2021
100e1a9
Revert "Close datastore after task_finished has been invoked (#757)" …
savingoyal Oct 14, 2021
e2aa6a3
Refactor @batch decorator (#618)
savingoyal Oct 14, 2021
f7d54d6
Kubernetes support for Metaflow (#644)
savingoyal Oct 15, 2021
6fa25be
k8s configuration wizard (#766)
savingoyal Oct 15, 2021
96f6739
handling exceptions for non-picklizable artifacts (#764)
valayDave Oct 18, 2021
b9592e0
Update R tests to use R 4.1.1 (#773)
savingoyal Oct 18, 2021
8036368
Make tags sets instead of lists; remove defaults of [] in favor of No…
romain-intel Oct 18, 2021
0ebdd2a
remove region env variable for @kubernetes (#774)
savingoyal Oct 18, 2021
4e2bea4
Per attempt task (#725)
romain-intel Oct 18, 2021
1f30607
Patch release for Metaflow (#775)
savingoyal Oct 18, 2021
a22f96f
fix use of renamed _flow_ds_type (#779)
saikonen Oct 21, 2021
444489a
Improved error messages when a problem arises in the datastore (#781)
romain-intel Oct 22, 2021
2c75494
Fix an issue when using the client for a task that has started but no…
romain-intel Oct 22, 2021
eee086a
Revert "Close datastore after task_finished has been invoked (#757)" …
savingoyal Oct 25, 2021
95c5f83
Patch release for Metaflow (#784)
savingoyal Oct 26, 2021
5020ca8
Fix a race condition when querying for artifacts of a running task (#…
romain-intel Oct 28, 2021
ac686b3
Fix issue where a "soft" failure would not be retried in the presence…
romain-intel Oct 28, 2021
cc829c4
PEP8: Avoid bare except (#717)
cclauss Oct 28, 2021
4a52201
Upgrade pandas version in tutorials to 1.3.3 (#707)
akyrola Oct 28, 2021
5186c6c
Setup black as formatter in GH actions (#771)
savingoyal Oct 28, 2021
db20d4e
Fix Python version logic that would fail with Py 4 (#792)
cclauss Oct 29, 2021
d68ee36
Fix improper version display on SFN with extensions (#794)
romain-intel Oct 29, 2021
53789f5
Patch release for Metaflow (#795)
romain-intel Oct 29, 2021
2a46edc
Add head_ref to branch name for black branch (#797)
savingoyal Nov 1, 2021
fe60f52
add pre-commit (#793)
oavdeev Nov 1, 2021
bf59093
Remove auto-formatter for black (#800)
savingoyal Nov 1, 2021
dc74dde
fix reading METAFLOW_SERVICE_RETRY_COUNT from env (#802)
oavdeev Nov 1, 2021
d8646b9
make catch/retry test not wait to retry (otherwise takes too long on …
oavdeev Nov 2, 2021
29c09a9
Multinode UBF support for Metaflow core
akyrola Nov 3, 2021
7e3611f
batch plugin multinode support
akyrola Nov 3, 2021
ac7d7df
Addressed an issue with class members (#804)
romain-intel Nov 4, 2021
e9158ba
Pipe logs to $cwd/.logs instead of /logs for @batch & @kubernetes (#807)
savingoyal Nov 4, 2021
e778f5d
fix formatting from #804 (#811)
oavdeev Nov 4, 2021
ea74c46
mflog changes for supporting AWS Lambda (#801)
savingoyal Nov 5, 2021
a668785
add a blurb about using black to the README (#812)
oavdeev Nov 5, 2021
e679b71
add default image config option as described in #489 (#813)
oavdeev Nov 5, 2021
ddc2009
Fix an issue with load_artifacts when several artifacts have the same…
romain-intel Nov 9, 2021
423f9fa
UBF with cluster_size
akyrola Nov 10, 2021
aa98660
Local test for multinode
akyrola Nov 10, 2021
6d0d61d
rename multinode/clustersize, move to plugins
akyrola Nov 15, 2021
32ad057
lint parallel steps
akyrola Nov 15, 2021
b206c13
Fail-fast for AWS Step functions and Kubernetes with parallel nodes.
akyrola Nov 15, 2021
7ae1139
merged
akyrola Nov 15, 2021
0f78f89
current parallel status
akyrola Nov 15, 2021
2609e8e
Rename multinode to parallel; add new CONTROL_AND_MAPPER tag
akyrola Nov 15, 2021
8009bc2
fix num tasks in waiting, enable conda for controls
akyrola Nov 15, 2021
0f09a1d
read default k8s namespace from config (#823)
oavdeev Nov 15, 2021
cb2e2ea
unit test for basic parallel
akyrola Nov 17, 2021
584b7e1
Add 'last modified' to S3 object (#778)
akyrola Nov 17, 2021
d5e51e9
a couple of small issues in s3 error handling (#821)
oavdeev Nov 22, 2021
931c0c7
bump version to 2.4.4 (#843)
oavdeev Nov 29, 2021
5297918
Allow CLI args that are falsy but not False or None (#828)
mdneuzerling Nov 30, 2021
f17bd79
Fix control task handling for catch decorator.
akyrola Nov 29, 2021
0f2b23d
use underscores for task ids
akyrola Nov 30, 2021
e72712a
Remove unused module + enhance code patterns (#849)
alaabenfatma Dec 5, 2021
aa51c0b
Fix timestamp issue for python2 in s3 (#846)
akyrola Dec 5, 2021
e55df00
Address another issue with load_artifacts (#833)
romain-intel Dec 5, 2021
90fc586
Address comments from Romain
akyrola Dec 7, 2021
176a4c3
Add disable_parallel to test contexts
akyrola Dec 7, 2021
4dbd3c6
use mflog redirect_stream wrapper correctly with SFN (#851)
oavdeev Dec 8, 2021
747b86c
Bump version to 2.4.5 (#856)
oavdeev Dec 9, 2021
5305899
`add_to_package` decorator hook. (#834)
valayDave Dec 9, 2021
1e52447
`origin-task-id` in `Task` metadata and `origin_pathspec` property in…
valayDave Dec 9, 2021
edc140b
add default value to the num_parallel in batch cli
akyrola Dec 10, 2021
11a68f9
Merge branch 'master' into ubf_local_test
akyrola Dec 15, 2021
2767a21
Remove CONTROL_AND_MAPPER_TASK_TAG; change behavior of CONTROL_TAG wi…
akyrola Dec 15, 2021
4499dba
Remove python2 test contexts
akyrola Dec 15, 2021
f83db1f
fix TIMEOUT variable lookup
akyrola Dec 15, 2021
f5de894
replace forgotten reference to TIMEOUT
akyrola Dec 16, 2021
4f445a7
run black
akyrola Dec 16, 2021
b8af1b7
Merge pull request #867 from akyrola/remove_py2_tests
tuulos Dec 16, 2021
22aeb04
Find input handling for parallel jobs.
akyrola Dec 16, 2021
c4a38ea
merge
akyrola Dec 16, 2021
6e75784
Adjust NestedUnboundedForeachTest to the new task iteration.
akyrola Dec 16, 2021
7745b55
Merge pull request #827 from akyrola/ubf_local_test
tuulos Dec 16, 2021
8b9c5a7
fix @catch decorator for parallel
tuulos Dec 16, 2021
100e1c8
Merge pull request #868 from Netflix/fix-catch-on-parallel
tuulos Dec 17, 2021
3ca00eb
Stacked @card PR : Base (Card Decorator, Card Datastore, Card CLI + M…
valayDave Dec 17, 2021
677b33b
bump version to 2.4.7 (#870)
oavdeev Dec 17, 2021
10b5d35
Set METAFLOW_RUNTIME_ENVIRONMENT to "kubernetes" not eks (#869)
oavdeev Dec 18, 2021
0a1330c
`aws_retry`'s `S3_RETRY_COUNT` kept min at 1 (#876)
valayDave Dec 22, 2021
dad0401
Fixes #589: validation logic to capture reserved keywords (#830)
0xrushi Jan 3, 2022
17e1148
Removed multiple unused modules and non-accessed assignments (#865)
alaabenfatma Jan 3, 2022
4ba77d0
Checks embed URL param and adds it as a class (#877)
obgibson Jan 5, 2022
53ab9d4
Symlink the INFO file in Conda environments (#809)
romain-intel Jan 5, 2022
e9ab02b
fix argument type handling for host_volumes when used with --with and…
oavdeev Jan 6, 2022
a06d941
Remove default use of repo.anaconda.com (#832)
romain-intel Jan 7, 2022
959f2ed
Replaced border-collapse by border-spacing:0, and removed the cell bo…
obgibson Jan 7, 2022
1b2980c
ignore `black .` issue (#885)
ryan-williams Jan 7, 2022
25887ae
Bump the package version to 2.4.8 (#889)
oavdeev Jan 11, 2022
c6ff2af
remove unused code in BatchJob.execute() (#883)
oavdeev Jan 14, 2022
c67ce9e
Small typos in testing framework (#887)
romain-intel Jan 14, 2022
2598013
In some cases, the environment escape server process would find the w…
romain-intel Jan 14, 2022
0d7548f
Fail early step function create with @parallel. (#905)
akyrola Jan 15, 2022
d753dbf
Pytorch Parallel Decorator and test (#871)
akyrola Jan 15, 2022
a090e09
fix small typos (#908)
nhtsai Jan 17, 2022
adf0cb4
fixed cli command when task_id provided (#890)
zhugejun Jan 17, 2022
6c87098
Store information about the DAG being executed in an artifact (#822)
romain-intel Jan 18, 2022
bf3aae3
Fix issue when running on batch with local metadata (#902)
romain-intel Jan 18, 2022
e6f1f00
fix default resource math (fixes #467) (#810)
oavdeev Jan 18, 2022
7b948c6
run datastore tests on master branch pushes too (#909)
oavdeev Jan 18, 2022
1f5afa4
Fix datatest broken by previous commit (#912)
romain-intel Jan 18, 2022
1c97086
Bump version to 2.4.9 (#913)
oavdeev Jan 19, 2022
3f7bfa6
Update README for metaflow/R (#915)
savingoyal Jan 20, 2022
45be4ac
Ns package support (#892)
romain-intel Jan 24, 2022
44f1ae7
Fix issue with @batch and num_parallel=1; improve status log. (#904)
akyrola Jan 24, 2022
885810a
Fix issue in Step Functions integration with CLI defined decorators (…
savingoyal Jan 25, 2022
5a95ce6
add unit test for compute_resource_attributes (#922)
oavdeev Jan 25, 2022
fea7d41
Vendor importlib_metadata (#925)
savingoyal Jan 25, 2022
01b7149
Fix compute_resources to take into account string values (#919)
romain-intel Jan 25, 2022
44cb29f
version bump (#921)
valayDave Jan 25, 2022
c247f9f
Stacked @card v1.2 : multiple `@card` decorators (#893)
valayDave Jan 25, 2022
c52c710
Bump follow-redirects in /metaflow/plugins/cards/ui (#927)
dependabot[bot] Jan 26, 2022
f73eb71
Bump marked from 4.0.8 to 4.0.10 in /metaflow/plugins/cards/ui (#926)
dependabot[bot] Jan 26, 2022
8753440
Removing some code bits from `metaflow.cards` (#928)
valayDave Jan 26, 2022
7d1697d
Introduce Mamba as a dependency solver for `@conda` (#918)
savingoyal Jan 28, 2022
fed10b8
Added base64 Transformation for json object (#933)
valayDave Feb 1, 2022
62f5e52
Vendor click as dependency for Metaflow (#929)
savingoyal Feb 3, 2022
8c2f776
Python Multi Version Test Suite (#946)
valayDave Feb 15, 2022
a47dd19
bump version to 2.5.1 (#956)
oavdeev Feb 15, 2022
e6b5ba2
Merge - containing conflicts to netflix/metaflow 2.5.1
cloudw Feb 17, 2022
5bf6630
Merge branch 'feature/kfp' into merge_upstream_2_5_1
cloudw Mar 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 2 additions & 62 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,8 @@ on:
release:
types: [published]
jobs:
test:
name: ${{ matrix.lang }} tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
lang: [Python, R]

steps:
- uses: actions/checkout@v2

- name: Set up Python 2.x
if: matrix.lang == 'Python'
uses: actions/setup-python@v1
with:
python-version: '2.x'

- name: Install Python 2.x dependencies
if: matrix.lang == 'Python'
run: |
python2 -m pip install --upgrade pip
python2 -m pip install tox

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: '3.7'

- name: Install Python 3.x dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox numpy

- name: Set up R 3.6
if: matrix.lang == 'R'
uses: r-lib/actions/setup-r@v1
with:
r-version: '3.6.3'

- name: Install R 3.6 system dependencies
if: matrix.lang == 'R' && matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev qpdf libgit2-dev

- name: Install R 3.6 Rlang dependencies
if: matrix.lang == 'R'
run: |
python3 -m pip install .
Rscript -e 'install.packages("devtools", repos="https://cloud.r-project.org", Ncpus=8)'
Rscript -e 'devtools::install_deps("R", dependencies=TRUE, repos="https://cloud.r-project.org", upgrade="default")'
R CMD INSTALL R
Rscript -e 'install.packages(c("data.table", "caret", "glmnet", "Matrix", "rjson"), repos="https://cloud.r-project.org", Ncpus=8)'

- name: Execute R tests
if: matrix.lang == 'R'
run: |
cd R/tests
Rscript run_tests.R

- name: Execute Python tests
if: matrix.lang == 'python'
run: tox

test:
uses: './.github/workflows/test.yml'
deploy:
needs: test
runs-on: ubuntu-latest
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/s3_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: pr-datastore-tests

on:
push:
branches:
- master
pull_request_target:
types:
- opened
- synchronize
- labeled

jobs:
test_data:
if: (github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'ok-to-test')) || (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved')))
name: S3 data tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]

steps:
- uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
submodules: recursive
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install Python 3.x dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox numpy pytest click boto3 requests pylint pytest-benchmark
- name: Execute Data tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
METAFLOW_S3_TEST_ROOT: ${{ secrets.METAFLOW_S3_TEST_ROOT }}
run: |
cd test/data
PYTHONPATH=$(pwd)/../../ python3 -m pytest --benchmark-skip -x -s -v
70 changes: 66 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,94 @@ on:
pull_request:
branches:
- master
<<<<<<< HEAD
- feature/kfp
=======
workflow_call:

>>>>>>> master
jobs:
test:
name: ${{ matrix.lang }} tests on ${{ matrix.os }}
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]

Python:
name: core / Python ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
<<<<<<< HEAD
lang: [Python]
=======
ver: ['3.5', '3.6', '3.7', '3.8', '3.9','3.10',]
>>>>>>> master

steps:
- uses: actions/checkout@v2

<<<<<<< HEAD
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
=======
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.ver }}
>>>>>>> master

- name: Install Python 3.x dependencies
- name: Install Python ${{ matrix.ver }} dependencies
run: |
python3 -m pip install --upgrade pip
<<<<<<< HEAD
python3 -m pip install tox numpy black

- name: Python Code Format Check
run: black --target-version py39 --diff --check ./metaflow/plugins/kfp/*.py
=======
python3 -m pip install tox numpy

- name: Execute Python tests
if: matrix.lang == 'python'
run: tox

R:
name: core / R ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ver: ['4.0', '4.1']

steps:
- uses: actions/checkout@v2
- name: Set up ${{ matrix.ver }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.ver }}

- name: Install R ${{ matrix.ver }} system dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev qpdf libgit2-dev

- name: Install R ${{ matrix.ver }} Rlang dependencies
run: |
python3 -m pip install .
Rscript -e 'install.packages("devtools", repos="https://cloud.r-project.org", Ncpus=8)'
Rscript -e 'devtools::install_deps("R", dependencies=TRUE, repos="https://cloud.r-project.org", upgrade="default")'
R CMD INSTALL R
Rscript -e 'install.packages(c("data.table", "caret", "glmnet", "Matrix", "rjson"), repos="https://cloud.r-project.org", Ncpus=8)'

- name: Execute R tests
run: |
cd R/tests
Rscript run_tests.R
>>>>>>> master


3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ R/.Rbuildignore
.Rproj.user

.DS_Store
.env
node_modules
main.js.map

.project
.pydevproject
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
exclude: 'test/core/tests/card_timeout.py'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: check-yaml
- id: check-json
- repo: https://github.com/ambv/black
rev: 21.9b0
hooks:
- id: black
language_version: python3
exclude: "^metaflow/_vendor/"
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include LICENSE
include metaflow/plugins/cards/card_modules/*.html
include metaflow/plugins/cards/card_modules/*.js
include metaflow/plugins/cards/card_modules/*.css
2 changes: 1 addition & 1 deletion R/R/package.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ set_global_variable <- function(key, val, pos = 1) {
#' @export
metaflow <- function(cls, ...) {
set_global_variable(cls, Flow$new(cls, list(...)))
get(cls)
get(cls, pos = 1)
}
2 changes: 1 addition & 1 deletion R/R/parameter.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param flow metaflow object
#' @param parameter name of the parameter
#' @param required logical (defaults to FALSE) denoting if
#' paramter is required as an argument to \code{run} the flow
#' parameter is required as an argument to \code{run} the flow
#' @param help optional help text
#' @param default optional default value of the parameter
#' @param type optional type of the parameter
Expand Down
2 changes: 1 addition & 1 deletion R/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Getting up and running with Metaflow is easy. Install Metaflow from [github](htt

>```R
>devtools::install_github("Netflix/metaflow", subdir="R")
>metaflow::install()
>metaflow::install_metaflow()
>```

and access tutorials by typing:
Expand Down
2 changes: 1 addition & 1 deletion R/inst/tutorials/04-helloaws/helloaws.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Episode 04-helloaws: Look Mom, We're in the Cloud"
output: html_notebook
---
In HellowAWSFlow, the 'start' and 'end' steps were run locally, while the 'hello' step was run remotely on AWS batch. Since we are using AWS, data artifacts and metdata were stored remotely. This means you can use the client to access information about any flow from anywhere. This notebook shows you how.
In HellowAWSFlow, the 'start' and 'end' steps were run locally, while the 'hello' step was run remotely on AWS batch. Since we are using AWS, data artifacts and metadata were stored remotely. This means you can use the client to access information about any flow from anywhere. This notebook shows you how.

## Import the metaflow client
```{r}
Expand Down
2 changes: 1 addition & 1 deletion R/inst/tutorials/05-statistics-redux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ If you are using RStudio, you can replace the last line `run()` with
and run by `source("stats.R")`.

##### Inspect the results:
Open the R markdown file ```02-statistics/stats.Rmd``` in your RStudio and re-run the cells. You can acccess
Open the R markdown file ```02-statistics/stats.Rmd``` in your RStudio and re-run the cells. You can access
the artifacts stored in AWS S3 from your local RStudio session.
2 changes: 1 addition & 1 deletion R/inst/tutorials/07-autopilot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ run(package_suffixes=".R,.csv", step_functions="trigger")
for SFN trigger. You can then directly run `source("stats.R`)` in RStudio.

##### Inspect the results:
Open the R Markdown file```07-autopilot/stats.Rmd``` in your RStudio and re-run the cells. You can acccess
Open the R Markdown file```07-autopilot/stats.Rmd``` in your RStudio and re-run the cells. You can access
the artifacts stored in AWS S3 from your local RStudio session.
2 changes: 1 addition & 1 deletion R/man/parameter.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions R/tests/testthat/test-flow.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
context("test-flow.R")

teardown(if ("sqrt" %in% names(.GlobalEnv)) rm("sqrt", envir = .GlobalEnv))

test_that("header() formatted correctly", {
skip_if_no_metaflow()
actual <- header("TestFlow")
Expand Down Expand Up @@ -88,3 +90,11 @@ test_that("get_functions() works", {
)
expect_equal(actual, expected)
})

test_that("flow names are assigned to global environment", {
expect_false("sqrt" %in% names(.GlobalEnv))
step(metaflow("sqrt"), step = "start")
expect_true("sqrt" %in% names(.GlobalEnv))
expect_s3_class(get("sqrt", envir = .GlobalEnv), "Flow")
expect_equal(base::sqrt(4), 2)
})
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ There are several ways to get in touch with us:
* Chat with us on: http://chat.metaflow.org

## Contributing

We welcome contributions to Metaflow. Please see our [contribution guide](https://docs.metaflow.org/introduction/contributing-to-metaflow) for more details.

### Code style

We use [black](https://black.readthedocs.io/en/stable/) as a code formatter. The easiest way to ensure your commits are always formatted with the correct version of `black` it is to use [pre-commit](https://pre-commit.com/): install it and then run `pre-commit install` once in your local copy of the repo.
2 changes: 1 addition & 1 deletion docs/Environment escape.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ and produces a JSON-able object (typically a dictionary with string keys and
jsonable objects as values). The decoding is the reverse where a dictionary is
taken from the channel and Python objects are returned.

Transfering exceptions requires a tiny bit more work and this logic can be found
Transferring exceptions requires a tiny bit more work and this logic can be found
in ```exception_transferer.py```; this relies on ```data_transferer.py``` to do
the actual encoding and decoding and ```exception_transferer.py``` merely takes
care of the specificities of extracting the information needed from the
Expand Down
Loading