From 227f796bc9846393277d271ec099180358c469e7 Mon Sep 17 00:00:00 2001 From: jafermarq Date: Tue, 28 Nov 2023 15:43:59 +0000 Subject: [PATCH 1/4] update --- ...-tutorial-get-started-as-a-contributor.rst | 53 ++++++++++++++----- 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst index 3fdb52b5ddb..392ac14e7c3 100644 --- a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst +++ b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst @@ -4,7 +4,7 @@ Get started as a contributor Prerequisites ------------- -- `Python 3.7 `_ or above +- `Python 3.8 `_ or above - `Poetry 1.3 `_ or above - (Optional) `pyenv `_ - (Optional) `pyenv-virtualenv `_ @@ -17,26 +17,53 @@ supports `PEP 517 `_. Developer Machine Setup ----------------------- -First, clone the `Flower repository `_ from +Preliminarities +~~~~~~~~~~~~~~~ +Some system-wide dependencies are needed. + +For macOS +^^^^^^^^^ + +* Install `homebrew `_. Don't forget the post-installation actions to add `brew` to your PATH. +* Install `xz` (to install different Python versions) and `pandoc` to build the + docs:: + + $ brew install xz pandoc + +For Ubuntu +^^^^^^^^^^ +Ensure you system (Ubuntu 22.04+) is up-to-date, and you have all necessary +packages:: + + $ apt update + $ apt install build-essential zlib1g-dev libssl-dev libsqlite3-dev \ + libreadline-dev libbz2-dev libffi-dev liblzma-dev + + +Create Flower Dev Environment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Clone the `Flower repository `_ from GitHub:: $ git clone git@github.com:adap/flower.git $ cd flower -Second, create a virtual environment (and activate it). If you chose to use -:code:`pyenv` (with the :code:`pyenv-virtualenv` plugin) and already have it installed -, you can use the following convenience script (by default it will use :code:`Python 3.8.17`, -but you can change it by providing a specific :code:``):: - - $ ./dev/venv-create.sh +2. Let's create the Python environment for all-things Flower. If you wish to use :code:`pyenv`, we provide two convenience scripts that you can use. If you prefer using something else than :code:`pyenv`, create a new environment, activate and skip to the last point where all packages are installed. -If you don't have :code:`pyenv` installed, -you can use the following script that will install pyenv, -set it up and create the virtual environment (with :code:`Python 3.8.17` by default):: +* If you don't have :code:`pyenv` installed, the following script that will install it, set it up, and create the virtual environment (with :code:`Python 3.8.17` by +default):: $ ./dev/setup-defaults.sh + # once completed, run the bootstrap script + +* If you already have :code:`pyenv` installed (along with the :code:`pyenv-virtualenv` plugin), you can use the following convenience script (with :code:`Python 3.8.17` by +default):: + + $ ./dev/venv-create.sh + # once completed, run the bootstrap script -Third, install the Flower package in development mode (think +3. Install the Flower package in development mode (think :code:`pip install -e`) along with all necessary dependencies:: (flower-) $ ./dev/bootstrap.sh @@ -83,7 +110,7 @@ Run Github Actions (CI) locally ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Developers could run the full set of Github Actions workflows under their local -environment by using `Act _`. Please refer to +environment by using `Act `_. Please refer to the installation instructions under the linked repository and run the next command under Flower main cloned repository folder:: From e83ef3f8ef40202308e3e33da059eb47c1353df5 Mon Sep 17 00:00:00 2001 From: jafermarq Date: Tue, 28 Nov 2023 15:58:19 +0000 Subject: [PATCH 2/4] adding pandoc --- .../contributor-tutorial-get-started-as-a-contributor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst index 392ac14e7c3..aece34d09de 100644 --- a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst +++ b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst @@ -37,7 +37,7 @@ packages:: $ apt update $ apt install build-essential zlib1g-dev libssl-dev libsqlite3-dev \ - libreadline-dev libbz2-dev libffi-dev liblzma-dev + libreadline-dev libbz2-dev libffi-dev liblzma-dev pandoc Create Flower Dev Environment From 0233aae575e3e2a60a9c9b883204a3c86281bd5b Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Thu, 7 Dec 2023 13:30:34 +0100 Subject: [PATCH 3/4] Update doc/source/contributor-tutorial-get-started-as-a-contributor.rst --- .../contributor-tutorial-get-started-as-a-contributor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst index b0832e00004..15195394d84 100644 --- a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst +++ b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst @@ -55,7 +55,7 @@ GitHub:: $ ./dev/setup-defaults.sh # once completed, run the bootstrap script -* If you already have :code:`pyenv` installed (along with the :code:`pyenv-virtualenv` plugin), you can use the following convenience script (with :code:`Python 3.8.17` by default):: +* If you already have :code:`pyenv` installed (along with the :code:`pyenv-virtualenv` plugin), you can use the following convenience script (with :code:`Python 3.8.17` by default):: $ ./dev/venv-create.sh # once completed, run the bootstrap script From 9478c19fec5149ece4ab69ae262d24923e41d377 Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Thu, 7 Dec 2023 13:31:24 +0100 Subject: [PATCH 4/4] Update doc/source/contributor-tutorial-get-started-as-a-contributor.rst --- .../contributor-tutorial-get-started-as-a-contributor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst index 15195394d84..72c6df5fdbc 100644 --- a/doc/source/contributor-tutorial-get-started-as-a-contributor.rst +++ b/doc/source/contributor-tutorial-get-started-as-a-contributor.rst @@ -57,7 +57,7 @@ GitHub:: * If you already have :code:`pyenv` installed (along with the :code:`pyenv-virtualenv` plugin), you can use the following convenience script (with :code:`Python 3.8.17` by default):: - $ ./dev/venv-create.sh # once completed, run the bootstrap script + $ ./dev/venv-create.sh # once completed, run the `bootstrap.sh` script 3. Install the Flower package in development mode (think :code:`pip install -e`) along with all necessary dependencies::