Skip to content

Commit

Permalink
de-quote some strings (flyteorg#380)
Browse files Browse the repository at this point in the history
* de-quote some strings

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Dequote more stuff

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* dequote more stuff

Signed-off-by: Haytham Abuelfutuh <[email protected]>
  • Loading branch information
EngHabu authored Sep 1, 2021
1 parent 7d1fc86 commit a44d527
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
# Next, we define the reference tasks. A :py:func:`flytekit.reference_task` references the Flyte tasks that have already been defined, serialized, and registered.
# The primary advantage of using a reference task is to reduce the redundancy; we needn't define the task(s) again if we have multiple datasets that need to be feature-engineered.
#
# .. note::
# .. note::
#
# The Macro ``{{ registration.version }}`` is filled during the registration time by `flytectl register`. This is usually not required for using reference tasks, you should
# ideally bind to a specific version of the entity - task / launchplan. But, in the case of this example, we are registering both the actual task ``sqlite_datacleaning.tasks.mean_median_imputer`` and
# and the workflow that references it. Thus we want it to actually be updated to the version of a specific release of FlyteSnacks. This is why we use the ``{{ registration.version }}`` macro.
# A typical example of reference task would look more like
# The Macro ``{{ registration.version }}`` is filled during the registration time by `flytectl register`. This is usually not required for using reference tasks, you should
# ideally bind to a specific version of the entity - task / launchplan. But, in the case of this example, we are registering both the actual task ``sqlite_datacleaning.tasks.mean_median_imputer`` and
# and the workflow that references it. Thus we want it to actually be updated to the version of a specific release of FlyteSnacks. This is why we use the ``{{ registration.version }}`` macro.
# A typical example of reference task would look more like
#
# .. code-block:: python
# .. code-block:: python
#
# @reference_task(
# project="flytesnacks",
# domain="development",
# name="sqlite_datacleaning.tasks.mean_median_imputer",
# version="d06cebcfbeabc02b545eefa13a01c6ca992940c8", # If using GIT for versioning OR 0.16.0 is using semver
# )
# def mean_median_imputer()
# ...
# @reference_task(
# project="flytesnacks",
# domain="development",
# name="sqlite_datacleaning.tasks.mean_median_imputer",
# version="d06cebcfbeabc02b545eefa13a01c6ca992940c8", # If using GIT for versioning OR 0.16.0 is using semver
# )
# def mean_median_imputer()
# ...
#
@reference_task(
project="flytesnacks",
Expand Down
10 changes: 6 additions & 4 deletions cookbook/core/control_flow/run_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ def sum_diff(a: float, b: float) -> float:
# A useful mental model for consuming outputs of conditions is to think of them like ternary operators in programming
# languages. The only difference being they can be n-ary. In python this is equivalent to
#
# .. code-block:: python
# .. code-block:: python
#
# x = 0 if m < 0 else 1
# x = 0 if m < 0 else 1
@workflow
def consume_outputs(my_input: float, seed: int = 5) -> float:
is_heads = coin_toss(seed=seed)
Expand All @@ -261,5 +261,7 @@ def consume_outputs(my_input: float, seed: int = 5) -> float:
# %%
# As usual local execution does not change
if __name__ == "__main__":
print(f"consume_outputs(0.4) with default seed=5. This should return output of sum_diff => {consume_outputs(my_input=0.4)}")
print(f"consume_outputs(0.4, seed=7), this should return output of square => {consume_outputs(my_input=0.4, seed=7)}")
print(
f"consume_outputs(0.4) with default seed=5. This should return output of sum_diff => {consume_outputs(my_input=0.4)}")
print(
f"consume_outputs(0.4, seed=7), this should return output of square => {consume_outputs(my_input=0.4, seed=7)}")
62 changes: 31 additions & 31 deletions cookbook/integrations/aws/athena/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,37 @@ def no_io_wf():
# `AWS docs <https://docs.aws.amazon.com/quicksight/latest/user/create-a-data-set-athena.html>`__.
# The data is formatted according to this schema:
#
# +----------------------------------------------+
# | country (string) |
# +----------------------------------------------+
# | iso_code (string) |
# +----------------------------------------------+
# | date (string) |
# +----------------------------------------------+
# | total_vaccinations (string) |
# +----------------------------------------------+
# | people_vaccinated (string) |
# +----------------------------------------------+
# | people_fully_vaccinated (string) |
# +----------------------------------------------+
# | daily_vaccinations_raw (string) |
# +----------------------------------------------+
# | daily_vaccinations (string) |
# +----------------------------------------------+
# | total_vaccinations_per_hundred (string) |
# +----------------------------------------------+
# | people_vaccinated_per_hundred (string) |
# +----------------------------------------------+
# | people_fully_vaccinated_per_hundred (string) |
# +----------------------------------------------+
# | daily_vaccinations_per_million (string) |
# +----------------------------------------------+
# | vaccines (string) |
# +----------------------------------------------+
# | source_name (string) |
# +----------------------------------------------+
# | source_website (string) |
# +----------------------------------------------+
# +----------------------------------------------+
# | country (string) |
# +----------------------------------------------+
# | iso_code (string) |
# +----------------------------------------------+
# | date (string) |
# +----------------------------------------------+
# | total_vaccinations (string) |
# +----------------------------------------------+
# | people_vaccinated (string) |
# +----------------------------------------------+
# | people_fully_vaccinated (string) |
# +----------------------------------------------+
# | daily_vaccinations_raw (string) |
# +----------------------------------------------+
# | daily_vaccinations (string) |
# +----------------------------------------------+
# | total_vaccinations_per_hundred (string) |
# +----------------------------------------------+
# | people_vaccinated_per_hundred (string) |
# +----------------------------------------------+
# | people_fully_vaccinated_per_hundred (string) |
# +----------------------------------------------+
# | daily_vaccinations_per_million (string) |
# +----------------------------------------------+
# | vaccines (string) |
# +----------------------------------------------+
# | source_name (string) |
# +----------------------------------------------+
# | source_website (string) |
# +----------------------------------------------+
#
# Let's look out how we can parameterize our query to filter results for a specific country, provided as a user input
# specifying a country iso code.
Expand Down

0 comments on commit a44d527

Please sign in to comment.