From 42e84992d44a5257f70fcf62fa0123ee757b8b20 Mon Sep 17 00:00:00 2001 From: Saanidhya Date: Sat, 6 Mar 2021 01:20:51 +0530 Subject: [PATCH 1/2] Added 'valid_return_none' --- dffml/df/base.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dffml/df/base.py b/dffml/df/base.py index be918e0e69..fa6327968a 100644 --- a/dffml/df/base.py +++ b/dffml/df/base.py @@ -252,7 +252,14 @@ def create_definition(name, param_annotation, default=NO_DEFAULT): ) -def op(*args, imp_enter=None, ctx_enter=None, config_cls=None, **kwargs): +def op( + *args, + imp_enter=None, + ctx_enter=None, + config_cls=None, + valid_return_none=True, + **kwargs, +): """ The ``op`` decorator creates a subclass of :py:class:`dffml.df.OperationImplementation` and assigns that @@ -480,7 +487,7 @@ async def convert_asyncgen(outputs): } result = convert_asyncgen(result) - elif result is not None: + elif result is not None and valid_return_none: result = { list(self.parent.op.outputs.keys())[0]: result } From bbec6129f00b771d57f2c2889de67aed85300d77 Mon Sep 17 00:00:00 2001 From: Saanidhya Date: Sat, 6 Mar 2021 13:06:37 +0530 Subject: [PATCH 2/2] Replaced master with main --- CHANGELOG.md | 2 +- Dockerfile | 2 +- README.md | 2 +- docs/contributing/dev_env.rst | 4 ++-- docs/contributing/git.rst | 4 ++-- docs/contributing/maintainers.rst | 4 ++-- docs/index.rst | 4 ++-- docs/installation.rst | 6 +++--- news/origin_master_August_15_2019.txt | 6 +++--- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43ca11d2dc..d65bc8bed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -269,7 +269,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `allowempty` added to source config parameters. - Quickstart document to show how to use models from Python. - The latest release of the documentation now includes a link to the - documentation for the master branch (on GitHub pages). + documentation for the main branch (on GitHub pages). - Virtual environment, GitPod, and Docker development environment setup notes to the CONTRIBUTING.md file. - Changelog now included in documenation website. diff --git a/Dockerfile b/Dockerfile index e446bd0e75..7c323aa379 100644 --- a/Dockerfile +++ b/Dockerfile @@ -87,7 +87,7 @@ RUN apt-get update && \ # Here we install DFFML and all the plugins # The release of dffml we're using, latest is the latest PyPi release, master is -# the master branch +# the main branch ARG DFFML_RELEASE=latest ENV DFFML_RELEASE ${DFFML_RELEASE} diff --git a/README.md b/README.md index 773b935f88..45c60c1740 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ DFFML aims to be the easiest and most convenient way to use Machine Learning. Documentation for the latest release is hosted at https://intel.github.io/dffml/ -Documentation for the master branch is hosted at +Documentation for the main branch is hosted at https://intel.github.io/dffml/master/index.html ## Contributing diff --git a/docs/contributing/dev_env.rst b/docs/contributing/dev_env.rst index c77e949b1c..e185bd7b5b 100644 --- a/docs/contributing/dev_env.rst +++ b/docs/contributing/dev_env.rst @@ -41,8 +41,8 @@ development mode. This docs without ``/master/`` in the URL are built from the latest release. - The docs with ``/master/`` in the URL are built from the *master* branch. - The master branch is what you get when you clone the Git repo, which we're + The docs with ``/master/`` in the URL are built from the *main* branch. + The main branch is what you get when you clone the Git repo, which we're about to do. Installing to your home directory will reduce permissions issues. To do diff --git a/docs/contributing/git.rst b/docs/contributing/git.rst index fe01e6ebc2..cc2d0bafca 100644 --- a/docs/contributing/git.rst +++ b/docs/contributing/git.rst @@ -96,7 +96,7 @@ review your work or help you figure out what might be going wrong or how you could solve an issue your stuck on. Before you are get help, a review, or a final review, make sure to fetch the -latest changes from the master branch and ``merge`` or ``rebase`` them into your +latest changes from the main branch and ``merge`` or ``rebase`` them into your branch. When you are ready for final review, remove the ``WIP:`` prefix or draft status. @@ -146,7 +146,7 @@ is okay. For the tests in the various plugins: -- You need to grab the latests changes from the master branch. Maybe you need to +- You need to grab the latests changes from the main branch. Maybe you need to adapt to them, for example if something got renamed, check the changelog. - You need to add any dependencies (``pip install ...``) you need to the diff --git a/docs/contributing/maintainers.rst b/docs/contributing/maintainers.rst index 078e4b1d0c..058f19a290 100644 --- a/docs/contributing/maintainers.rst +++ b/docs/contributing/maintainers.rst @@ -52,11 +52,11 @@ Doing a Release - Push the new branch (if created) and the tag -- Switch to the master branch +- Switch to the main branch - Cherry pick the release commit from the new branch, but not the pinning commit -- Push the master branch +- Push the main branch .. code-block:: console diff --git a/docs/index.rst b/docs/index.rst index a79a04d356..6e53112cc3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,7 +33,7 @@ Output: {'Years': 6, 'Expertise': 13, 'Trust': 0.7, 'Salary': 70.0} {'Years': 7, 'Expertise': 15, 'Trust': 0.8, 'Salary': 80.0} -This is the documentation for the latest release, documentation for the master +This is the documentation for the latest release, documentation for the main branch can be found `here `_. .. toctree:: @@ -79,7 +79,7 @@ branch can be found `here `_. :caption: Community GitHub - Master Branch Docs + Main Branch Docs publications contact contributing/index diff --git a/docs/installation.rst b/docs/installation.rst index b1c4dab177..2e24e58a62 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -109,11 +109,11 @@ repository, you can append ``[all]``. (.venv) C:\Users\username> python -m pip install -U dffml[all] -f https://download.pytorch.org/whl/torch_stable.html -Master Branch +Main Branch ------------- If you want to stay on the bleeding edge of bug fixes, etc. You can install from -the master branch. +the main branch. .. tabs:: @@ -153,7 +153,7 @@ and replace ``-`` with ``/``. There's an online IDE based on Theia (similar to VS Code) called GitPod that gives you a setup development environment to get started working with/on DFFML -right away. However, it comes with the master branch installed, you'll need to +right away. However, it comes with the main branch installed, you'll need to run the above commands to get the lastest released version. .. image:: https://gitpod.io/button/open-in-gitpod.svg diff --git a/news/origin_master_August_15_2019.txt b/news/origin_master_August_15_2019.txt index 8d7ab71bc6..86105615e0 100644 --- a/news/origin_master_August_15_2019.txt +++ b/news/origin_master_August_15_2019.txt @@ -2,7 +2,7 @@ This is our first issue of the newsletter! What's the occasion? Lot's been -happing lately in the master branch. We're due for a release soon! The next +happing lately in the main branch. We're due for a release soon! The next release will feature changes to the following areas: - Sources @@ -13,7 +13,7 @@ release will feature changes to the following areas: =================================== Sources ==================================== -Labels for CSV sources were merged into master. Enabling users to save multiple +Labels for CSV sources were merged into main. Enabling users to save multiple versions of datasets within the same CSV file. Example: @@ -47,7 +47,7 @@ Work continues on the MySQL and Hadoop Sources. Machine Learning model packages from scratch and using the scikit machine -learning library (sklearn) have been merged into master. With these additions +learning library (sklearn) have been merged into main. With these additions developers will be able to use DFFML to make numerical predictions. Example: