@@ -88,10 +88,26 @@ This "dummy" package can be installed with pip:
8888
8989 pip install pydevtips
9090
91- Or from source, e.g. with Anaconda / Miniconda:
91+ Or from source. Firstly, `Poetry <https://python-poetry.org/docs/#installation >`_
92+ must be installed.
9293
9394.. code :: bash
9495
96+ # -- recommend using pipx
97+ pipx install poetry
98+
99+ # -- or with official installer
100+ # curl -sSL https://install.python-poetry.org | python3 -
101+
102+
103+ Then the following commands can be run:
104+
105+ .. code :: bash
106+
107+ # get source code
108+ git clone git@github.com:ebezzam/python-dev-tips.git
109+ cd python-dev-tips
110+
95111 # create new environment, press enter to accept
96112 # -- important to set python version, otherwise `python` executable may not exist
97113 # -- (would be `python3` instead)
@@ -106,12 +122,37 @@ Or from source, e.g. with Anaconda / Miniconda:
106122 # install package locally
107123 (project_env) poetry install --with dev
108124
125+ # install pre-commit hooks
126+ (project_env) pre-commit install
127+
109128 # run tests
110- (project_env) poetry run pytest
129+ (project_env) pytest
111130
112131 # deactivate environment
113132 (project_env) conda deactivate
114133
134+ Or with just Poetry:
135+
136+ .. code :: bash
137+
138+ # get source code
139+ git clone git@github.com:ebezzam/python-dev-tips.git
140+ cd python-dev-tips
141+
142+ # install package locally
143+ poetry install --with dev
144+ # -- `poetry env info` to see where the virtual environment is located
145+
146+ # install pre-commit hooks
147+ poetry run pre-commit install
148+
149+ # run tests
150+ poetry run pytest
151+
152+ # # NOTE that Python related commands need to be run
153+ # # with `poetry run` or by activating the virtual environment
154+ # # https://python-poetry.org/docs/basic-usage/#activating-the-virtual-environment
155+
115156 Examples
116157========
117158
0 commit comments