tvalentyn commented on code in PR #24804: URL: https://github.com/apache/beam/pull/24804#discussion_r1084587850
########## website/www/site/content/en/get-started/quickstart/python.md: ########## @@ -0,0 +1,224 @@ +--- +title: "Beam Quickstart for Python" +aliases: + - /get-started/quickstart/ + - /use/quickstart/ + - /getting-started/ +--- +<!-- +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Apache Beam Python SDK quickstart + +This quickstart shows you how to run an +[example pipeline](https://github.com/apache/beam-starter-python) written with +the [Apache Beam Python SDK](/documentation/sdks/python), using the +[Direct Runner](/documentation/runners/direct/). The Direct Runner executes +pipelines locally on your machine. + +If you're interested in contributing to the Apache Beam Python codebase, see the +[Contribution Guide](/contribute). + +On this page: + +{{< toc >}} + +## Set up your development environment + +### Check your Python version + +Apache Beam aims to work on released +[Python versions](https://devguide.python.org/versions/) that have not yet +reached end of life, but it may take a few releases until Apache Beam fully +supports the most recently released Python minor version. + +The minimum required Python version is listed in the **Meta** section of the +[apache-beam](https://pypi.org/project/apache-beam/) project page under +**Requires**. The list of all supported Python versions is listed in the +**Classifiers** section at the bottom of the page, under **Programming +Language**. + +Check your Python version by running: + +{{< highlight >}} +python3 --version +{{< /highlight >}} + +If you don't have a Python interpreter, you can download and install it from +the [Python downloads](https://devguide.python.org/versions/) page. + +If you need to install a different version of Python in addition to the version +that you already have, you can find some recommendations in our +[Developer Wiki](https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-InstallingPythoninterpreters). + +## Clone the GitHub repository Review Comment: Let's move `## Clone the GitHub repository` before ` install project dependencies`, then we can make `## Set up your development environment` into its own section, and can reference that section in the old quickstart, instead of repeating the content there. ########## website/www/site/content/en/get-started/quickstart/python.md: ########## @@ -0,0 +1,224 @@ +--- +title: "Beam Quickstart for Python" +aliases: + - /get-started/quickstart/ + - /use/quickstart/ + - /getting-started/ +--- +<!-- +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Apache Beam Python SDK quickstart + +This quickstart shows you how to run an +[example pipeline](https://github.com/apache/beam-starter-python) written with +the [Apache Beam Python SDK](/documentation/sdks/python), using the +[Direct Runner](/documentation/runners/direct/). The Direct Runner executes +pipelines locally on your machine. + +If you're interested in contributing to the Apache Beam Python codebase, see the +[Contribution Guide](/contribute). + +On this page: + +{{< toc >}} + +## Set up your development environment + +### Check your Python version + +Apache Beam aims to work on released +[Python versions](https://devguide.python.org/versions/) that have not yet +reached end of life, but it may take a few releases until Apache Beam fully +supports the most recently released Python minor version. + +The minimum required Python version is listed in the **Meta** section of the +[apache-beam](https://pypi.org/project/apache-beam/) project page under +**Requires**. The list of all supported Python versions is listed in the +**Classifiers** section at the bottom of the page, under **Programming +Language**. + +Check your Python version by running: + +{{< highlight >}} +python3 --version +{{< /highlight >}} + +If you don't have a Python interpreter, you can download and install it from +the [Python downloads](https://devguide.python.org/versions/) page. + +If you need to install a different version of Python in addition to the version +that you already have, you can find some recommendations in our +[Developer Wiki](https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-InstallingPythoninterpreters). + +## Clone the GitHub repository + +Clone or download the +[apache/beam-starter-python](https://github.com/apache/beam-starter-python) +GitHub repository and change into the `beam-starter-python` directory. + +{{< highlight >}} +git clone https://github.com/apache/beam-starter-python.git +cd beam-starter-python +{{< /highlight >}} + +## Create and activate a virtual environment + +A virtual environment is a directory tree containing its own Python +distribution. We recommend using a virtual environment so that all dependencies +of your project are installed in an isolated and self-contained environment. To +set up a virtual environment, run the following commands: + +{{< highlight >}} +# Create a new Python virtual environment. Review Comment: I think this should have `###` instead of `#`? Or is adding a highlight tag taking care of nesting? I didn't look at the rendered page... ########## website/www/site/content/en/get-started/quickstart-py.md: ########## @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> -# Apache Beam Python SDK Quickstart +# WordCount quickstart for Python Review Comment: `The Python SDK supports Python 3.6, 3.7, and 3.8. Beam 2.24.0 was the last release with support for Python 2.7 and 3.5.` can be removed as it is covered in the new guide under `### Check your Python version`. cc: @AnandInguva FYI. ########## website/www/site/content/en/get-started/quickstart/python.md: ########## @@ -0,0 +1,224 @@ +--- +title: "Beam Quickstart for Python" +aliases: + - /get-started/quickstart/ + - /use/quickstart/ + - /getting-started/ +--- +<!-- +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Apache Beam Python SDK quickstart + +This quickstart shows you how to run an +[example pipeline](https://github.com/apache/beam-starter-python) written with +the [Apache Beam Python SDK](/documentation/sdks/python), using the +[Direct Runner](/documentation/runners/direct/). The Direct Runner executes +pipelines locally on your machine. + +If you're interested in contributing to the Apache Beam Python codebase, see the +[Contribution Guide](/contribute). + +On this page: + +{{< toc >}} + +## Set up your development environment + +### Check your Python version + +Apache Beam aims to work on released +[Python versions](https://devguide.python.org/versions/) that have not yet +reached end of life, but it may take a few releases until Apache Beam fully +supports the most recently released Python minor version. + +The minimum required Python version is listed in the **Meta** section of the +[apache-beam](https://pypi.org/project/apache-beam/) project page under +**Requires**. The list of all supported Python versions is listed in the +**Classifiers** section at the bottom of the page, under **Programming +Language**. + +Check your Python version by running: + +{{< highlight >}} +python3 --version +{{< /highlight >}} + +If you don't have a Python interpreter, you can download and install it from +the [Python downloads](https://devguide.python.org/versions/) page. + +If you need to install a different version of Python in addition to the version +that you already have, you can find some recommendations in our +[Developer Wiki](https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-InstallingPythoninterpreters). + +## Clone the GitHub repository + +Clone or download the +[apache/beam-starter-python](https://github.com/apache/beam-starter-python) +GitHub repository and change into the `beam-starter-python` directory. + +{{< highlight >}} +git clone https://github.com/apache/beam-starter-python.git +cd beam-starter-python +{{< /highlight >}} + +## Create and activate a virtual environment + +A virtual environment is a directory tree containing its own Python +distribution. We recommend using a virtual environment so that all dependencies +of your project are installed in an isolated and self-contained environment. To +set up a virtual environment, run the following commands: + +{{< highlight >}} +# Create a new Python virtual environment. +python3 -m venv env + +# Activate the virtual environment. +source env/bin/activate Review Comment: We could expand this a bit (per info from the other quickstart). A common way to activate a virtual environment is to run: `source env/bin/activate` If the above command does not work on your platform, see [venv documentation](https://docs.python.org/3/library/venv.html#how-venvs-work). ########## website/www/site/content/en/get-started/quickstart/python.md: ########## @@ -0,0 +1,224 @@ +--- +title: "Beam Quickstart for Python" +aliases: + - /get-started/quickstart/ + - /use/quickstart/ + - /getting-started/ +--- +<!-- +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +# Apache Beam Python SDK quickstart + +This quickstart shows you how to run an +[example pipeline](https://github.com/apache/beam-starter-python) written with +the [Apache Beam Python SDK](/documentation/sdks/python), using the +[Direct Runner](/documentation/runners/direct/). The Direct Runner executes +pipelines locally on your machine. + +If you're interested in contributing to the Apache Beam Python codebase, see the +[Contribution Guide](/contribute). + +On this page: + +{{< toc >}} + +## Set up your development environment + +### Check your Python version + +Apache Beam aims to work on released +[Python versions](https://devguide.python.org/versions/) that have not yet +reached end of life, but it may take a few releases until Apache Beam fully +supports the most recently released Python minor version. + +The minimum required Python version is listed in the **Meta** section of the +[apache-beam](https://pypi.org/project/apache-beam/) project page under +**Requires**. The list of all supported Python versions is listed in the +**Classifiers** section at the bottom of the page, under **Programming +Language**. + +Check your Python version by running: + +{{< highlight >}} +python3 --version +{{< /highlight >}} + +If you don't have a Python interpreter, you can download and install it from +the [Python downloads](https://devguide.python.org/versions/) page. + +If you need to install a different version of Python in addition to the version +that you already have, you can find some recommendations in our +[Developer Wiki](https://cwiki.apache.org/confluence/display/BEAM/Python+Tips#PythonTips-InstallingPythoninterpreters). + +## Clone the GitHub repository + +Clone or download the +[apache/beam-starter-python](https://github.com/apache/beam-starter-python) +GitHub repository and change into the `beam-starter-python` directory. + +{{< highlight >}} +git clone https://github.com/apache/beam-starter-python.git +cd beam-starter-python +{{< /highlight >}} + +## Create and activate a virtual environment + +A virtual environment is a directory tree containing its own Python +distribution. We recommend using a virtual environment so that all dependencies +of your project are installed in an isolated and self-contained environment. To +set up a virtual environment, run the following commands: + +{{< highlight >}} +# Create a new Python virtual environment. +python3 -m venv env + Review Comment: same here. ########## website/www/site/content/en/get-started/quickstart-py.md: ########## @@ -15,7 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. --> -# Apache Beam Python SDK Quickstart +# WordCount quickstart for Python Review Comment: SG to deprecate it later. It would be good to unify shared content. I wonder if we should reference new guide in the old guide? Specific portions we could update: `## Set up your environment` in new guide could refer to `## Set up your development environment` in the old guide. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
