diff --git a/docs/developer-setup.rst b/docs/developer-setup.rst index d55e857..9cd09f2 100644 --- a/docs/developer-setup.rst +++ b/docs/developer-setup.rst @@ -1,162 +1,162 @@ .. _developer-setup: Developer setup =============== In this guide, we will set up a dual environment: - A virtual env in which all the |swh| packages will be installed in 'develop' mode, this will allow you to navigate the source code, hack it, and run locally the unit tests. - A docker 'cluster' built with docker-compose, which allows to easily run all the components of the |swh| architecture. It is possible to run those docker containers with your locally modified code for one or several |swh| packages. Please read the `README file`_ in the swh-docker-dev repository for more details on how to do this. .. _`README file`: https://forge.softwareheritage.org/source/swh-docker-dev/browse/master/README.md Checkout the source code ------------------------ Clone the |swh| environment repository:: ~$ git clone https://forge.softwareheritage.org/source/swh-environment.git [...] ~$ cd swh-environment ~/swh-environment$ Create a virtual env:: ~/swh-environment$ mkvirtualenv -p /usr/bin/python3 -a $PWD swh [...] (swh) ~/swh-environment$ .. Note: using virtualenvwrapper_ is not mandatory here. You can use plain virtualenvs, or any other venv management tool (pipenv_ or poetry_ for example). Using a tool such as virtualenvwrapper_ just makes life easier... .. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/ .. _poetry: https://poetry.eustace.io/ .. _pipenv: https://pipenv.readthedocs.io/ Install all the swh packages (in develop mode):: (swh) ~/swh-environment$ pip install $(./bin/pip-swh-packages --with-testing) \ - tox pifpaf + tox pifpaf flake8 [...] Setup the docker environment ---------------------------- Install docker-compose:: (swh) ~/swh-environment$ pip install docker-compose [...] Make your life easier:: (swh) ~/swh-environment$ cat >>$VIRTUAL_ENV/bin/postactivate <