Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jafermarq committed Nov 28, 2023
1 parent c54feb6 commit 227f796
Showing 1 changed file with 40 additions and 13 deletions.
53 changes: 40 additions & 13 deletions doc/source/contributor-tutorial-get-started-as-a-contributor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Get started as a contributor
Prerequisites
-------------

- `Python 3.7 <https://docs.python.org/3.7/>`_ or above
- `Python 3.8 <https://docs.python.org/3.8/>`_ or above
- `Poetry 1.3 <https://python-poetry.org/>`_ or above
- (Optional) `pyenv <https://github.com/pyenv/pyenv>`_
- (Optional) `pyenv-virtualenv <https://github.com/pyenv/pyenv-virtualenv>`_
Expand All @@ -17,26 +17,53 @@ supports `PEP 517 <https://www.python.org/dev/peps/pep-0517/>`_.
Developer Machine Setup
-----------------------

First, clone the `Flower repository <https://github.com/adap/flower>`_ from
Preliminarities
~~~~~~~~~~~~~~~
Some system-wide dependencies are needed.

For macOS
^^^^^^^^^

* Install `homebrew <https://brew.sh/>`_. 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 <https://github.com/adap/flower>`_ from
GitHub::

$ git clone [email protected]: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:`<version>`)::

$ ./dev/venv-create.sh <version>
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 <version>
# 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 <version>
# 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-<version>) $ ./dev/bootstrap.sh
Expand Down Expand Up @@ -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 <https://github.com/nektos/act>_`. Please refer to
environment by using `Act <https://github.com/nektos/act>`_. Please refer to
the installation instructions under the linked repository and run the next
command under Flower main cloned repository folder::

Expand Down

0 comments on commit 227f796

Please sign in to comment.