Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: README.rst

Issue 29989581: Noissue - Update virtualenv instructions (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Left Patch Set: Created Jan. 24, 2019, 11:36 p.m.
Right Patch Set: Add virtualenv comment Created Jan. 29, 2019, 12:35 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 python-abp 1 python-abp
2 ========== 2 ==========
3 3
4 This repository contains a library for working with Adblock Plus filter lists, 4 This repository contains a library for working with Adblock Plus filter lists,
5 a script for rendering diffs between filter lists, and the script that is used 5 a script for rendering diffs between filter lists, and the script that is used
6 for building Adblock Plus filter lists from the form in which they are authored 6 for building Adblock Plus filter lists from the form in which they are authored
7 into the format suitable for consumption by the adblocking software (aka 7 into the format suitable for consumption by the adblocking software (aka
8 rendering). 8 rendering).
9 9
10 .. contents:: 10 .. contents::
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 All public functions, classes and methods should have docstrings compliant with 205 All public functions, classes and methods should have docstrings compliant with
206 `NumPy/SciPy documentation guide <https://github.com/numpy/numpy/blob/master/doc /HOWTO_DOCUMENT.rst.txt>`_. 206 `NumPy/SciPy documentation guide <https://github.com/numpy/numpy/blob/master/doc /HOWTO_DOCUMENT.rst.txt>`_.
207 One exception is the constructors of classes that the user is not expected to 207 One exception is the constructors of classes that the user is not expected to
208 instantiate (such as exceptions). 208 instantiate (such as exceptions).
209 209
210 210
211 Using the library with R 211 Using the library with R
212 ------------------------ 212 ------------------------
213 213
214 Clone the repo to your local machine. Then create a virtualenv and install 214 ``python-abp`` can be installed directly onto your system, or in a virtual
Vasily Kuznetsov 2019/01/25 12:09:50 Since we have published the module on PyPI, we now
rhowell 2019/01/25 23:49:00 Done.
215 python-abp there:: 215 environment. To install it directly onto your system::
216 216
217 $ cd python-abp 217 $ pip install --upgrade python-abp
218
219 To install it in a virtual environment::
220
218 $ virtualenv venv 221 $ virtualenv venv
219 $ source venv/bin/activate 222 $ venv/bin/pip install --upgrade python-abp
Vasily Kuznetsov 2019/01/25 12:09:50 Since we don't need the virtualenv to be activated
rhowell 2019/01/25 23:49:00 Done.
220 $ pip install --upgrade .
221 223
222 224
223 Then import it with ``reticulate`` in R: 225 Then import it with ``reticulate`` in R:
224 226
225 .. code-block:: R 227 .. code-block:: R
226 228
227 > library(reticulate) 229 > library(reticulate)
228 > use_virtualenv("~/python-abp/env", required=TRUE) 230 > use_virtualenv("~/python-abp/env", required=TRUE) # If using virtualenv
229 > abp <- import("abp.filters.rpy") 231 > abp <- import("abp.filters.rpy")
230 232
231 Now you can use the functions with ``abp$functionname``, e.g. 233 Now you can use the functions with ``abp$functionname``, e.g.
232 ``abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")``. 234 ``abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")``.
233
234
235 When you are finished, deactivate the virtualenv and delete it::
Vasily Kuznetsov 2019/01/25 12:09:50 If you agree with the suggestion above about not a
rhowell 2019/01/25 23:49:00 Done.
236
237 $ deactivate
238 $ rm -r venv/
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld